• pet the cat, walk the dog@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    15 hours ago

    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 Pornhub’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 sharding harder.