Why does HN run on a single $100 instance?
Is it just for clout to say they have a high-traffic app that runs on a lean stack? When big news events like the OpenAI drama happen the site gets bottlenecked. I can understand if it's an app with simple operations not wanting to roll a k8s cluster, but why not something managed like Heroku or Digital Ocean where you can autoscale or scale up with a slider?
Is it just because M5 hosting requires them to provision in advance? Ask what the goals are. They're not, as far as i know, making money such that an unserved client request is a lost opportunity for income. The stated goals of fostering rational conversations and sharing of knowledge are very likely better served by the implicit throttling of contentious subjects and breaking "news" that everyone wants to talk about all at once. Had HN been lower latency through the last few days of "OpenAI" media spasms, they might well have collected thousands more comments. Was there much chance those would've added any information or insight to the debates? HN is for sure a contribution to the community that they generously provide (and a bit of a recruiting tool for YC no doubt. Perhaps not as much these days since YC is a household name in startup world). It's not just the inability to post though, it's the inability to even see the existing discourse on a busy day. These are exactly the situations where the discourse is least interesting and lowest in information. How is asking about the architecture of this site least interesting and lowest in information? Your opinion is the least interesting and lowest in information. A constant, subtle admonishment of YC companies that waste their funding on complicated infrastructure to handle a fraction of the traffic. I accept this answer as canonical. afaik, HN's application code is single threaded and wouldn't be able to take advantage of horizontally scaled hardware An app doesn't need to be multi-threaded to horizontally scale the physical hardware. A load balancer can dispatch requests to multiple single-threaded processes running on individual servers. That would result in multiple distinct instances of HN that don't share data. You're thinking of an architecture with a separate central data store that all the instances access and update, but that is not how HN works to my knowledge. :mind-blown: Hats off to PG for building an app that could handle 4m requests with the architecture of a small hobby project. That's just how powerful modern hardware is. You don't need a k8s cluster to run a simple CRUD app under realistic loads. I'm sure the hackernews codebase has acquired some performance optimizations over the years, but I doubt that it's doing anything especially clever performance-wise.