neondatabase / neon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.
https://neon.tech
Apache License 2.0
13.2k stars 367 forks source link

RFC: move decision-making of desired VM size to VM monitor #8111

Open hlinnaka opened 1 week ago

hlinnaka commented 1 week ago

See also draft implementation of this in:

hlinnaka commented 1 week ago

+1 on the high-level idea that the workload should request the compute size, not an external observer.

I'm missing details on the ScaleRequest semantics. Is it a synchronous call? Is it just a "would be nice to have but until you give it to me, I will work with existing resources"? Is the response to the ScaleRequest an estimate for how long it's going to take until the upscaling is complete?

It's "would be nice to have but until you give it to me, I will work with existing resources". The agent doesn't send any response to the ScaleRequest. If the ScaleRequest results in upscaling or downscaling, however, the agent will send a DownScaleRequest or UpscaleNotification to the VM monitor, just like it does today when it decides to perform an upscale or downscale.

I'm not sure that's the best protocol, but I think it's the path of least resistence, because it's very close to how the current UpscaleRequest mesage works.

github-actions[bot] commented 1 week ago

3228 tests run: 3111 passed, 0 failed, 117 skipped (full report)


Code coverage* (full report)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
8d8c72803a605ee37783805336f6a936a14116b5 at 2024-06-19T15:40:45.689Z :recycle: