CrackOps
Interview PrepTracksLinuxAWS LabSoonInterview RoomSoon
Sign inStart free
CrackOps

Interview prep for the people who keep production up.

[email protected]
ProductInterview PrepTracksDashboardInterview Room
RolesDevOpsSREPlatformCloud
CompanyAboutContactPrivacyTerms
© CrackOps
Tracks/Production Incidents
Advanced 5 minTroubleshooting

Consumer lag keeps climbing, consumers are flat out and brokers look fine. How do you find the bottleneck?

Scenario

On a professional social network, the notif-enricher consumer group reads a 48-partition engagement-events topic (about 30,000 events a second at peak). For each event it looks up the member's notification preferences through an internal service backed by MySQL, then writes a notification row to Cassandra. Lag started climbing at 10:40. Broker CPU, disk and produce latency are normal, with no under-replicated partitions. The on-call engineer scaled the consumers from 24 to 60 pods, and lag kept growing.

The interviewer asks

“Lag on this consumer group has grown to 18 million records and notifications are 40 minutes late. The brokers look healthy and every consumer is busy. Walk me through how you find the bottleneck, what you do right now, and what you change so it doesn't happen again.”

The 30-second answer

Lag grows when the arrival rate exceeds the group's processing capacity, which is roughly partitions divided by the time per record when each partition is processed sequentially. So I'd measure both. poll-idle-ratio near zero confirms the consumers are processing-bound, and per-stage timings show where the time goes, usually a per-record call to a slower downstream dependency. I'd also check the shape of the lag across partitions: uniform means systemic, a single partition means a hot key or a poison message. Mitigation is to stop scaling past the partition count, fix or cache the slow dependency, and skip stale low-value events if the business agrees. Then batch lookups and writes, process in parallel within each partition while keeping per-key order, and alert on lag in seconds and on capacity headroom.

Sign in to finish this question

A free account unlocks the rest of it, and saves your progress across every track.

  • The voiced mock interview (5 min)
  • The full senior answer, step by step
  • Animated architecture diagrams
  • The whole conversation, 12 turns
  • Deep dive: how it works, mistakes, risks and trade-offs
  • 3 copy-ready command snippets
  • 4 follow-up questions they'll ask next
  • A self-check of 8 things interviewers listen for
Create a free accountSign in

More Production Incidents interview questions

  • The end-of-day settlement batch used to finish by 06:00 and now ends at 09:00. How do you find out why?
  • The database failed over, but the application keeps talking to the old primary. What do you do?
  • Playback failures spike for 3% of APAC viewers while CPU, memory and pods look fine. How do you triage it?
  • Kafka lag hits two minutes during a surge, but the consumers are idle. Where do you look?
  • p99 latency on the Redis session store jumps 40x mid-match while p50 is fine. How do you find the cause?
  • Payment success rate has dropped for one bank only. How do you find out whose problem it is and protect users?
All Production Incidents questions

Linux commands for this track

  • strace Trace the system calls a process makes
  • ltrace Trace the library calls a program makes
  • lsof List open files, sockets and the processes holding them
  • dmesg Read the kernel's message log
  • perf Profile where CPU time goes, kernel and user space
  • gdb Debug crashes, core dumps and hung processes
  • coredumpctl Find and open core dumps captured by systemd
  • sar Collect and replay system activity history