Monedula

Scenario 12.1.1 · Nisshi: the write path

Nisshi diskless Kafka: watermark.json, then the batch

Diskless · Advanced · about 3 min · Apache Kafka 4.4 · Nisshi 0.8.2

Nisshi 0.8.2 on S3 · a conditional write of the partition's watermark.json takes the offsets, the batch is written as its own object, meta.json records the sequence, then the producer is acked; every broker answers as node 111.

Run this scenario in the playground

A conditional write of watermark.json takes offset 0. t+0.200s

Before any data is written, broker-1 writes orders-0's watermark.json in S3 against the version it holds. It held no copy, so it creates the document: version 1, high watermark 1. Offset 0 is p1's now, before the batch exists. 50 ms per conditional write is the simulator's figure.

Open at this step: step 2, A conditional write of watermark.json takes offset 0

What you start with

Nisshi (formerly Tansu) is a Kafka-compatible broker written in Rust under the Apache 2.0 license, maintained by Solace since October 2026; this track models release 0.8.2. Its brokers keep no data: a storage engine, chosen when a broker starts (--storage-engine), holds every record, and every broker answers Metadata as node 111. On its S3 engine, which Nisshi's docs call experimental, a broker takes a request's offsets with a conditional write of the partition's watermark.json, then writes the batch as its own object. p1 (idempotent, acks=all) and consumer group g1 both talk to broker-1. The timings are the simulator's: 50 ms per conditional write, 300 ms per PUT.

Step by step

  1. p1 sends to broker-1; every broker answers as node 111 t+0.150s Nisshi's brokers keep no data, so every broker answers Metadata as node 111 for every partition and a client talks to whichever broker it reached. p1 (idempotent, acks=all) and g1 are pinned to broker-1 (the simulator names the broker; Nisshi's docs do not say how clients spread). At 150 broker-1 takes p1's record for orders-0 into a produce request. Open at this step: step 1, p1 sends to broker-1; every broker answers as node 111
  2. A conditional write of watermark.json takes offset 0 t+0.200s Before any data is written, broker-1 writes orders-0's watermark.json in S3 against the version it holds. It held no copy, so it creates the document: version 1, high watermark 1. Offset 0 is p1's now, before the batch exists. 50 ms per conditional write is the simulator's figure. Open at this step: step 2, A conditional write of watermark.json takes offset 0
  3. The batch is written as its own object t+0.500s broker-1 PUTs the request's batch to orders/0/records/00000000000000000000.batch, named by its first offset: one object per produce request and partition. 300 ms per PUT is the simulator's figure. Open at this step: step 3, The batch is written as its own object
  4. meta.json records p1's sequence, then the ack t+0.551s p1 is idempotent, so broker-1 then writes p1's sequence for orders-0 into meta.json (version 1) at 550, and answers. The ack reaches p1 1 ms later (a simulator choice), 401 ms after the batch was flushed: every acks value waits for storage. Open at this step: step 4, meta.json records p1's sequence, then the ack
  5. c1 on broker-1 reads offset 0 t+0.600s c1 polls broker-1, which wrote the watermark itself, so its copy already says high watermark 1: it lists the batch objects and reads offset 0. For orders-1 and orders-2 broker-1 holds no copy yet, so the fetch reads their watermark.json (high watermark 0). Open at this step: step 5, c1 on broker-1 reads offset 0
  6. Each partition has its own watermark.json t+1.800s p1's second record goes to orders-1: broker-1 writes orders-1's watermark.json (version 1) at 1000, PUTs its batch until 1300, writes meta.json version 2 at 1350, and p1 is acked at 1351. c1 reads it at its 1800 poll. kafka-topics.sh --describe shows Leader: 111 Replicas: 111 Isr: 111 for every partition. Open at this step: step 6, Each partition has its own watermark.json

The takeaway

On the S3 engine a produce request takes three steps in object storage: a conditional write of the partition's watermark.json takes the offsets, a PUT writes the batch as its own object named by its first offset, and for an idempotent producer a conditional write of meta.json records its sequence. Only then is the producer acked. A consumer on the broker that wrote the watermark reads the record at its next poll, and each partition has its own watermark.json. No broker holds a replica: every broker answers as node 111, which kafka-topics.sh --describe shows as Leader: 111 Replicas: 111 Isr: 111. Simulator choices: the pinned brokers, the 50 ms conditional write and 300 ms PUT, and the response 1 ms after the last step.

Configs in this scenario

  • --storage-engine A Nisshi broker option naming the storage engine that keeps every record, watermark, consumer group and offset: PostgreSQL, its production engine, or S3, which its docs call experimental, among others.
  • acks How many replicas must have a write before the producer counts it as sent: 0 (none), 1 (the leader only) or all (every in-sync replica, the default, and required for idempotence). How acks works

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.1" title="Kafka Simulator: Nisshi: the write path" 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-write-path/">Nisshi diskless Kafka: watermark.json, then the batch</a></p>

Further reading

Nisshi v0.8.2 source on GitHub

More in Diskless

All scenarios