Grokking Operating Systems and Networking for Backend Engineers
Vote

0% completed

​

Sharing a Port Across Workers

Four Checkout workers waited for connections on one port, and 400 connections arrived, one every few milliseconds. Each connection was served by exactly one worker. The workers' own counters, however, recorded 723 wakeups, and 323 of them found no connection to take.

That waste comes from a design choice that every multi-process server makes: how its workers share one port. The choice also decides how evenly connections are spread, and what happens when one worker gets stuck.

This page compares the three common ways to share a listening port, using real counts from each.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content