

Most probably off-the-shelf hardware, but with software optimized out the wazoo. Like, reading directly from SSDs instead of using a filesystem. Or more likely using an in-memory database like Redis, perhaps with custom additions.
I knew a guy who went on to work for CloudFlare. Back at that job, he made a write-only static-file storage in Node.js, dumping the contents into a giant file bypassing the filesystem and its metadata overhead. That’s the kind of optimization you want — pretty similar to what database engines like MySQL/PostgreSQL do (iirc one of them does in fact support using a plain disk partition for the database).
Back in early-mid 2010s I’ve read an article on Youporn’s architecture. They ran Redis behind Haproxy load balancers. An in-memory database, behind load balancers. Some people say that it’s normal, but I’ve never had conditions calling for such a thing instead of just sharding harder.


I’m actually surprised that they use some beefy servers. Like, Google famously use shitty and cheap commonplace hardware, but in large numbers, so it’s easy to replace when it croaks.