Servers & Event Loops Mind Map

Algorithm & Systems Visualizations

Every servers & event loops visualization on this site on one map. The branches are the main ideas. Each leaf is a page; the grey line under it is the one thing to remember about it. Click a branch to focus on it, click a page to open it.

Recall mode hides the page names. Read the hint, say the name, then click the "?" to check.

1. How the map is organized

Overview of the servers & event loops mind map: I/O models, Web servers, Event loops, In the browser, Scaling and releases.
The map at a glance: 5 branches, 22 pages.

Ask at what level the page looks at a server:

  • The kernel and one socket? How a thread waits for data is the I/O models branch.
  • One process serving requests? A thread pool (Tomcat) or worker processes (nginx) is web servers; a single thread with a loop (Node.js, Redis) is event loops; the browser has its own loop.
  • Many servers? Spreading load and shipping new versions is scaling and releases.

2. The branches side by side

BranchUnit of workWho waitsMain risk
I/O modelsa read or write on a socketa thread, or the kernel for ittoo many threads or syscalls
Web serversan HTTP requesta poller, then a worker threadpool exhausted
Event loopsa callback or commandone loop threadone slow task blocks all
In the browsera task or framethe main threadlong tasks freeze the page
Scaling and releasesa server or versionthe load balancerbad release, single point of failure

3. Five facts to remember

  • epoll tells you a socket is ready; io_uring tells you the I/O is done.
  • One event loop thread can serve thousands of idle connections, but one slow callback stalls them all.
  • In Node.js and the browser, all microtasks (promises) run before the next task or phase.
  • Tomcat uses a few threads to watch sockets and a pool of worker threads to run servlets.
  • Scaling out needs stateless servers: keep sessions in a shared store, not in one server's memory.

See all servers & event loops pages in the index, or the other mind maps.