
Does Hacker News sort trending topics on-the-fly or as a scheduled task? - mcassagnes
I&#x27;m interested to know how they deal with massive amounts of data and still deliver blazing fast results.
When I go to https:&#x2F;&#x2F;news.ycombinator.com&#x2F;, are the threads sorted on-the-fly or pre-computed every x minutes?
I found lots of information regarding the actual algorithm, but not how it is implemented.
======
dang
It reranks items incrementally.

I'd love to get to the point where we can sort everything on every request.

~~~
mcassagnes
Do you have any source for this? I'd love to know more about how they re rank
items incrementally.

Do they actually update every single row in the database every 5 minutes? It
seems too slow.

~~~
dangrossman
HN doesn't use a database. There are no rows. Just one process on one server
with everything in memory. Data is lazy loaded from flat files on-demand.

~~~
krapp
I assumed that in memory they had something structurally resembling a
relational database but they might not. It would never even occur to me to not
use a database for something like this.

