4 ms·
can you describe how compute scaling works? I do a lot of work in PostGIS, which can have big CPU needs depending on the function being invoked, so my workload
by durkie 4y ago
can you describe how compute scaling works? I do a lot of work in PostGIS, which can have big CPU needs depending on the function being invoked, so my workload can look super bursty from a CPU perspective.
- kelvich 4y agoWe are still experimenting with compute scaling, and the tech preview includes only a small fixed compute container. We have a custom proxy in front of a compute, and we can quickly change the underlying compute container with a bigger/smaller one. That works fine if you don't use per-session semantics and transactions are short-lived. But there are a lot of tradeoffs on what to do if there is a long-lived transaction or session-level object. So if we need to scale up the container in the presence of long transactions, we can: 1) roll back long transactions and enforce upscale 2) wait for a better moment to upscale (potentially forever) 3) try to do a live migration of running Postgres to another node (like VM live migrations, or CRIU-like process migration) and preserve long-running transaction So far, we plan to start with some combination of 1+2 -- should be fine for web/OLTP kind of load. But ultimately, we want to arrive at 3), but that approach has way more technical risks.