Notes / tag / concurrency

#concurrency

17 notes across 3 topics

Observability KPIs for the Fan-out / Fan-in Pattern

Observability KPIs for the Fan-out / Fan-in Pattern

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q1 Answer — Search Fan-Out Design

Worked answer to Fan-Out/Fan-In Practice Q1: partitioning, deadline propagation, partial-result policy, and instrumentation priority for a 200-shard search API at 150ms P99.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q2 Answer — Hedging Trade-off

Worked answer to Fan-Out/Fan-In Practice Q2: the load-vs-latency math of hedged requests, when to enable them, and what to instrument first to justify the decision.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q3 Answer — Context Cancellation Leak

Worked answer to Fan-Out/Fan-In Practice Q3: diagnosing a ghost-request leak where client-visible errors look healthy but infra cost and downstream CPU are elevated.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q4 Answer — Aggregator Bottleneck

Worked answer to Fan-Out/Fan-In Practice Q4: min-heap merge strategy for a 500-shard top-K aggregation, its complexity, and how to keep aggregator latency from contaminating per-shard dashboards.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q5 Answer — Sizing the Fan-Out Width

Worked answer to Fan-Out/Fan-In Practice Q5: the questions to ask and safeguards to add before accepting a design that fans out to all 8,000 tenant shards in prod.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q6 Answer — Retry Storm

Worked answer to Fan-Out/Fan-In Practice Q6: how uncapped per-worker retries turn a transient blip into a full outage, and the retry policy that prevents it.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q7 Answer — Backpressure and Load Shedding

Worked answer to Fan-Out/Fan-In Practice Q7: why an aggregate latency average hides a single overloaded shard, and where the fix belongs — dispatcher, worker, or shard.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q8 Answer — Hierarchical Fan-Out

Worked answer to Fan-Out/Fan-In Practice Q8: budgeting a deadline across two nested fan-out levels and preventing partial failure from silently compounding across hops.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

Q9 Answer — Validating Hedging and Deadline Propagation

Worked answer to Fan-Out/Fan-In Practice Q9: fault-injection, load testing, and canary comparison for validating a deadline-propagation and hedging rewrite before it reaches production.

patterns distributed-systems concurrency maang-prep
Jul 6, 2026

04 — Fan-Out / Fan-In

Decompose a request into parallel sub-tasks (fan-out), execute concurrently, then merge results (fan-in). The foundational pattern for latency-bound aggregation.

patterns distributed-systems concurrency maang-prep
Jun 30, 2026