Scenario: Kafka consumer lag climbs mid-campaign Intermediate
Estimated reading time: 1 min read
Four incidents hit one consumer group back to back on campaign night. Each step has a fix “everyone has tried once” and a fix that is actually right.
- Read the CLI output and metrics carefully before choosing: the answer is usually in individual partitions, not in the total.
- If you pick wrong, read the explanation and Choose again. Only your first choice at each step counts toward the score.
11.11 campaign: order-events lag keeps growing
You are on call for the fulfillment service, which reads the order-events topic (12 partitions, 12 pods) and calls the warehouse API. Every choice immediately shows its consequences on the metrics below.
Step 1/4 · Lag is growing, but where?
20:10, the campaign started 30 minutes ago. Alert: orders reach the warehouse 17 minutes late, against a 1-minute SLO. The producer writes 2,400 events/s; each pod handles about 400 events/s, 4,800/s for the whole group, plenty of headroom. You run kafka-consumer-groups.sh --describe.
- message key
- merchantId
- merchant M-001 (flagship)
- 38% of campaign traffic
- partition 7 receives
- ~1,000 events/s, consumer handles 400/s
PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG CONSUMER-ID 6 1204511 1205380 869 fulfillment-6-… 7 3880120 4291402 411282 fulfillment-7-… 8 1198004 1198760 756 fulfillment-8-… ... remaining 9 partitions: LAG < 1,000
What do you do?
When you finish, read Consumer lag in Kafka for the full diagnostic tree and how to alert on time lag.