Why pull-based pipelines are faster
2025-08-31
Elixir's GenStage implements pull-based pipelines that prevent memory exhaustion by having downstream consumers signal demand upstream, rather than having producers push messages that may accumulate in mailboxes when processing lags. This demand propagation mechanism allows SlotProducer to saturate all CPU cores without blocking while maintaining backpressure—if downstream stages are slow (eg Kafka delivery failing), reduced demand signals upstream to halt ingestion before out-of-memory conditions occur.
Was this useful?