Kafka easy
Once a message is successfully appended to a Kafka partition log, what is its mutability status?
- A It can be modified at any time by the original producer using a 'PATCH' request.
- B It is immutable. Kafka is a write-once, append-only log where existing messages cannot be changed or deleted in-place.
- C It can be updated, but only if it hasn't been replicated to a follower node yet.
- D It becomes mutable after 24 hours to allow for data cleanup.
Answer: B. It is immutable. Kafka is a write-once, append-only log where existing messages cannot be changed or deleted in-place.
Immutability is central to Kafka's performance. By ensuring data never changes, Kafka can rely on sequential disk I/O and efficiently serve multiple consumers simultaneously from the Page Cache without complex locking mechanisms.
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?
- 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?
- When a Producer sends a message with a specific 'Key', how does Kafka interpret this for shard distribution?