Compute Time Usage Calculation

How is compute time usage calculated exactly?
Is it calculated based off the the amount of time a connection is active, the time spent executing SQL queries, or both?
I’m trying to figure out whether or not I can host our applications on Fly.io with a persistent connection 24/7 or if I should host them on Google Cloud Run.

So for a given project, compute time is calculated using the following formula:

compute units * active time (hours)

  • Compute units (CU) are the computing capacity for an endpoint. A CU in Neon is 1 vCPU and 4 GB of RAM. You can either set a fixed size for the compute units or enable autoscaling if you are on the pro plan. With autoscaling, the maths is a bit hard since the number of CU will change depending on your workload.
  • Active time is the amount of time the compute endpoint is running. By default, a compute endpoint scales down to zero after 5 mins of inactivity (you configure this or disable scale down to zero completely). When you re-establish or open a connection, it will be reactivated. If you disable scaling down to zero, then the active time will be around 720 hours.

Let me know if you have any other questions. :smile:

1 Like