Fan-Out / Fan-In Patterns 00:00:01 Four survey crews count a hundred trees Divide a hundred observations into four disjoint pieces. Each crew reports its piece identifier, count and partial sum. A coordinator combines the required partial results into the final answer. The orchestrator has 100 items to process. All workers process at the same time, each at its own speed. Each result has a count of 25 and a sum. The result is returned. The workers are free. Choose a merge operation that preserves meaning. The combined average needs each piece's sum and count. Averaging four local averages is wrong when their sample counts differ. 00:00:39 Reassign only the missing district Three survey crews report. The fourth device breaks. Because work and returned results have stable piece identities, the coordinator can retry the missing district without repeating every successful survey. Four pieces are sent. Workers 1, 2 and 4 are done. Their results are stored. After a short wait, piece 3 goes to another worker with the same id. The total is the same as without a failure. Store durable completion by piece and generation. If an older attempt later returns, its result must not overwrite a newer authoritative answer or cause the merge to count a district twice. 00:01:18 Two field radios can feed four survey crews Four crews are available but the central store can accept only two active requests. A concurrency gate lets a waiting piece start immediately after an active crew frees a slot. The gate lets two in. The others wait without using a connection. Its place is free, and worker 3 starts at once. Worker 4 starts. Results come back in the order of the items. The order of physical completion can differ from the order in the assembled result. Track identifiers explicitly. Bounded fan-out protects the bottleneck and can improve the completion time of the whole batch. 00:01:52 Four envelopes do not prove four districts are done The missing crew and its replacement both return the same district. A naive counter sees four envelopes and declares victory while another district has supplied nothing. Watch the set of outstanding identifiers instead. Pieces 3 and 4 are missing. Worker five returns one thousand five hundred seventy-five for the third piece. The fourth piece is still outstanding. Four messages have arrived, but only three pieces. A counter would finish now with 4425. Now nothing is open, and the job finishes. Count distinct required pieces and merge each once. Preserve provenance in partial results so the coordinator can explain how it arrived at the final figure. 00:02:37 A deadline can produce a deliberately partial map A search service fans a query across four shards. Three answer before the deadline. The product may choose to show those hits with explicit missing coverage or to return a complete-result failure. The same query goes to four shards. Three shards answer within 40 ms. Shard 3 is still busy. Time is up. 28 hits are merged and marked as partial. A partial total is not an exact count. Specify the policy before implementation and report slow-shard latency, duplicate results and completeness so operators can distinguish a timely preview from a finished answer.