4 ms·
Can't you serve a static site purely from memory and avoid hitting the filesystem altogether? If the site is not huge then all the pages could easily fit in mem
by dmortin 7y ago
Can't you serve a static site purely from memory and avoid hitting the filesystem altogether? If the site is not huge then all the pages could easily fit in memory and served from a memory cache.
- littlestymaar 7y agoWhen you serve from the filesystem, your content is usually in the filesystem cache in practice, and then it's being served from memory. Adding a memory cache on top of the filesystem cache is probably a waste of time for no gain (unless your workload has really specific pattern maybe…).
- byroot 7y agoTo add to this, most webservers will use `sendfile(2)` for static files.
- littlestymaar 7y agoThat wouldn't work for https though right? (unless you are behind a reverse proxy of course, but that doesn't fit to the whole discussion).