neondatabase / autoscaling

Postgres vertical autoscaling in k8s
Apache License 2.0
164 stars 21 forks source link

agent: Plugin/NeonVM/Monitor metrics with retries #1012

Open Omrigan opened 4 months ago

Omrigan commented 4 months ago

Plugin/NeonVM/Monitor metrics we currently have do not count retries, i. e. measure each individual request separately.

Another way to express the same problem is for every scaling session TotalPlugin+TotalNeonVM+TotalMonitor should be equal to total e2e latency.

In order to count the retries also, we must not do TargetRevision: s.TargetRevision.WithTime(now) every time a request is planned. Rather, we update the time once per concrete revision value, and not update it if more request happen with the same revision.

We should also have monitor downscale/upscale metrics separate, as downscale usually needs many more retries.