open atlas
↑ Back to track
Backend Architecture BE · 03 · 08

Async vs blocking: free-recall review

Free-recall prompts across the async/blocking unit. Answer each from memory first, then reveal the model answer and compare.

BE Senior ◷ 13 min
Level
FoundationsJuniorMiddleSenior

Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what turns the unit from notes into instinct.

Goal

Reconstruct the unit’s spine without looking back: the two I/O models, the loop’s phases and microtask rule, what blocks it and how to see it, where CPU work belongs, how to bound concurrency, and why the tail explodes near saturation.

Recall before you leave
  1. 01
    Contrast blocking thread-per-connection with the non-blocking event-loop model, and explain why the event loop wins for 50,000 idle connections.
  2. 02
    Describe the event loop's phases and the microtask draining rule, and use them to order setTimeout(0), setImmediate, and a resolved promise inside an I/O callback.
  3. 03
    Why does one synchronous span freeze the whole server, and what is the best signal for catching it?
  4. 04
    What are the two thread pools behind the loop, what does each run, and what does a worker thread cost?
  5. 05
    Explain backpressure and bounded concurrency, and how you choose the concurrency limit k.
  6. 06
    Why does latency explode near saturation, why watch the tail over the average, and what does 'one loop is one core' mean?
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: the I/O model decides how you spend the wait, the loop’s phases plus the microtask drain decide ordering, a single synchronous span freezes everyone (caught by event-loop lag, not CPU), the libuv pool runs native I/O while CPU-bound JS needs a worker thread you pay to feed data, backpressure and a concurrency cap match production speed to consumption speed, and near saturation the tail explodes nonlinearly — so watch p99 and ELU and run with headroom, because one loop is one core.

Something unclear?

Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.

shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.