L'operazione di Kafka richiede monitoraggio delle metriche chiave — soprattutto consumer lag (quanto indietro sono i consumer) — oltre alla salute dei broker, al throughput e allo stato delle partizioni. Comprendere il monitoraggio e il consumer lag è importante per gestire Kafka in modo affidabile.
Consumer lag (una metrica chiave)
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)
