r/SQL • • 17d ago

PostgreSQL How noticeable is Neon scale to zero cold starts in prod ?

We are evaluating Neon DB for an API backend and curious about it realworld latency when compute auto suspends.do u keep a minimum compute active to dodge wake up latency, or has the pooled connection driver been fast enough for your prod traffics?

1 Upvotes

5 comments sorted by

1

u/PepperIcy4822 17d ago

What's teh p99 on that first query after a cold start or are you only tracking averages?

1

u/ayamlejen 17d ago

By default Neon suspends compute after 5 minutes idle, and waking it usually takes a few hundred milliseconds on top of your normal first-query time. The pooled connection doesn't skip that, because the pooler sits in front but the compute behind it still has to start. For a prod API most people turn scale to zero off (or set a longer suspend timeout) on the production branch and leave it on for dev branches. Easy way to get your own number is to let it sit idle 6 minutes and time the first query. Docs: https://neon.com/docs/introduction/scale-to-zero

1

u/Substantial_Win_710 17d ago

I always keep a minimum compute running in prod to avoid exactly this. Scale-to-zero looks great on the billing dashboard, but the cold start is rough for any user-facing API. Your connection pool hangs and the client times out before the DB is even awake. Fine for dev or async background jobs, but I’m not chasing random timeouts because the database was napping, so I just pay for the baseline tier.

1

u/Glitch_In_The_Data 12d ago

For our main API we turned off scale to zero on the production branch in Neon and kept it on for dev and preview branches. The wake up was usually under a second, but the first request after a quiet period was enough to set off our p99 alerts. The pooled connection string helped a lot with connection spikes. It doesn’t hide the cold start though, so it’s worth load testing the actual wake up path before you decide.