AlgoViz

Fan-out and fan-in

medium 30 min

Fan-out splits work into pieces and gives them to several workers at once.

Where it shows up

The same pattern appears across everyday software.

  • Azure Durable Functions

    The documentation has a fan-out and fan-in example: an orchestrator starts one copy activity per file, waits for all with Task.WhenAll, and adds up the sizes.

  • AWS Step Functions Distributed Map

    Runs up to 10,000 child workflows in parallel if no limit is set. A tolerated failure percentage decides when the whole run fails.

  • Celery chords

    A chord is a task that runs only after all tasks of a group have finished: fan-in as a feature.

  • Elasticsearch

    A search is sent to shards and the results are merged. If a shard fails, search can answer with partial results and reports it in the response.

  • PostgreSQL parallel query

    Worker processes run part of the plan. A Gather or Gather Merge node collects their rows.

  • Amazon S3 multipart upload

    Parts of one object are uploaded independently, in any order and in parallel, and then become one object.

  • GitHub Actions matrix

    One job definition creates many job runs. Settings limit how many run at once and say how failures are handled.