Post Modern Programming
Varnish is a reverse Web proxy cache. What makes it interesting is how it was designed. The argument is that people are programming like it's 1975, treating RAM and disk as two separate memory pools, instead Varnish views them as a single memory pool with the RAM acting just like a cache. It does this by mmap'ing a large file, the threads just read and write to this memory happily unaware that it is being backed to disk. This has the advantages of reduced complexity, no requirement to manage a RAM and disk cache, and also a lot less system calls (no read/write to disk). It also means that they have to use lots of threads because any memory operation could cause a thread to block because of a page fault - so they have a thread per connection model. This is contrary to how a lot of people develop these kinds of applications, they have an event driven system with only a couple of threads, or just one thread, and they focus on making sure that thread never blocks.