awesome-everything RU
↑ Back to the climb

Performance

Batching: multiple-choice review

Crux Multiple-choice synthesis across the batching unit — the fixed-cost model, the size/wait window, break-even math, backpressure policies, and production failure modes.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions that cut across the whole unit. None is a definition to recite — each mirrors a call you make under load: when to batch, how wide the window goes, and what breaks when the happy path ends.

Goal

Confirm you can connect the fixed-cost model, the two-trigger window, break-even math, and production failure modes — the synthesis the individual lessons built toward.

Quiz

A payment service writes one durable ledger row per transaction at ~30 writes/s; the SLA is 'durable before we return success.' A teammate proposes 50 ms COPY batches to cut DB load. What does a senior decide, and why?

Quiz

A batching system is configured with max-size only (no max-wait timer). Traffic drops overnight. What is the failure mode, and what does adding the timer fix?

Quiz

For 4 KB payloads where the fixed per-call cost is ~50 µs and per-KB transfer is ~40 µs, will a large batch give a big speedup?

Quiz

A Kafka cluster's brokers sit under 20% disk and network, yet producers can't push past a fraction of capacity. The producers run Kafka 3.x defaults. What's the first fix?

Quiz

A Kafka consumer polls 500 records; record 47 throws on deserialization. The pipeline retries the whole batch on any error. Consumer lag climbs to millions and rises, but the consumer looks healthy. What's happening, and what's the fix?

Quiz

A broker enforces a wire-level max message size, yet a 1 MB compressed batch OOM-kills it (the CVE-2023-34455 class). What is the correct defense?

Recap

Across the unit the through-line is one decision sequence: confirm the fixed cost dominates the variable cost, confirm there’s queue depth and latency slack to spend, then size the window — max-size for throughput, max-wait for latency, whichever fires first — to the largest value under your SLO. The break-even is per item at F = V·n. Production then turns every efficiency property into a failure multiplier: a poison item kills N (split-and-retry plus DLQ), a fast producer floods a queue (bound it, pick block/drop/spill on purpose), and a compressed batch is an opaque envelope you must validate post-decompression and per-item. The recurring senior trap is optimizing throughput nobody is paying for while breaking a latency or durability contract.

Continue the climb ↑Batching: free-recall review
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.