I have had to correct others in our Discord server for instance too.
Last year we did take a lot of heat for cold starts. Here are two blog posts which discuss how we have worked on cold starts.
1. https://neon.tech/blog/cold-starts-just-got-hot
2. https://neon.tech/blog/posix_spawn-close_range-fixed-cold-st...
[0]: https://web.archive.org/web/20230517084346/https://neon.tech...
If you want an always on compute on the free tier, you can just setup a cron job, and every 4 minutes or so send a "SELECT 1" which will keep the database awake.
Nobody knows your product as well as you do.
i could see all the "static" content, but validating email or the dashboard just fail.
console gives some js error about preloading a css url
"Live" database > CockroachDB (few hundred ms) > NeonDB (2-3 seconds) > traditional cold start. This is just my impression and the data is made up but that is how it has felt as a user. So there are definitely levels of "scaling to zero"
As an exercise, I decided to try for myself what my cold start time is + query round trip, on Neon's free tier. Note that I am in Austin connecting to us-east-2.
$ time psql -c 'SELECT 1' 'postgresql://neondb_owner:<password>@<endpoint>.us-east-2.aws.neon.tech/neondb?sslmode=require'
Null display is "(null)".
?column?
----------
1
(1 row)
real 0m1.156s
user 0m0.036s
sys 0m0.020s
You can't make a trend out of 1 data point, but thought I would provide it nonetheless.I haven’t touched it in a year, but I tried it just now and it still works. Cold startup for the Deno Fresh instance and the database query were about 700ms each, assuming I interpreted my logs correctly.
Subjectively, it’s slow enough that it’s worth putting up a dialog box, but it disappears fast enough that you don’t need a spinner or progress bar. A meta-refresh of one second seems good enough.
(I’m in California but the demo uses an East Coast instance for Neon. I set it up that way because I wanted to know how it would feel.)
Demo: https://postgres-counter-demo.deno.dev/
Source code: https://github.com/skybrian/postgres-counter-demo/
https://neon.tech/demos/instant-postgres
(Neon Employee)
> Neon is scaling databases to zero and offer a certain number of "active hours" in their free tier.
Neon's free tier allows users to run their database 24/7[0]. That means you could keep a database alive all the time if you wanted. Quoting the pricing page:
> 24/7 for your main database
In addition to the 24/7 usage on the free tier, Neon additionally gives you 20 compute hours for branches other than your primary/main branch.
Just wanted to clear up the confusion in the article. Not sure why they phrased the Neon section that way.
Edit: The author has corrected the statement about Neon. Thanks!
[0]: https://neon.tech/pricing