Fan-in
Fan-in is a pattern in which outputs from multiple concurrent or upstream sources converge into a single stream, task, or operation.
Distributed Machine Learning Patterns
A workflow pattern that combines results from multiple upstream processing branches before downstream processing.
- How it is used
- Combines outputs from multiple model-serving branches in complex machine-learning workflows.
- How deep it goes
- Defines fan-in through an aggregation workflow and discusses independence, ordering, and ensemble-training limitations.
- Examples
- Uses YouTube-8M entity tagging with selected models whose serving predictions are aggregated.
- What you can do after
- Apply it to join independent, order-independent branch results in a machine-learning workflow.
Read how Distributed Machine Learning Patterns explains fan-in →
Learn Concurrent Programming with Go
A fan-in pattern merges values from multiple concurrent sources into a single stream.
- How it is used
- Connects multiple concurrent pipeline outputs to one downstream input while preserving independently pluggable stages.
- How deep it goes
- Explains fixed-source select fan-in and dynamic-source forwarding, including cancellation and coordinated channel closure.
- Examples
- Uses an accounting stream and a web-page pipeline with twenty downloaders feeding extractWords through FanIn.
- What you can do after
- Build it from scratch with forwarding goroutines, a shared output channel, cancellation, and WaitGroup-based closure.
Read how Learn Concurrent Programming with Go explains fan-in →
Also covered in
What to know first
- parallelismParallelism is the concurrent execution or progress of multiple independent tasks or computational operations rather than their strictly sequential execution.
- goroutineA goroutine is a lightweight function execution unit managed by the Go runtime that runs concurrently with other program activity.
- language modelA language model is a computational model of linguistic sequences that estimates their probabilities or predicts tokens from context, enabling it to generate or evaluate language.
Related concepts
- channeluses · A channel is a typed Go communication and synchronization mechanism through which goroutines send and receive values.
- data aggregationuses · Data aggregation is the process of combining multiple data values, records, or observations into a consolidated or summarized result.
- machine learning workflowuses · A machine learning workflow is an organized sequence of activities for formulating, developing, evaluating, deploying, operating, and maintaining a machine learning system.
- dependencykind of · A software dependency is a component, resource, or prerequisite that another software component relies on to build, function, or proceed.
- select statementimplemented by · A select statement is a language construct that retrieves selected data or chooses among alternative operations or cases according to the language's rules.
Questions about fan-in
What is fan-in?
Fan-in is a pattern in which outputs from multiple concurrent or upstream sources converge into a single stream, task, or operation.
Which Manning books explain fan-in?
Distributed Machine Learning Patterns and Learn Concurrent Programming with Go.
What should I know before learning fan-in?
Manning books that teach fan-in usually introduce parallelism, goroutine and language model first.
What is fan-in a kind of?
Fan-in is a kind of concurrency pattern. A concurrency pattern is a reusable design for structuring concurrent computations and coordinating their execution and interactions.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

