Scenario 12.1.4 · Nisshi: reading through another broker
Nisshi diskless Kafka: reading through another broker
Nisshi 0.8.2 on S3 · a consumer on the writing broker sees a record at its next poll, one on another broker when that broker's 5 s copy of watermark.json expires; group changes travel at the 500 ms group poll.
Run this scenario in the playgroundBoth groups read offset 0. t+0.600s
p1 writes through broker-1: offset 0 is stored at 500 and acked at 501. g1's c1 polls broker-1 and g2's c2 polls broker-2 at 600; neither broker held a copy of orders-0's watermark.json yet, so both read it from S3 and both see offset 0.
Open at this step: step 1, Both groups read offset 0p1 writes offset 1 through broker-1. t+1.901s
broker-1 writes orders-0's watermark.json (version 2) at 1600, the batch at 1900, and p1 is acked at 1901. broker-1's own copy now says high watermark 2; broker-2's copy, read at 600, still says 1.
Open at this step: step 2, p1 writes offset 1 through broker-1c1 reads offset 1; c2 does not see it yet. t+3.000s
c1 on broker-1 reads offset 1 at its 2400 poll. c2 polls broker-2 at 2400 and 3000 and gets nothing: broker-2 serves from its copy of watermark.json, which is younger than 5 s.
Open at this step: step 3, c1 reads offset 1; c2 does not see it yetbroker-2's copy is 5 s old: c2 reads offset 1. t+6.000s
broker-2's copy expired at 5600. At c2's 6000 poll broker-2 reads watermark.json again (high watermark 2) and serves offset 1, 4.1 s after it was acked.
Open at this step: step 4, broker-2's copy is 5 s old: c2 reads offset 1c3 joins g2 through broker-3. t+7.000s
c3 joins g2 at 7000 and is hashed to broker-3 (the simulator's choice). The group's state lives in the storage engine, not in a coordinator broker. c2 waits on broker-2 and c3 on broker-3, so the change reaches them at their brokers' next poll of the stored group state, every 500 ms.
Open at this step: step 5, c3 joins g2 through broker-3At the 500 ms poll c2 gets orders-0 and orders-1, c3 orders-2. t+7.500s
The new assignment lands at 7500, the first 500 ms tick after the simulator's 300 ms rebalance step. g2 uses the classic protocol (range), the one Nisshi implements: c2 gets orders-0 and orders-1, c3 gets orders-2.
Open at this step: step 6, At the 500 ms poll c2 gets orders-0 and orders-1, c3 orders-2What you start with
On Nisshi's S3 engine a broker reads a partition's high watermark through its own copy of watermark.json and reads it again once the copy is 5 s old: the object store cache in the code. The broker that wrote a record knows it at once; another broker learns it when its copy expires. Consumer group state lives in the storage engine too, and each broker polls it every 500 ms. p1 and group g1 talk to broker-1, group g2 to broker-2.
Step by step
- Both groups read offset 0 t+0.600s p1 writes through broker-1: offset 0 is stored at 500 and acked at 501. g1's c1 polls broker-1 and g2's c2 polls broker-2 at 600; neither broker held a copy of orders-0's watermark.json yet, so both read it from S3 and both see offset 0. Open at this step: step 1, Both groups read offset 0
- p1 writes offset 1 through broker-1 t+1.901s broker-1 writes orders-0's watermark.json (version 2) at 1600, the batch at 1900, and p1 is acked at 1901. broker-1's own copy now says high watermark 2; broker-2's copy, read at 600, still says 1. Open at this step: step 2, p1 writes offset 1 through broker-1
- c1 reads offset 1; c2 does not see it yet t+3.000s c1 on broker-1 reads offset 1 at its 2400 poll. c2 polls broker-2 at 2400 and 3000 and gets nothing: broker-2 serves from its copy of watermark.json, which is younger than 5 s. Open at this step: step 3, c1 reads offset 1; c2 does not see it yet
- broker-2's copy is 5 s old: c2 reads offset 1 t+6.000s broker-2's copy expired at 5600. At c2's 6000 poll broker-2 reads watermark.json again (high watermark 2) and serves offset 1, 4.1 s after it was acked. Open at this step: step 4, broker-2's copy is 5 s old: c2 reads offset 1
- c3 joins g2 through broker-3 t+7.000s c3 joins g2 at 7000 and is hashed to broker-3 (the simulator's choice). The group's state lives in the storage engine, not in a coordinator broker. c2 waits on broker-2 and c3 on broker-3, so the change reaches them at their brokers' next poll of the stored group state, every 500 ms. Open at this step: step 5, c3 joins g2 through broker-3
- At the 500 ms poll c2 gets orders-0 and orders-1, c3 orders-2 t+7.500s The new assignment lands at 7500, the first 500 ms tick after the simulator's 300 ms rebalance step. g2 uses the classic protocol (range), the one Nisshi implements: c2 gets orders-0 and orders-1, c3 gets orders-2. Open at this step: step 6, At the 500 ms poll c2 gets orders-0 and orders-1, c3 orders-2
The takeaway
A record written through broker-1 reached c1 at its next poll, and reached c2, on broker-2, only when broker-2's copy of watermark.json was 5 s old and read again: 4.1 s after the ack here, and anywhere from 0 to 5 s in general. Group changes travel through storage as well: c3's join was stored, and the members on two brokers got the new assignment at their brokers' 500 ms poll of the group state (--group-poll-interval). No coordinator broker took part: FindCoordinator answers the broker that received it. Simulator choices: the pinned brokers and the hash for c3, a copy that lives exactly 5 s, the poll ticks counted from the start of the scene, and the 300 ms rebalance step.
Configs in this scenario
-
--group-poll-intervalA Nisshi broker option, 500 ms by default, for how often a broker reads the stored consumer group state, so a group change made through another broker reaches its members within that interval.
Embed this scenario
Paste this into a blog post, a course page or your team's docs. The scenario plays inside your page, and the link under it points readers to this walkthrough.
<iframe src="https://monedula.dev/kafka-simulator/embed/?scenario=12.1.4" title="Kafka Simulator: Nisshi: reading through another broker" width="100%" height="520" style="border:1px solid #d0d0d0;border-radius:8px" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<p><a href="https://monedula.dev/kafka-simulator/scenarios/nisshi-reading-through-another-broker/">Nisshi diskless Kafka: reading through another broker</a></p> Further reading
Nisshi v0.8.2 source on GitHub
More in Diskless
- Diskless Kafka topics (KIP-1163): the write path
- Diskless vs classic Kafka: cross-AZ replication traffic
- Diskless Kafka produce latency: the price of object storage
- Diskless Kafka (KIP-1163): when object storage goes down
- Aiven Inkless diskless Kafka: the write path
- Aiven Inkless: what a PostgreSQL outage does to Kafka
- Aiven Inkless: what losing a Kafka broker costs
- Aiven Inkless: a slow S3 bucket fails Kafka produce
- KafScale diskless Kafka: etcd lease, S3 segment, ack
- KafScale 2.1 diskless Kafka: a lease owner crashes
- KafScale 2.1 diskless Kafka: when etcd goes down
- KafScale 2.1 diskless Kafka: when S3 goes down
- KafScale 2.1 proxy: etcd down past the 60 s cache TTL
- KafScale 2.1: a Kafka producer timeout that still wrote
- KafScale 2.1 diskless Kafka: lease handover, no overwrite
- KafScale 2.1 diskless Kafka: a paused broker comes back
- AutoMQ diskless Kafka: one S3 WAL per broker, then ack
- AutoMQ diskless Kafka: a broker crash and WAL failover
- AutoMQ diskless Kafka: moving a partition, no copying
- AutoMQ diskless Kafka: zone router, no cross-zone data
- AutoMQ diskless Kafka: when S3 goes down
- WarpStream diskless Kafka: the write path through Agents
- WarpStream Kafka: a leader per client, a cache per zone
- WarpStream Kafka: an Agent dies mid-commit
- WarpStream Kafka: the control plane goes down
- WarpStream Kafka Ripcord: produce without the control plane
- WarpStream Kafka lightning topics: ack before the commit
- WarpStream Kafka transactions in the control plane
- Redpanda Kafka write path: the offset comes after S3
- Redpanda Kafka leader crash: a Raft election, no replay
- Redpanda Kafka S3 outage: uploads time out, Raft holds
- Redpanda Kafka L0 to L1: the LRO and who serves a read
- Redpanda Kafka transactions: exactly-once on Cloud Topics
- Nisshi diskless Kafka: watermark.json, then the batch
- Nisshi diskless Kafka on PostgreSQL: a row lock per write
- Nisshi diskless Kafka: two brokers write one partition
- Nisshi diskless Kafka: a broker dies mid-write
- Nisshi diskless Kafka: when PostgreSQL goes down
- Nisshi diskless Kafka: what 0.8.2 refuses
- Ursa for Kafka write path: Oxia assigns the offset
- Ursa for Kafka zones: the zonal owner and the zone cache
- Ursa for Kafka compaction: from WAL objects to Parquet
- Ursa for Kafka broker failure: a kill and a silent broker
- Ursa for Kafka: diskless and disk topics, side by side