My web server, filed ( <a href="http:&#x2F;&#x2F;filed.rkeene.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;filed.rkeene.org&#x2F;</a> ), is faster than nginx for serving static content by doing two things:
        1. Only handling static files
        2. Being extremely optimized for serving static content<p>It&#x27;s very safe as far as I can tell having run it under AFL with no crashes with ASan on as well as having run it in production on the public Internet.<p>A few of the optimizations I do in &quot;filed&quot; could also be done in nginx, but most would cost too much.<p>A separate logging thread that is queued to helps a lot and was one of the main reasons for writing &quot;filed&quot; -- my ability to serve files was being slowed by my ability to write logs indicating that I had served something.  The downside is that there may be a large queue of unwritten logs in the event of a kernel panic it other unexpected process termination.<p>Most requests don&#x27;t even open the file they are serving because &quot;filed&quot; caches open file descriptors -- once the file has been opened it&#x27;s kept open until cache entry is needed for a newer file.<p>There are no runtime allocations after startup except for log entries, leading to very consistent performance under loads.