Kafka easy
Kafka achieves industry-leading throughput by heavily leveraging 'Sequential I/O'. How does this maximize physical hardware performance?
- A It writes data by appending to the end of a log file, which avoids the massive latency costs of random disk seeks on HDDs and SSDs.
- B It encrypts the data into a sequence of prime numbers.
- C It skips the disk entirely and stores everything in the CPU's L2 cache.
- D It writes messages in alphabetical order based on the user's name.
Answer: A. It writes data by appending to the end of a log file, which avoids the massive latency costs of random disk seeks on HDDs and SSDs.
Sequential writes are nearly as fast as RAM on modern hardware. By modeling every partition as a simple log file that only grows, Kafka avoids the complex tree-balancing and random-access overhead common in traditional databases.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When implementing 'Exactly-Once Semantics' (EOS) in a Kafka stream, what is the role of the `isolation.level=read_committed` setting on the Consumer?
- Historically, which external service was required by Kafka to manage cluster hierarchy, metadata, and leader election status?
- Once a message is successfully appended to a Kafka partition log, what is its mutability status?
- In a Kafka cluster, what is the role of a 'Broker'?
- What is the primary indicator of a bottleneck in a Kafka consumer's processing logic?
- What is the primary architectural role of Apache Kafka in a distributed system?