Self-test
Check your understanding
Self-test10 questions
What is a segment, how is it named, and when does a new one start?
Why does Kafka store producer batches exactly as received? What does that enable on the read path?
Why are the offset and time indexes sparse?
Why does Kafka rely on the page cache instead of a JVM heap cache, and what does that mean for broker sizing?
How can data outlive
retention.ms? How would you enforce retention more precisely?retention.bytesis 1 GiB on a 12-partition topic with RF 3. How much disk can it use across the cluster?What does compaction guarantee to keep, and what happens to offsets of surviving records?
What's a tombstone, and why is it kept for
delete.retention.msrather than removed immediately?Which internal topics are compacted, and what happens if the log cleaner stops?
- Design question
Choose cleanup policies and retention for: payment events, the current price of every product, a CDC stream of the users table, and a 7-year audit log.