Hacker News new | ask | show | jobs
by foobazzy 1206 days ago
Please ignore my lack of understanding a bit here. I'm genuinely trying to learn.

I've always heard (and it made sense to me) that to reduce latency of requests from across the globe, you might want to have read replicas or caches spread on global infrastructure. Then how is it that stack overflow is fast here when the db is on-prem, 7 seas across from me? Any amount of RAM should not account for the distance, right?

1 comments

You can put a big dent in the impact of the speed of light if you keep round-trips to a minimum.

This is one advantage of server-rendered HTML (though that's not the only option you have).

It also helps that StackOverflow is light on interactivity. You load a page, read for a minute, then maybe click a vote button or open a textarea to discuss. As long as the text and styles load quickly, you won't notice if progressive enhancement scripts take a little more time to load.