Web Server

Features of Web Server

Static file serving. SSL/TLS support. Virtual hosts. Reverse proxying. Load balancing. Compression. Access controls. URL rewriting. Custom logging. Server-side includes. Limited WebDAV. FLV streaming. FastCGI.

Forward Proxy vs Reverse Proxy

In computer networks, a reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as though they originated from the proxy server itself.

  • a forward proxy acts as an intermediary for its associated clients to contact any server,
  • a reverse proxy acts as an intermediary for its associated servers to be contacted by any client.


Event-based vs Process-based

The main advantage of the asynchronous approach is scalability. In a process-based server, each simultaneous connection requires a thread which incurs significant overhead. An asynchronous server, on the other hand, is event-driven and handles requests in a single (or at least, very few) threads.

Nginx vs Apache Http Server

  • Nginx: event-based
  • Apache: process-based

Nginx is faster at serving static files and consumes much less memory for concurrent requests. Because Nginx is event-based, it doesn't need to spawn new processes or threads for each request, so its memory usage is very low.