Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 11 min read Research mediumAdept

Neon Compute Autoscaling Report

Neon's December 2025 fleet data shows production Postgres databases using 2.4x less compute and about 50% lower cost than they would if sized for a provisioned platform using AWS RDS's rightsizing rule (P99.5 utilization + 20%). Even that provisioning level would leave the average production database exhausting resources about 55 times a month. Read replicas, which share storage with the primary and autoscale independently, use 4x less compute. Small scale-to-zero databases cost 7.5x less than running them continuously. The methodology section covers workload classification, how P99.5 sizing and incident counts were derived from autoscaling histories, the provisioned per-CU-hour rates assumed, and why cost savings trail compute savings.

Related posts

  • How to reduce Postgres compute costs as you scale

    Neon mediumAdept

    Compute, not storage, usually dominates managed Postgres bills, and allocation-based services like Amazon RDS leave most provisioned capacity idle. On RDS, costs fall through careful planning of instance count, multi-AZ use and instance size, through downsizing guided by CloudWatch metrics such as CPUUtilization and FreeableMemory, and through query tuning: EXPLAIN ANALYZE, indexes, materialized views, caching and fixing ORM N+1 queries. Manual resizing is slow, error-prone and causes downtime, so Neon positions its autoscaling (autoscaler-agent, a modified Kubernetes scheduler and NeonVM) and scale-to-zero autosuspend as the way to make compute spend track actual load.

  • How to Make the Most of Neon’s Free Plan

    Neon mediumAdept

    Neon's Free Plan limits apply per project rather than per account, so usage has to be monitored on each project's dashboard. Compute is metered as CU-hours (CU size × hours run), which means smaller compute sizes stretch run time: 0.25 CU gives 400 hours from a 100 CU-hour allowance. Scale-to-zero only saves compute if the connection method actually lets the database go idle. Storage stays in check through retention policies, dropping unused indexes, autovacuum or pg_repack for dead tuples, and archiving. Egress drops when queries avoid returning rows after UPDATE/DELETE, select only needed columns, and ORM defaults are reviewed.

  • When to use Read Replicas vs. bigger compute

    Supabase mediumAdept

    Choosing between vertical scaling and Postgres Read Replicas comes down to diagnosing the bottleneck first, using pg_stat_statements, read/write ratio queries, CPU utilization and EXPLAIN ANALYZE. Upgrade compute for write-heavy workloads, simple fixes with no code changes, or when tier headroom remains. Add replicas to isolate analytics, serve distant regions, or scale reads past the 16XL ceiling. Worked cost comparisons show replicas becoming more cost-effective at higher tiers. Long analytics queries on replicas need tuning of max_standby_streaming_delay, with hot_standby_feedback as a last resort because it bloats the primary. Connection pooling, CDC-based Pipelines and Multigres sharding are covered as alternatives.

  • Dynamically estimating and scaling Postgres’ working set size

    Neon mediumAdept

    Neon autoscales Postgres compute to keep the workload's working set in memory, using a modified HyperLogLog whose register bits are replaced with timestamps so the number of distinct pages accessed can be estimated for any lookback window. A heuristic scans windows from a 5-minute offset up to one hour and treats the point where the estimate jumps sharply as the end of the current workload's plateau. Scaling then projects working set growth to avoid repeated cache evictions. In benchmarks this matched fixed-size compute performance at 30% lower cost, roughly tripled throughput on a bursty pgbench workload, and raised cache hit rate from 30-70% to 100% on a batch workload.

  • Autoscaling Lakebase Postgres

    Neon hardMaster

    Neon's Lakebase Postgres resizes compute in place about once every 81 seconds by taking the maximum of three target sizes: CPU load (one-minute average kept under 90%), memory (polled every 100 ms by an in-VM monitor and kept under 75%), and the working set of the compute cache. The working set comes from a modified HyperLogLog that stores timestamps instead of bits, so it can estimate distinct pages for any window from 1 to 60 minutes. The algorithm then looks for a jump in that curve to find where the current workload ends, and projects growth forward to the next 20-second interval. Resizes are applied to running QEMU/KVM VMs via NeonVM, with a modified Kubernetes scheduler approving upscales, live migration when a node is full, and in-VM checks before any downscale.

The quest for software engineering knowledge.

Look:
Layout: