Neon Postgres vs. Supabase
devtoolsacademy.com
devtoolsacademy.com
I do not get the value of BaaS platforms. By the time you have spun up your 3rd postgres instance in a VM you get a hang of it and create a boilerplate docker container with an API layer.
Firebase has auth for free. Firebase has custom domains for free. Supabase is BaaS and Firebase is an app platform. You can make firebase just work, but for supabase you need other services to compliment.
I maybe missing the point of supabase, but I have tried it for a year and it is not for me. VPS from medium and small vendors are quite cheap and it is worth the investment to set it up in your way.
Fly.io shutdown, planetscale canceled free tier, heroku canceled free tier and frontend layer platforms like Vercel and Netlify has pricing related reputational issues.
I just do not trust these platforms any more. VPS and dedicated servers are cheap, sutainable, and experimentable. They are tried and true. But that's my opinion, I could be wrong.
Bit.io was a serverless postgres platform similiar to neon. They got acquired by databricks and their service was shutdown extremely fast.
I'd also like to offer some corrections to the linked post:
- Supabase is SOC2 type 2 and HIPAA compliant (https://supabase.com/security)
- Supabase works with all the same Postgres tooling that neon does (dbeaver, PgHero, PgAdmin, etc.)
- Supabase also offers integrations with Auth0, Clerk, and Okta etc.
- Supabase does offer verify-full SSL mode
- Supabase encrypts data in transit and at rest
- Supabase does offer pg_stat_statements and additionally the newer pg_stat_monitor
And I just want to call out that this author works for neon (self-proclaimed: https://www.reddit.com/r/SideProject/comments/1dy2r8b/commen...)
I messaged Paul on Twitter on Sunday before even sharing the post to get feedback if any as I don't want any confusion like you had last time on Reddit.
and I genuinely like both databases and other awesome developer tools.
pls show some fighting spirit.
PS- I'm no longer working with Neon.
happy to show the bank statement :)
I was under the impression for quite some time that it wasn't that bad to have 2-3ms latencies compared to a co-located DB which is typically <1ms. However, we recently switched from Neon to a colocated, managed db and there was a huge improvement. Some of our queries were executing sequentially (due to our ORM, Prisma), and so what was a 3 second transaction was reduced to only 1 second. Yes this could be rearchitected better, but it illustrates a major floor in my mind for these companies providing only a DB.
Managed vs. unmanaged is a massive difference and would be worth it. But these days I was under the impression most hosting companies also offer managed DBs.
But usability will be massively better. Both platforms offer various things to make developer more efficient and dev cycle shorter
Here’s a quick rundown of the tech stack:
Framework: nextjs Styling: tailwindcss Database: prisma paired with neondatabase MDX Support: I love writing with Markdown Auth: ClerkDev—an absolute game-changer. Animations & Icons: Framer Motion and Heroicons. UI Components: Radix UI
You can run both Neon and Supabase in your cloud account by self hosting. They may also offer on-prem managed deployment, I haven’t looked. I think anyone at large scale interested in using them will “colocate” them.
They have different capabilities over the incumbent cloud provider managed Postgres service.
Neon is very interesting for:
- scale up & scale out. Get more cores for your DB than the max incumbent single instance size.
- fast SSD cache in front of S3. Incumbent DB often uses glacially slow network block storage like EBS.
- branching and schema management wizardry
Supabase is “just” a vanilla Postgres instance plus a suite of extra services and tooling. In their case the collocated version can add the services around an incumbent cloud managed DB.
The solution is AWS PrivateLink (or equivalent with other clouds). It allows you to connect internally from VPC to VPC. It's solved.
It's definitely offered by some managed DB vendors. So this is more of a case of a startup providing this soon rather than this being an issue.
If it's AWS hosted for example it can range from a t2 (low end) to c7a (high end) and have huge performance impacts. How will this change over time?
It's weird that pricing is based on CPU but it's never defined. And how do we compare between offerings when that much is not obvious?
And autoscaling works like this: https://neon.tech/docs/introduction/autoscaling
Sure, but that precisely doesn't answer the question.
What is 1vCPU in this 1CU? If I benchmark this CPU for example, what do the numbers look like?
I saw discussion comparing the cost of Neon vs Supabase based on CPU but felt it lacking without any indicator on what is a CPU. 1 CPU could be up to 2x the other CPU.
And again, that varies.
As in the Fargate / Lambda vCPU? There's x86 (old) and arm64 (graviton 2).
As in an EC2 vCPU which as indicated could range from t2 all the way to m7i / m7a. Even just comparing AWS' own graviton from 2 to 4 (latest), you get about 2x performance improvements.
If we compare to RDS / Aurora, it lets you pick the CPU, so definitely makes a difference.
Yes, as it drifts further and further the scaling can be meaningless. This is exactly what's lost with the newer generation and cloud.
Also with the databases mentioned it can't be horizontally scaled. Writes are single server. So there's a limit.
> so it's not exactly easy for the CEO to come on here and tie the infra engineers hands by publishing the exact details of whatever they currently have deployed at the moment
Nothing to do with infra. This is about the product itself. What are you selling? That's the question. The product could be very expensive or not based on that. It also might not meet any organization needs e.g. since they have to meet a performance criteria and that's not just about more CPUs.
> If you really care that much ($$$) I wouldn't be surprised if they'll let you use whatever fancy pants core you have in mind.
And likely the competition can too. Point being? Does that matter? Imagine going to a store and buying a "shirt". You might be allergic to cotton. Now do you just buy any shirt hoping it works?
https://www.prisma.io/blog/performance-benchmarks-comparing-...
Storage is will be long term unlimited. Short term it is few terabytes - we are constantly increasing the ceiling as storage sharding improves: https://neon.tech/blog/how-we-scale-an-open-source-multi-ten...
Compute autoscales from 0 to 10CPUs per read replica with 0.25 CPU increments - you set up min and max. We give our enterprise customers larger compute sizes. And you can have A LOT of read replicas that stand up instantly.
For small workloads egress cost doesn’t matter. For larger - well it does.
I wish it was illegal to charge so much for egress for cloud providers.