IntermediatePerformance
How does Kafka achieve low latency with acks=all?
Reference answer
Even with acks=all, Kafka achieves low latency through: 1) Sequential disk writes (fsync is usually not called — Kafka relies on OS page cache). 2) Pipelining: multiple in-flight ProduceRequests simultaneously. 3) Follower replication is fast (local LAN, tens of MB/s). 4) Broker uses Purgatory with TimingWheel for efficient waiting (no thread blocking per request). 5) Zero-copy for log reads. In practice, acks=all p99 latency is typically 5-20ms on a local cluster, mainly bottlenecked by network round trip to follower and disk flush.
Expected key concepts: sequential disk writes, pipelining, in-flight requests, follower replication, Purgatory, TimingWheel, zero-copy, 5-20ms, network round trip