Skip to main content

Compute, Scaling & Limits

Configuring Compute and Autoscaling​

Set each project's compute envelope at creation and adjust it over the tenant's lifetime:

  • autoscaling_limit_min_cu / autoscaling_limit_max_cu — the minimum and maximum compute units the endpoint may autoscale between. Size the floor for baseline responsiveness and the ceiling for peak load; a wide range lets one project serve both quiet and busy periods without manual resizing.
  • suspend_timeout_seconds — the idle period after which compute scales to zero. Aggressive scale-to-zero is what makes a large fleet of mostly-idle tenant databases affordable; a short timeout suits ephemeral or bursty tenants, a longer one avoids cold-start latency for consistently active tenants.

Choose defaults per plan tier or per use case, apply them at project creation, and expose them as knobs you can tune per tenant. Note that a compute suspended by scale-to-zero resumes automatically on the next connection — unlike a quota-driven suspension (below).

Cold starts are small but real: Neon reactivates a suspended compute within a few hundred milliseconds. For most tenants this is acceptable and the idle savings dominate, so keep scale-to-zero on by default — it is the economic foundation of a large fleet. For a latency-sensitive tenant, lengthen the suspend timeout.

Documentation: Compute & scaling configuration (Embedded Postgres) | Neon autoscaling | Scale to zero

Configuring Consumption Limits​

Consumption limits (quotas) cap what a single project may consume in a billing period — your primary guardrail against runaway agents and your enforcement mechanism for plan tiers. Set the quota object when creating a project and update it (via a project PATCH) when a tenant changes plan.

Quota fieldCaps
active_time_secondsTotal time computes are active in the period
compute_time_secondsTotal CPU-seconds across the project's computes (scales with compute size)
written_data_bytesData written across branches in the period
data_transfer_bytesEgress transferred out of Neon in the period
logical_size_bytesMaximum size of an individual branch (a strict, non-resetting cap)

When a quota is exceeded, Neon suspends the project's computes for the rest of the billing period. This is a hard stop: unlike scale-to-zero, it does not resume on the next connection or API call. Design for it — detect the suspended state, surface it to the tenant, and gate resumption on a plan upgrade or an explicit administrative action.

Guidance: prioritize the compute quotas (active_time_seconds, compute_time_seconds) and written_data_bytes for cost control. Be cautious with data_transfer_bytes, which can inadvertently block legitimate operations such as backups. Map each plan tier to a quota profile and apply it at provisioning time.

Documentation: Configure consumption limits

What's Next​