Monedula

Markdown

Part III · Architecture

How it works · Diskless Kafka

How Apache Kafka’s diskless topics work

Apache Kafka · reference design · checked against its sources on 13 November 2026

A diskless topic has no leader for writes and no replicas to copy to. Any broker buffers records from many partitions, uploads them as one object, and a coordinator assigns the offsets. The producer is acked only after both, so the design trades about half a second of latency for the end of cross-zone replication traffic.

Status
The idea was accepted in March 2026 (KIP-1150). The design, KIP-1163 and KIP-1164, is under discussion. No Apache Kafka release has it. KIP-1150
License
Apache 2.0, part of Apache Kafka
Coexists with
Classic topics in the same cluster. A topic is diskless when diskless.enable is set at creation. KIP-1163
Role on this site
The reference design. Every vendor page says how it differs from this one.

The write path, up to the ack

  1. Send to any broker

    The producer sends to a broker in its own rack, not to a partition leader. Writes have no leader.

  2. Buffer

    The broker collects batches from many partitions until 250 ms pass or 4 MiB pile up. Both limits are configurable.

  3. Build one object

    The buffer becomes one immutable object, a shared log segment. Batches are grouped by partition and carry no offsets yet.

  4. Upload

    The broker writes the object to object storage. If the upload fails, every producer in it gets an error and may retry.

  5. Commit

    The broker sends the batch coordinates to the diskless coordinator, which checks idempotence and transactions and assigns offsets.

  6. Persist the commit

    The coordinator appends the commit to its internal topic __diskless_metadata and waits until the in-sync replicas have it, the acks=all way.

  7. Ackproducer acked

    Only now does the broker answer every produce request in that object, each with its assigned base offset.

The coordinator on broker-3 commits object wal-0001 and assigns offsets in both partitions; only now are both producers acked. Step through it in the playground

Where the latency comes from

KIP-1163 breaks the ack into 3 parts. Drawn to scale:

  • Buffer: up to 250 ms or 4 MiB, whichever comes first
  • Upload: one write of the shared object; 200 to 400 ms at P99
  • Commit: the coordinator round trip; 20 to 50 ms at P99, growing with the number of batches

The end-to-end targets in KIP-1163 are higher than these parts add up to: about 500 ms at P50 and 1 to 2 s at P99. The KIP does not break the difference down.

For comparison, a classic topic with acks=all across three zones is acked once the followers have fetched the batch, usually in single-digit to tens of milliseconds.

One record on each topic: the classic topic acks in 300 ms, the diskless one in 1300 ms. Step through it in the playground

Who orders the batches

Objects mix partitions and carry no offsets, so the log of a diskless partition exists only as metadata. The diskless coordinator owns it. Its source of truth is the internal topic __diskless_metadata. Each of its partitions has a leader, and that leader is the coordinator for the user partitions mapped to it when they were created.

The coordinator keeps a local SQLite database as an index of that topic. It is a cache, not the source of truth: it can be dropped and rebuilt from the topic and its snapshots. Consensus has not gone away. It moved from every user partition to the metadata topic.

The read path

Each replica downloads newly committed batches from object storage into local segments, which act as a cache. A consumer is pointed at a replica in its own rack, so the normal read never crosses a zone.

When a replica is behind, or the offset is older than its cache, the broker asks the coordinator where the batch lives, reads it from object storage, and adds the offsets before it answers.

A consumer in az-b reads the diskless topic from the replica in its own zone. The classic topic next to it paid for two cross-zone replica fetches and a cross-zone read. Step through it in the playground

When something fails

