Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. 45-Day Plan
  3. Day 39

Day 39 of 45 · Pro lesson

Apache Kafka Architecture & Mechanics

The curriculum for this day stays visible. The lesson, code, and workspace unlock with Pro.

Teaches: Distributed commit log architecture, Brokers, topics, partitions & segments, Message keys & deterministic partition routing, Producers: acks (0, 1, all) & idempotence, Consumer groups, rebalancing & offset commit semantics, Lag monitoring & consumer scale limits

Build: Kafka streaming simulator: producer partition router with hashing, multi-consumer group coordinator, offset commit manager, and lag spike monitor.

  • •Complete 15 drills on partition hashing, producer acks trade-offs, consumer group rebalances, and lag calculations.
  • •Run 6 Python modules simulating partition assignment, rebalance stop-the-world pauses, and offset commits.
  • •Simulate 5 production failures: consumer lag explosion, hot partition skew from null keys, duplicate delivery on rebalance, and broker disk exhaustion.
  • •Defend 10 senior Kafka architecture questions and pass the blank-page challenge.

Partition count is the fundamental unit of parallelism. You cannot have more active consumers in a consumer group than partitions in a topic.

This section walks through the idea with a short example, then the trade-offs you should mention in an interview.

In practice you start from the raw rows, apply the transform step by step, and check the shape of the result before you move on.

A common mistake is to jump straight to the final query without naming the grain or the join keys that keep the result correct.

Once the core path works, you harden it for nulls, duplicates, and late data so the pipeline stays reliable under load.

The Pro write-up covers the full explanation, worked examples, and the code you can run in the studio.

# Locked example
result = transform(frame)
print(result.head())

Sign in to continue with Pro

Sign in with a Pro account to open the full lesson and in-browser workspace.

Sign in

Already on Pro? Go to your account. Need a pass? See pricing.