News for hackers. Stuff that matters.
Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @06:17AM (#48932562)
I disagree with the opening premise:

> A single database server cannot handle such demand, so we must spread the queries and data out across many servers with database sharding

Did you max out the capacity of the best server you can buy?

Such a database can serve millions of customers (the numbers given).

You always want to scale up the other parts first, request handlers, caching, etc. The day you can no longer inspect the essential state of your system is the day your company better be included in NASDAQ and ready to pay a few hundred engineers 300k salaries.

Re:Making 768 servers look like 1 by anonzzzies on Thursday July 16, 2026 @06:28AM (#48932639)
Well, they are selling this thing so they don't want you to buy a big server (with a read replica) as that's much cheaper.
Re:Making 768 servers look like 1 by farslan on Thursday July 16, 2026 @09:03AM (#48933931)
That's not true! We have demand for bigger machines and we also sell them. You can go checkout the PlanetScale website. See: https://x.com/samlambert/status/2077197049129587150

There are truly customers that bigger machine no longer cuts.

Disclaimer: I'm an Engineer at PS.

Re:Making 768 servers look like 1 by anonzzzies on Thursday July 16, 2026 @02:46PM (#48938553)
I did not say there is no market, but I am willing to bet whatever that the majority of your client base would be much cheaper off with a simple setup where they can scale the entirety of their company’s existence with one machine. Not even a large one. This cloud stuff has its place but not for most. For them it’s either themselves overspending or wasting VC money.
Re:Making 768 servers look like 1 by bddicken on Thursday July 16, 2026 @11:05AM (#48935597)
We have tons of customers who do exactly this. It's great. Sharding is for customers who out grow this path.
Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @07:10PM (#48941488)
Why would multiple machines be cheaper than one? Don’t you pay an overhead per machine?
Re:Making 768 servers look like 1 by jackb4040 on Thursday July 16, 2026 @06:35AM (#48932682)
I found the article very helpful from a technical perspective, and didn't focus on the number too much, as it could easily be swapped and the decision-making process for when to shard is kinda out of scope.

But I hadn't considered this, so thanks for pushing back. Good to keep in mind their incentives.

I will say, since their product is a proxy whose interface is a single SQL connection, you should in theory be able to do dev queries through that black box, much the same as application queries? What is so scary here that it would require a hundred engineers?

Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @06:54AM (#48932820)
> you should in theory be able to do dev queries through that black box

Because it’s a leaky abstraction which is trying to make guarantees over network connections which are extremely difficult to make within the same kernel.

A few questions I would start with:

- is the system even ACID compliant?

In my reading of this article, no.

- is my sql feature set limited? Will it enforce all constraints? Or are their cross-shard limitations?

For example the article doesn’t discuss transactions or how they would roll back, or how they guarantee a consistent view of data.

Next:

- how does it respond to error?

- how does it respond to load?

This is a complex system and complexity breeds bugs. But now you don’t have the tools or procedures to investigate those bugs because you can’t poke the system at desk with tools. You can’t run experiments; you can’t even see all the data.

Re:Making 768 servers look like 1 by jackb4040 on Thursday July 16, 2026 @08:09AM (#48933391)
Thank you, good points. I'm just learning about this in real time.

It looks like it does support transactions, but they basically destroy the performance benefits: https://vitess.io/docs/faq/sharding/advanced/can-i-use-vites...

The more I read the more I'm struggling to understand the benefit of a router like this that sits on top of a monolithic SQL, vs a truly distributed DB like cockroach.

Like you I'd love to learn more about the internals of their actual SQL engine, which is just barely touched on in the article. The idea of ripping out the layer of a SQL interpreter that does just enough to route it to a real server tickles my brain in the same way as when I learned how node.js ripped the js interpreter out of a browser.

Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @09:42AM (#48934455)
What problem are you trying to solve? What did you try?

Unfortunately the SQL language is the simplest part of the database. The concurrency and consistency guarantees are the key technology,

Re:Making 768 servers look like 1 by p1necone on Thursday July 16, 2026 @06:29AM (#48932651)
Most non FAANG orgs could probably serve all their customers from postgres on a laptop.
Re:Making 768 servers look like 1 by don-code on Thursday July 16, 2026 @09:16AM (#48934101)
Let's hypothesize this is true.

I worked at a startup that had _money_ - a lot of it - flowing in. Stakeholders wanted to see growth, which meant features. They did not want to see us making platform improvements; those didn't show well to clients. Best throw money at the problem, rather than sacrifice the all-important features.

We had a number of architectural quirks that reflected this. One was that we ran our databases in AWS on ephemeral instance store. Yes, the kind that doesn't persist when you stop or lose the instance. The kind that you should never run a database on. We did it so that we could join them eight of them together in RAID 0 on the biggest instance types, and pull 400,000 IOPS to the disk that way. We paired this with hot spares of each shard, as well as hourly backups.

We did this to support a Rails / ActiveRecord data model, for data that should never have been part of a Rails data model. We had exactly one person working part-time on query optimization.

The maintenance burden was immense. The AWS bill, even more so. But again, we are hypothesizing that we could host all of this data on a laptop.

To an extent, maybe up until our thousandth customer or so, I actually think we could have. But we wouldn't have spent most of our time working on _features_ - we'd have instead spent most of our time trying to performance optimize. That would've meant the investors wouldn't have seen growth, which in turn would've highly impacted our success. We had a well defined domain, and optimizing the queries for performance was not it.

Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @10:55AM (#48935462)
What if there was someone involved who had built web applications than run on laptops before and made different architectural decisions than the path your company went down.
Re:Making 768 servers look like 1 by pixl97 on Thursday July 16, 2026 @12:11PM (#48936500)
And what if they cost more than your entire AWS bill?

You seem to have misunderstanding on what scales some things run at, and expense curves of getting them to run at those levels.

A poorly built app running on hundreds of servers can be massively expensive. A well built app running on a single server can also be massively expensive because people that can build apps like that tend to command whatever price they want under the banner of server cost savings.

Can you build software this efficiently? If you can't, then being an armchair expert about it helps noone. If you can, you're undercharging your clients.

Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @01:20PM (#48937404)
It’s not deep magic or expensive. It’s simply asking hmm, how does my operating systems textbook solve this? Before asking how AWS solves this.
Re:Making 768 servers look like 1 by pixl97 on Thursday July 16, 2026 @02:03PM (#48937995)
So, no, you don't actually work anywhere with a global team running tons of projects.
Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @07:10PM (#48941492)
I’m available to consult on these secret special methods If you’ve got a project.
Re:Making 768 servers look like 1 by senorrib on Thursday July 16, 2026 @11:02AM (#48935547)
If my grandma had wheels she would have been a bike. Most of these decisions are made by someone very early on in the process, either a cofounder or an underpaid junior engineer, when the company has zero revenue and no PMF.

It's unrealistic to expect a startup to build a product (or at least it was prior to LLMs generating a lot of boilerplate) with best practices in place.

Re:Making 768 servers look like 1 by anichhangani on Thursday July 16, 2026 @07:00AM (#48932855)
Surely the cost of running sql server on premium hardware with replication would be more than running on commodity hardware with sharding?
Re:Making 768 servers look like 1 by hilariously on Thursday July 16, 2026 @07:44AM (#48933190)
It depends on who you are paying for it, but generally a distributed system is harder to reason about, harder to fix, has weirder edge cases, and much more easily get into situations where it requires even MORE expertise to fix than just having a big honking server.

When you start calculating things that are not just the server, the single server looks cheaper and cheaper. How do you get a consistent backup? How do you do DR? How do you tune queries when it could go to this node or that node? Now writes are going to be significantly slower if you need multi-node commit because no matter what you are racing the speed of light on the network.

Re:Making 768 servers look like 1 by marginalia_nu on Thursday July 16, 2026 @12:52PM (#48937024)
Another thing worth thinking about when running anything in parallel is the rather massive increase in error rate. When you're essentially rolling 768x the number of dice, failure outcomes will happen a lot more often than if you just roll the one or two.

It's a scale that transforms a 10 year MTBF to a ~5 day MTBF.

Re:Making 768 servers look like 1 by hilariously on Friday July 17, 2026 @03:46PM (#48951523)
A great point, you will also eventually be in a constant state of failure, and have to turn that into something you can manage, automatically.
Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @07:06AM (#48932900)
Only if your engineering resources and free and unbounded.

Even then I would probably use those resources to optimize software instead.

In the physical world of trucks and cranes no company would make that mistake to try to save 30-80k.

Re:Making 768 servers look like 1 by skeptic_ai on Thursday July 16, 2026 @07:38AM (#48933143)
Hetzner has this for 100usd a month, 256gb ram can handle quite a lot of traffic already

€84.70 max. per month €0.1357 per hour CPU Intel Xeon E5-1650V3 RAM 256 GB Drives 2 × 6.0 TB Enterprise HDD Location #FSN1-DC1 Information IPv4 ECC iNIC

Re:Making 768 servers look like 1 by Tostino on Thursday July 16, 2026 @08:02AM (#48933339)
Lol that isn't a database server. Come on, if it has hard drives rather than (good) SSD in 2026, it's not a server you should be using for databases unless it's for something with next to no load, and you are also running your application server on the same machine.
Re:Making 768 servers look like 1 by exiguus on Thursday July 16, 2026 @09:20AM (#48934168)
As I understand the author: They describe the journey of scale from a single database server over read replicas to sharding. And its not only about a single server, its also about network (backup, restore).
Re:Making 768 servers look like 1 by bddicken on Thursday July 16, 2026 @10:42AM (#48935292)
Spreading requests out across hundreds, thousands, and in some cases even more is precisely what is done in the industry for big databases! Good examples:

cashapp: https://code.cash.app/planetscale-metal github: https://github.blog/engineering/infrastructure/partitioning-... etsy: https://www.etsy.com/codeascraft/migrating-etsyas-database-s...

These companies could not realistically operate off a single database server.

Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @10:53AM (#48935437)
> These companies could not realistically operate off a single database server.

I want to see it fail first. I suggest their org chart has more to do with their architecture than database performance.

Even so you’re in the category I said. Hundreds of expensive engineers maintain this stuff.

Re:Making 768 servers look like 1 by samlambert on Thursday July 16, 2026 @11:05AM (#48935584)
> I want to see it fail first.

your lack of experience at scale doesn't really invalidate this architecture

Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @01:15PM (#48937337)
You’re selling a database technology without understanding ACID or transactions. You are the one who is naive and inexperienced.

Your sense of scale is entirely artificial and cargo cult. And you’re committed to selling that problem.

Have you tried maxing out the server yet? Got a write up about it?

Re:Making 768 servers look like 1 by bddicken on Thursday July 16, 2026 @10:58AM (#48935499)
You should read through those articles.
Re:Making 768 servers look like 1 by groundzeros2015 on Thursday July 16, 2026 @07:06PM (#48941464)
Thanks for sharing. They validated exactly what I said was of concern:

- loss of atomicity and transactions.

- tons of custom tooling to work around limitation of custom sql (knowing which operations are allowed and consistent).

- GitHub was able to operate for almost a decade on a single MySQL instance, and it’s not clear they really hard to change.

Etsy said this was a huge problem and took 5 years and thousands of PRs to resolve.

Re:Making 768 servers look like 1 by srcreigh on Thursday July 16, 2026 @12:27PM (#48936694)
The cashapp post is actually working towards GPs point. It explains that networked storage MySQL was unreliable and expensive. They migrated to $fancytool which offers a db instance with attached local nvme.

While cashapp may actually need sharding, there are so many companies who are overpaying for shitty performing network storage databases.

Not to mention you are subject to cloud provider networking and compute allocation code. They change it. Big slow network storage DB suddenly gets even worse and you don’t have leverage to have it fixed on their end.

Re:Making 768 servers look like 1 by amazingamazing on Thursday July 16, 2026 @08:27PM (#48942042)
and if your one beefy server goes down? oh, now you want a replica. so much for one beefy machine.
Re:Making 768 servers look like 1 by dizhn on Saturday July 18, 2026 @10:18AM (#48958396)
In the last 10 year or so my 2 beefy machines had much better uptime than the top clouds. :)

I am not suggesting you do this but some businesses can actually be down a little bit, like my non-IT one. I've had issues in the past with email. If the issue happens after business hours and resolves before start of business next day, nobody will even notice.