What failsWhat happens
The uploadEvery producer in that object gets an error. Retrying is safe. KIP-1163
The commit, after a good uploadThe object is left orphaned and is deleted later by a background scan. A retry is safe only with the idempotent producer, which stops the batch from being committed twice. KIP-1163
A coordinator movesIts __diskless_metadata partition gets a new leader, which has been reading the same metadata log, and the coordinator’s background work restarts there. A broker that asks the old one gets NOT_COORDINATOR. The KIP does not say how long commits wait meanwhile. KIP-1164
A replica’s brokerDiskless replicas never join the ISR, and the KIP calls a partition with an empty ISR healthy: any replica serves every request. Partition leaders are still elected, for tiered storage and share fetches, and the KIP says diskless replicas eliminate unclean leader elections. It does not say how kafka-topics --describe or the under-replicated and under-min-ISR metrics report such a partition. KIP-1163
The metadata topic cannot take acks=all writesCommits are replicated the acks=all way, so commits stop for every diskless partition that coordinator owns. KIP-1164
Object storage is down: the upload of wal-0002 failed, so no object was written and nothing was committed, and p-clicks got an error it retries; the classic orders topic next to it was acked as usual. The error is KAFKA_STORAGE_ERROR here, the simulator’s choice: the KIP names none. Step through it in the playground

Cross-zone traffic: what goes, what stays

Goes

  • Replication between brokers in different zones
  • Producer traffic, when the producer sets client.rack
  • Consumer reads, while a replica is in the consumer’s rack

Stays

  • Commit calls to the coordinator, which may sit in another zone
  • Consumer reads when no replica is in the consumer’s rack
  • Share group fetches, which always go to the partition leader
  • Requests to object storage, billed per request instead of per GB between zones

For scale, KIP-1150 quotes 0.02 USD per GiB between AWS zones, 0.01 USD on GCP, and no charge on Azure. KIP-1150

Does it support...

FeatureStatusDetails
Idempotent producer Planned The same guarantees as classic topics; the coordinator checks sequence numbers at commit. KIP-1163
Transactions Planned Transaction protocol v2 and later only. A transaction may span classic and diskless partitions. The design is left to a separate KIP. KIP-1163
Tiered storage Yes The partition leader offloads to tiered storage through the KIP-405 interfaces, and replicas serve tiered fetches. KIP-1163
Compacted topics Partly Not compacted directly. KIP-1150 proposes offloading to tiered storage and compacting there. KIP-1150
Consumer groups Planned Consumer groups and their offsets keep the same semantics as on classic topics. The KIPs do not say which group protocols apply or where committed offsets and group state are stored. KIP-1150
Share groups Partly Supported, but ShareFetch always goes to the partition leader, so queue reads are not rack-aware. KIP-1163
Converting a classic topic Unclear KIP-1163 contradicts itself: its config section says a topic is diskless only from creation, while its migration section designs a switch both ways with a hybrid state. KIP-1150 lists topic type changes as later work. KIP-1163
Merging small objects Planned Objects are consolidated into larger ones in the background; the design is KIP-1165. KIP-1165

The configs it adds

ConfigLevelWhat it does
diskless.system.enableBrokerEnables diskless support on the broker. KIP-1163
diskless.storage.class.nameBrokerThe object storage plugin for diskless topics. KIP-1163
diskless.append.commit.interval.msBrokerHow long a shared object stays open before it is uploaded and committed. KIP-1163
diskless.append.buffer.max.bytesBrokerHow large a shared object grows before it is closed for upload. KIP-1163
diskless.metadata.topic.num.partitionsBrokerPartitions of __diskless_metadata, which is also the number of coordinators. KIP-1164
diskless.enableTopicMakes the topic diskless. KIP-1163
client.rackClientLets a producer reach a broker in its own rack, as consumers already do. KIP-1163

Names are from the proposals and may change before release.

See it in the simulator

The simulator stretches the timings so each step is visible: a 500 ms buffer, a 600 ms upload and a 200 ms commit. The order of events follows the KIPs; the durations do not.

The proposals behind it

Sources

Changes to this page

  • Consumer groups added to the feature table, for the new consumer groups and broker state columns on the diskless hub.
  • Diskless replicas and the ISR: KIP-1163 keeps them out of it, and an empty ISR is healthy. The simulator now models that.
  • First version, against KIP-1163 as edited on 15 October 2026 and KIP-1164 as edited on 30 September 2026.

All diskless implementations