3 ms·
No database. Just flat files cached in memory on demand, IIRC. I think about that when people worry about scalability. HN seems to do okay.
by silentbicycle 16y ago
No database. Just flat files cached in memory on demand, IIRC.
I think about that when people worry about scalability. HN seems to do okay.
- kaiser_pelagic 16y agousing flat files just seems crazy to me, but HN seems to be doing it well.
- cloudhead 16y agoWhy? A database is just an optimized flat file with a query engine.
- rlmw 16y agoBecause a database is an optimized flat file with a query engine. Its commonly the case that you wish to optimize your flat files' performance and query them. I believe that pg has mentioned a few times that he's 'notorious' for using flat files for this kind of thing. I'd love to see the code for Viaweb and the design decisions in there.
- j_baker 16y agoHN has scaled, but not because pg hasn't worried about scaling (although to be fair, it doesn't seem to have worried much): "I already have problems enough with that. Remember, the original motivation for HN was to test a new programming language, and moreover one that's focused on experimenting with language design, not performance. Every time the site gets slow, I fortify myself by recalling McIlroy and Bentley's famous quote The key to performance is elegance, not battalions of special cases. and look for the bottleneck I can remove with least code. So far I've been able to keep up, in the sense that performance has remained consistently mediocre despite 14x growth. I don't know what I'll do next, but I'll probably think of something." http://paulgraham.com/hackernews.html http://paulgraham.com/hackernews.html
- silentbicycle 16y agoSure. Profiling and incremental tuning has been sufficient so far. It will probably be hard to scale indefinitely, but HN already handles quite a bit more traffic than many sites.