Grokking Operating Systems and Networking for Backend Engineers
Vote

0% completed

​

Building an Event Loop

A small Python server answered 1,000 requests, one after another, with a median time of 0.048 ms each. Then one client sent a request that made the server wait half a second for a slow call, and 50 ms later a second client sent an ordinary request. The second request took 450 ms.

The two clients had nothing in common except the server. The server had one thread, and that thread was busy with the first client's slow call, so nothing else could run until it returned.

This page builds that server, a complete event loop in about 30 lines of Python, and then shows how Nginx, Node

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content