3 ms·
HN only supports 20 req per second???
by earle 16y ago
HN only supports 20 req per second???
- PStamatiou 16y agoflat files, no database
- pg 16y agoThat's not the bottleneck. Essentially there's an in-memory database (known as hash tables). Stuff is lazily loaded off disk into memory, but most of the frequently needed stuff is loaded once at startup. The bottleneck is the amount of garbage created by generating pages. IIRC there is some horrible inefficiency involving UTF-8 characters.
- ezalor 16y ago> That's not the bottleneck. What is the main bottleneck of HN?
- pg 16y agoSee the second paragraph.
- svlla 16y agoperhaps continuations could be used more judiciously as well
- gills 16y agoAre you using any sort of in-memory fragment caching? That seems like it might reduce some render overhead.
- pg 16y agoA great deal, and it does.
- imp 16y agoMaybe that's just for dynamic pages. Probably most of the most popular pages are cached and wouldn't be considered in that 20 req/sec. Just my own wild guess though.
- dauphin 16y agoThat's 0.05 second for a single request: actually pretty good.