Hacker News new | past | comments | ask | show | jobs | submit login
Does Hacker News sort trending topics on-the-fly or as a scheduled task?
10 points by mcassagnes on July 3, 2015 | hide | past | favorite | 6 comments
I'm interested to know how they deal with massive amounts of data and still deliver blazing fast results. When I go to https://news.ycombinator.com/, 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.



It reranks items incrementally.

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


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.


Source: dang is one of the employees of Y Combinator who help run HN.

Dang--might be good to have some way to indicate that so new folks understand your special role in the community here


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.


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.


Thank you. I did not expect that!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: