James Lim out together this piece about short explainer of event-driven servers, intended to help readers gain an intuitive understanding of event loops.
It could be useful when:
- Deciding between different MPMs for Apache HTTP Server
- Comparing Apache HTTP Server and NGINX
- Choosing concurrency models for gunicorn
- Troubleshooting an event loop
In the classic client-server architecture, a server accepts connections from clients, receives data on the new socket, forwards it to the application for processing, and then sends data back to the client on the same socket.
To achieve concurrency, the simplest multi-threaded implementation could create a new thread for each new connection. Once created, the thread is bound to the connection, processing all requests and responses on this connection sequentially. The thread is then destroyed and freed when the connection is closed.
Plenty of charts and terminal commands to help you with better understanding of the concept. Also links to further reading. Great!
[Read More]