|
|
|
|
|
by beambot
4591 days ago
|
|
With static files, it's easy to setup serving assets cached in memory. Since all files are static, expiring assets is also trivial. Also, setting up a CDN is super easy too (just a CNAME redirect). Also of note: HN uses the filesystem as a database (ie static files). |
|
And frankly, the moment you hit virtual memory, you won't even get to 10 qps anymore without an SSD, and 100 with an SSD.
Static serving is a trivial optimization, and like all such things, it has huge qualifiers, and only works in the case it's intended for. It will only have a speed advantage in the obvious, simple case. As soon as you want to use any sort of dynamic element, extra round-trips will kill whatever advantage you thought you had. If you actually have large amounts of repeating elements (e.g. a table of some sort, article list, pagination, ... what have you), the extra memory usage will kill your advantage.