logoalt Hacker News

veqqtoday at 12:08 AM1 replyview on HN

edit: misread requests as writes


Replies

etermtoday at 12:25 AM

I wouldn't expect that problem to be solved at the database layer, that's what http caches are for, then application level in-memory caches, then finally if neither of those hit, go to the database.

For example, one of the biggest optimisations that Hacker news does is that it serves logged out users from a cached copy of the front-page.

Logged out users don't care/notice about comment counts, they don't notice that it doesn't update as often, they can't be hiding articles so you can serve the same front-page to the millions of anonymous users and bots, and update that cached copy once and on a slower cadence than every request.

show 1 reply