Where a sync handler bleeds time
A synchronous web handler that opens a database query and waits 50 ms for a result spends those 50 ms doing nothing. The CPU is idle. Other connections sit in the accept queue. Multiply by every concurrent request and the worker process has effectively serialized them.
Python's answer is cooperative concurrency: one thread, one event loop, and a way for code to say I'm waiting on I/O, give the loop back to someone else. That word is await. When you write await query() you are not blocking โ you are yielding control until the I/O finishes.
This is not parallelism. It is overlap. One thread, one core, but the loop multiplexes thousands of connections because none of them ever waits on the CPU. Web servers, brokers, and proxies are almost pure I/O โ which is why modern backend Python defaults to this model.
