▶ Interactive Lab

Kafka Consumer Lag

Producer pushes; consumer reads. Watch lag accumulate or drain.

Advertisement
Lag = producer offset - consumer offset. If consumer falls behind, lag grows.

What you're seeing

Lag is the #1 health metric for any Kafka consumer. Lag → seconds-of-data behind, computed from message timestamps. If lag grows: scale consumers, optimize processing, or check downstream blocks.

Tools: kafka-consumer-groups.sh, Confluent Cloud lag exporters, Datadog/New Relic Kafka integrations.

★ KEY TAKEAWAY
Lag = producer offset - consumer offset. If consumer < producer, lag grows. The #1 health metric.
▶ WHAT TO TRY
  • Set producer > consumer — lag grows.
  • Increase consumer rate — lag drains.