How Figma Hacked Postgres Into Scalability

preview_player
Показать описание
I've said "postgres doesn't scale" for awhile. Hopefully this puts it into context. Obviously it CAN scale, but by default, it will not. At all. lol.

What a journey this post was.

S/O Ph4se0n3 for the awesome edit 🙏
Рекомендации по теме
Комментарии
Автор

Please stop with the clickbaity titles! PostgreSQL is probably the best database choice for most businesses. Figma reached a scale most businesses will never reach. And by then they should have the resources to deal with these kinds of problems. Stop telling people how "absurd" or "insane" it is that you have to spend time writing benchmarks to find bottlenecks in your database. There is a world outside cloud providers, you know? There are businesses who just don't want (or can) throw money at cloud providers to solve all their problems (think regulated markets). You will get VERY far with a PostgreSQL database on a dedicated host and it's gonna cost you peanuts. Enough with the hot takes and one-sidedness.

tbkrmr
Автор

There is nothing that hurts more than listening to frontend guy talk about databases

commandmaster
Автор

Dev Ops Engineer here and I can attest that Postgres does indeed scale very well and is probably the best relational DB out there right now which is why its so widely adopted. If you have over 4 million users and over a billion rows yeah you’re going to run into some issues regardless of what DB you choose. To say Postgres doesn’t scale though is wild given this very specific use case. Front end devs need to sit this one out.

Kaisewhite
Автор

Someone is sponsored by PlanetScale.
Your credibility took a hit on this one, not gonna lie.

makl-the-oracle
Автор

Theo is getting cooked hard in the comments

william
Автор

Dear reader, this is a problem you will not have in your side project, or probably ever. I'm starting to understand why this guy's credibility is tanking so fast. Imagine, he said large companies shouldn't need database engineers 😂

buddy.abc
Автор

Interesting post, but i was annoyed by Theo constantly going on about how it's "absurd" that Figma had to dive deeper into these issues, and suggesting that this is all because postgres "doesn't scale".

Figma is one of the most successful tech companies of the last 10 years. They have an insanely advanced product. Ofc they're going to run into problems that very few companies have and be forced to develop tailor-made solutions.

The idea that this is somehow proof that we as regular devs would be better off opting into proprietary services by SaaS companies like Planetscale is nonsense.

tt
Автор

"Postgres doesn't scale" is such baloney

krazymeanie
Автор

oh another daily video of Theo reading a blog post about something most developers will never ever have to worry about

rtorcato
Автор

It's absurd that a 10 BILLION dollar company handling terabytes of data has to hire a database team? Lol, okay Theo.

Seriously, he whines about anyone having to know how to do anything beyond writing simple front-end work, and keeps praying for a world where all developers are too incompetent to handle literally any remotely difficult problems and all real work is centralized to a few monopolistic companies that everyone just pays to do everything. Absolutely no lessons learned from cloud computing in general or the recent Vercel bullshit or the recent Cloudfare bullshit, etc.

There's a lot of money to be made in being a developer that can actually deal with a problem that you can't just npm install away.

hobbit
Автор

For figma it's not absurd to be this deep into databases. All these real time collaboration features comments and other stuff that people use daily will make their DBs explode with data just as Discord.

dyto
Автор

A small, 750+ employee, company such as Figma ...

SickBeard
Автор

For the average joe building side projects, this scaling doesn't matter. As they say "you'll probably have more servers than users"

mdtron
Автор

Oh damn postgres doesnt scale? I need to migrate my side project quickly. Before i have more than 5 users....

marcempunkt
Автор

Game dev was a bad example, because you DO have to know quite a few of the intricacies if you ever want to make the graphics performs well. Hell you have to test and study the driver and architecture quirks of the different vendors...

EraYaN
Автор

"Imagine if game devs had to understand DirectX and assembly..." I don't have to imagine. I was there when they did. Games ran a lot faster, with less bugs, and without being cookie cutter bullshit cranked out with Unity.

hobbit
Автор

I run multi region postgresql clusters (3 to 5 geographical regions) with intra region auto scaling (vertical and horizontal) plus a layer of geo redundant pgpool clusters on top… the smaller ones cost my clients around 30 bucks/month at minimum load.
So please stop this nonsense bullshit, there is no “one size fits all” data layer out there, and Postgres scales very well until your past software design decisions come back to bite you in the ass. And that’s the case for every company that grows so fast like Figma. Nothing saves you from benchmarking, analyzing, refactoring - rinse and repeat.
I will always and ever choose Postgres over this new shiny toy cloud databases out there, period.

CodiceMente
Автор

"Imagine if game devs had to understand DirectX and assembly..." they actually do if they are legit, and I think any developer building a product that need a scalable database SHOULD understand how databases work and any team the size of Figma's SHOULD have world class DBAs

LeviLansing-dyqb
Автор

Limited knowledge about the subject, yet spoke with complete confidence right from the get go. This is not just bad, it's misleading.

Unsubbed.

Edit: He's sponsored by PlanetScale. No wonder...

eye.of.thestorm
Автор

LMAO Theo sometimes you say some really dumb stuff

Dude