Operating Kafka requires monitoring key metrics — especially consumer lag (how far behind consumers are) — plus broker health, throughput, and partition status. Understanding monitoring and consumer lag is important for running Kafka reliably.
Consumer lag (a key metric)
CONSUMER LAG → how far BEHIND a consumer is = (latest offset) − (consumer's committed offset):
→ high/growing lag → the consumer can't keep up with the production rate (a problem!)
→ indicates: slow processing, too few consumers, a stuck/failed consumer, or a traffic spike
→ monitor lag → detect when consumers fall behind (a primary Kafka health signal)
