Autoscaling Lakebase Postgres
Blog post from Neon
Lakebase Postgres, based on Neon’s architecture, autosizes database compute in real time by separating stateless query execution from durable storage, allowing virtual machines to resize, move, start, or stop without relocating database data or dropping connections. Its autoscaling algorithm selects the largest capacity target indicated by CPU load, memory pressure, and the compute cache working set, within user-configured limits; CPU and overall memory are sampled every five seconds, Postgres memory is monitored every 100 milliseconds, and cache demand is evaluated every 20 seconds. To capture workloads that suffer from cache misses despite low CPU use, the system uses a time-aware modification of HyperLogLog to estimate recently accessed database pages across windows from one to 60 minutes, identify when prior heavy activity has ended, and project near-term cache growth. Resizing is coordinated by node-level autoscaler agents, an in-VM monitor, a modified Kubernetes scheduler, and NeonVM infrastructure using QEMU and KVM, which can adjust CPU and memory on live virtual machines or migrate them when needed. The approach enables both rapid scaling up and safe scaling down, with safeguards ensuring that memory is not removed when Postgres still requires it, and production databases reportedly change size more than 32,000 times per month on average.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Kubernetes | 6 | 3,503 | 390 | 114 | +25% |
| Real-time | 2 | 4,634 | 1,100 | 229 | -29% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.