phhttpd is an HTTP accelerator. It serves fast static HTTP fetches from a local file-system and passes slower dynamic requests back to a waiting server. It features a lean networking I/O core and an aggressive content cache that help it perform its job efficiently.
phhttpd features a very slim I/O core. It does all its networking work using non-blocking system calls driven by whatever event model is most appropriate for the host operating system. This allows a single execution context to handle as many client connections as the event model dictates.
phhttpd's job is to serve static content as quickly as it possibly can. To do this it maintains a cache of content in memory. When a request is serviced, phhttpd saves a reference to the on disk content and whatever HTTP headers are dependent on the content. The next time a request for this content is received, phhttpd can service it very quickly. This cache can be prepopulated (populated at run time), or can be built dynamically as requests come in. Its size may also be capped by the administrator so that it doesn't overwhelm a system.
phhttpd is a threaded stand alone daemon. The number of threads is currently statically defined at run time. Incoming connections are evenly balanced among the running threads, regardless of what content they may be serving. Connections are served by the thread that accepted them until the transfer is done.
phhttpd is currently only expected to build and run on Linux systems using glibc2.1 under a kernel that supports passing POLL* information over real-time SIGIO signals. This means later 2.3.x kernels or a 2.2.x kernel that has been patched.
I badly want this to change. If you're interested in doing porting work to other Operating Systems, please do let me know.