4 ms·
While CDNs are useful, you really shouldn't need them to handle HN traffic. Someone posted what the otherside of a hug looks like[0], and it's somewhere around
by Kamq 3y ago
While CDNs are useful, you really shouldn't need them to handle HN traffic.
Someone posted what the otherside of a hug looks like[0], and it's somewhere around a unique visitor every 1-2 seconds, which really shouldn't be too much of a problem for... well anyone. The poster themselves got through it with a $7/month heroku server (albeit not without some manual intervention).
And, y'know, if sometimes a hobby project gets taken down, that's fair. You could end up getting 100 requests in a single second on a server you strung together off blog posts as a learning exercise over a weekend. But any time any professional organization gets taken down by the amount of traffic HN generates, I'm always a little embarrassed for them.
[0] https://herman.bearblog.dev/the-hacker-news-hug/ https://herman.bearblog.dev/the-hacker-news-hug/
- littlestymaar 3y agoYeah, at such a load, it's almost always something like too many DB connections/queries. If you somehow use one DB connection per query and make multiple queries for every user, no wonder your website struggles under even a tiny bit of load.
- Kamq 3y agoThe number of times I've been bitten by an orm and the n+1 problem... Which, I guess is fine for some internal thing that needs to handle 8 requests a day. I've kinda stopped using orms at this point. The sql is usually clearer than whatever dsl has been shoved into the orm. If you ever change databases, it requires slightly more work (assuming you haven't gone too crazy with db specific functionality), but burning a day or two to update the sql in your project is usually still quicker than orchestrating the migration.