Skip to content
dbexplore

FinOps · Neon

Neon cost optimization: what keeps it awake, what branches hold, and every minimum.

Neon bills for time and for what you keep. A compute is paid for the hours it runs, a branch for the changes it holds, and every autoscaling minimum for each hour its compute is awake. This is the FinOps view of the three.

A bill that follows time and forgetfulness

The compute never suspends. Old branches hold storage. Every small project carries a minimum. Those three sentences account for most of what a Neon estate overpays, and they have one thing in common: none of them is about how big the database is. Neon prices what kept a compute running and what has been left behind, so a team with a modest amount of data can run a large bill and a team with a large amount of data can run a small one.

That makes it a good platform for finding waste and an awkward one for the usual instruments, because a size chart shows nothing. This page is the Neon chapter of Postgres FinOps. It sets out how Neon meters a month, then takes each leak in turn. How the platform watches a Neon compute without waking it is on the Neon solutions page, and the shared method is in the cost optimization overview.

How Neon meters a month

Compute is the headline line and it is measured in CU-hours: the size of the compute multiplied by the hours it is running. Suspend a compute and its hours stop counting, which is the whole promise of scale to zero. Autoscaling moves the size between a minimum and a maximum that you set on each compute, and the compute never goes below the minimum while it is up.

Storage is billed separately and in layers. The root branch is billed on the size of the data. Each child branch is billed on what it has changed, capped at the size of the data, and the change history that makes instant restore possible is billed on root branches. Branches beyond a plan’s allowance carry a charge of their own. Nothing in this table is a price. It is what each meter counts and how it behaves.

  • Compute, in CU-hours

    Behaviour
    metered
    What it means for the bill
    Compute size multiplied by the hours the compute is running. A compute suspended by scale to zero accrues no CU-hours.
  • The autoscaling range

    Behaviour
    flat
    What it means for the bill
    Set on each compute. While the compute runs it never drops below its minimum, so the minimum is the floor under every awake hour.
  • Computes per project

    Behaviour
    multiplies
    What it means for the bill
    A branch can carry its own read-write compute and any number of read replicas. Every running compute counts toward usage, and each replica is billed as a compute of its own.
  • Root branch storage

    Behaviour
    metered
    What it means for the bill
    Billed on the actual data size per GB-month, measured hourly.
  • Child branch storage

    Behaviour
    metered
    What it means for the bill
    Billed on the lesser of the changes since the branch was created and the logical data size, so it can grow to the size of the data and no further.
  • The history window

    Behaviour
    metered
    What it means for the bill
    Change history kept for instant restore is billed as storage on root branches only. The window is set per project, and a shorter one holds less.
  • Extra branches

    Behaviour
    multiplies
    What it means for the bill
    Branches beyond the plan’s allowance are billed in branch-months, metered hourly.

CU-hours against the suspend setting

A compute suspends after five minutes with no active queries, and a paid plan can change or switch off that setting. What stops it suspending is a short list, and Neon states it. A connection idle in a transaction is treated as active, because suspending would break the transaction. A logical replication subscriber, connected while Neon is the publisher, keeps the database awake for as long as it stays connected. And a query that arrives every few minutes never leaves the five-minute gap that suspension needs.

The setting can say five minutes while the compute-hours say twenty-four hours a day. The screen puts the two side by side and prices the hours that a suspended compute would not have accrued. The fix for an idle transaction is in application code, and the fix for a subscriber is a decision about the destination; neither is a Neon setting.

CU-hours against the suspend setting

illustrative basisyour rate

Four projects, each with a suspend setting of five minutes or none. The hours awake come from the compute.

Suspend setting

5 minutes

Projects awake longer than use needs

all four

Modeled cost of the extra hours

about $310 a month

your rate

Branch age against the storage it holds

Branches are the feature people like best about Neon and the one they clean up least. A branch begins by sharing its parent’s data and costs nothing. It starts to cost the moment somebody writes to it, and what it costs is the changes it holds, capped at the size of the data. A branch made for a migration rehearsal months ago is still holding its changes today, billed hour by hour, long after anyone remembers why.

Age alone does not condemn a branch. A branch that is old and still being written to is working. Instant restore adds a line of its own: the change history kept for restore is billed on root branches, set by a window that applies to the whole project, and it grows with every modification, deletes included.

A minimum on every compute

An autoscaling minimum is sensible one project at a time. Neon’s own advice is to set it high enough to hold the working set in memory, and a minimum chosen that way is the right size for its database. The cost appears when the choice is repeated. Every project has a compute, every branch may have its own, and every read replica is one more, and each carries a floor under every hour it runs. A fleet of preview environments, a sandbox per customer and a staging project per team all pay a floor that nobody chose as a fleet.

The point is not that any one minimum is wrong. It is that the total has never been looked at once.

Five problems, in the words people use for them

These are the sentences from the review. Each card links to the page where that part of the platform is covered in depth.

What the product shows: The compute-hour, branch storage and minimum-size charges, each priced and tied back to the project that drives it.

Where the rest of the method lives

Neon is the platform most unlike the other two chapters. Where RDS bills decisions made once and Aurora bills the I/O a query does, Neon bills time. The method is the same wherever it is applied: attribute the dollars, queue and gate the fixes, put each number in front of its owner, and read every figure against the basis it carries. For how each kind of platform meters a month, start from how Postgres cost works on a fleet.

Questions about Neon cost

What keeps a Neon compute from suspending?

Neon documents four things. A connection idle in a transaction is treated as active, a connected logical replication subscriber keeps the compute awake when Neon is the publisher, computes above 16 CU never suspend, and on a paid plan scale to zero can be switched off. Any query inside the five-minute window also restarts the clock, which is why a frequent job matters.

Does a suspended compute cost anything?

It accrues no CU-hours, which Neon documents plainly. Storage keeps billing, including child branches and the change history held for instant restore, so a project that sleeps all week still has a storage line. The platform shows the two separately so a quiet project is not mistaken for a free one.

Do child branches multiply the storage bill?

Not without limit. Neon bills a child branch on the lesser of the changes made since it was created and the logical data size, so no branch costs more than the data itself. What adds up is the number of branches that have been written to and then forgotten, and the platform lists them.

Does measuring a Neon compute wake it up?

Connecting to an idle Neon compute activates it, as Neon documents. The platform’s collector therefore checks the compute’s state first and scrapes only endpoints that are already awake, and it records any wake attempt as an event of its own, so measuring the cost does not add to it.

Will it suspend computes or delete branches for me?

No. A new suspend timeout, a lower autoscaling minimum or a branch removal is a recommendation with its dollar delta. A person approves it, and the ledger records who did. Deleting a branch goes through the approval gate like any other change.

Find what is keeping your Neon computes awake.

A pilot starts read-only and never wakes a sleeping compute to measure it. You see the hours against the suspend setting, the branches by age and the minimums added up, all modeled and labelled.