Kafka Head-of-Line Blocking: Increase Throughput, Reduce Latency
Breakout Session
Kafka consumers have a throughput problem many might not know about: head-of-line blocking. When one message takes longer to process - due to a slow database call or external API latency - every message behind it waits. Even messages for entirely unrelated customers, orders, or entities sit idle while the slow one completes. This silently degrades system performance and business responsiveness.
The standard advice to add more partitions trades one problem for another: partition management and operational complexity. Rebalancing storms and coordination overheads begin to dominate, and at some point you end up managing partitions instead of customer features.
This talk examines head-of-line blocking from first principles. We will quantify the impact - real numbers showing how a single slow message even on healthy systems can reduce effective throughput dramatically. We will explore why the problem is architectural, not configurational, and why tuning settings can only take you so far.
We will look at what a real solution requires while preserving Kafka's ordering guarantees, because ordering is one of the reasons we chose Kafka in the first place. We will walk through the architectural patterns involved - examining trade-offs - and see how extensive chaos testing validates the approach actually works under production conditions including rolling deployments, consumer OOMs, and network partitions.
Finally, we'll do a live demonstration showing the difference in practice: the same workload and message volume with dramatically different throughput and latency.
Attendees will see the problem and the solution side by side and will leave understanding why head-of-line blocking matters, architectural patterns for solving it, and a working implementation they can adopt immediately.
David Green