Kafka Consumer Lag
Per-partition lag visualization with scenario testing for spike, crash, and rebalance events.
Total Lag
0
Peak Lag
0
Produce
30/s
Capacity
30/s
Status
Keeping up
Partition Rack
P0C0
0
P1C1
0
P2C2
0
P3C0
0
P4C1
0
P5C2
0
Lag curve
Keeping upLag = produced − consumed. Capacity is 3 consumers × 10/s = 30/s. Per-partition lag reflects individual partition backlog under round-robin assignment.
How this simulator works
Consumer lag = messages produced but not yet consumed. Each partition has its own lag bar; consumers handle assigned partitions round-robin. Adjust produce/consumer rates to see lag grow or drain.
Partitions and consumers
- Partitions are assigned to consumers via round-robin: partition P → consumer (P mod N).
- A partition can’t be consumed in parallel; lag is per-partition backlog.
- When produce rate exceeds total consumer capacity, lag grows without bound.
Why per-partition lag matters
Hot partitions have uneven load. In production, partition skew causes some consumers to become bottlenecks while others sit idle.
Scenario buttons
- Spike — sudden traffic increase (4x for 3s).
- Crash — consumer failure (0 consumption for 5s).
- Rebalance — partition reassignments after scaling.