Monedula

Markdown

Part III · Architecture

How it works · Diskless Kafka

How Aiven’s Inkless works

Aiven · vendor implementation · checked against its sources on 8 November 2026

Inkless is Aiven’s fork of Apache Kafka that runs diskless topics today. Brokers write batches from many partitions into one object in object storage, and a PostgreSQL database orders them and assigns offsets; the producer is acked after both. It follows the KIP-1150 idea, but keeps the batch coordinator in PostgreSQL instead of inside Kafka.

Status
Released as open source; version 0.51 (6 November 2026) builds on Kafka 4.1.2, 4.2.2 and 4.3.1. Inkless 0.51 release
License
Apache 2.0 for the Kafka code it forks; AGPLv3 for the Inkless code in storage/inkless. Inkless LICENSE.md
Project stance
Not meant as a long-term fork. Aiven does not accept patches and works on getting the design into Apache Kafka. Inkless README
Managed service
Diskless topics in Aiven for Apache Kafka: limited availability on Aiven’s cloud, and on Inkless plans in BYOC. Aiven docs: diskless topics

The write path, up to the ack

  1. Find a broker

    Diskless partitions have no leader for writes, so metadata returns any broker, or one in the client’s zone when its client.id ends in diskless_az=<zone>.

  2. Buffer

    The broker appends produce requests to a write-ahead log buffer that it closes every 250 ms or at 8 MiB, whichever comes first.

  3. Upload

    The closed buffer is uploaded as one object to S3, Google Cloud Storage or Azure Blob Storage, without offsets. A failed upload is retried, three attempts in all by default.

  4. Commit

    The broker sends each batch’s partition and its place in the object to the batch coordinator, a PostgreSQL database, which commits them in one linear order and so assigns the offsets.

  5. Ackproducer acked

    The broker answers the produce requests in that object. It also keeps the data in its own cache for consumers that read it next.

PostgreSQL commits object wal-0001 and assigns offsets 0-1; only then is the producer acked. broker-2 in az-b called PostgreSQL in az-a, so the commit crossed zones. Step through it in the playground

Where the latency comes from

Inkless performance guide breaks the ack into 3 parts. Drawn to scale:

The source states P99 figures only.

  • Buffer: closes every 250 ms or at 8 MiB
  • Upload: observed on AWS S3: 200 to 400 ms at P99 for 2 to 8 MiB objects
  • Commit: observed on PostgreSQL: about 10 to 20 ms at P99, growing with batches per commit

These are observed numbers from Aiven’s tuning guide, which calls them examples of how tuning and concurrency affect latency rather than targets. It gives no end-to-end figure.

Throughput depends on concurrency: one producer sends one request at a time, so with the default 250 ms interval it is held to about four requests a second. The guide recommends more producers and partitions and a longer linger.ms.

Who orders the batches

Ordering lives in PostgreSQL, one database per cluster. The broker commits batch coordinates to it, and it keeps the total order of each partition. The data path has no leader, but the metadata path does: the database.

Brokers can read through PostgreSQL read replicas to spread lookups. The connection string can be changed at runtime, and setting it empty takes the coordinator out of service without restarting brokers.

The read path

To serve a fetch, the broker asks PostgreSQL for the batches after the consumer’s offset, then looks for the object in its own in-memory cache. On a miss it reads the object from object storage and caches it. It adds the offsets from the batch metadata before answering.

Caches are per broker and not shared. Each partition maps to the same broker within a zone, so consumers in that zone keep hitting a warm cache. Consumers reading old data go through a separate, rate-limitable path so they do not slow down the ones near the head.

In the background, an optional consolidation step rewrites the multi-partition objects into ordinary Kafka log segments in tiered storage, so the topic reads like a tiered topic and PostgreSQL holds less history.

Two consumer groups poll. The az-b broker had the range cached from its own upload; the az-c broker read the object from object storage and caches it now. Step through it in the playground

When something fails

What failsWhat happens
The uploadThe broker retries it, three attempts in all by default, 10 ms apart. Inkless configs
PostgreSQL is unavailableDiskless produce and fetch fail with KAFKA_STORAGE_ERROR, which clients retry; classic topics in the same cluster keep working. Once the database is back, brokers reconnect in the background. Inkless architecture
A brokerIt keeps no diskless data on disk, only a cache in memory. By default each partition maps by hash to an alive broker in the client’s zone, so a lost broker’s partitions move to the others at once, with nothing to copy. Inkless AZ alignment
A broker, with managed replicasWith managed replicas, it leaves the ISR when fenced and rejoins as soon as it is back, with nothing to catch up, since the data is in object storage. Inkless features
Deleting a topic, halfwayThe topic is removed from PostgreSQL before KRaft. If the KRaft step fails, the delete must be retried; a topic left in KRaft loses its data. Inkless features
PostgreSQL is down: the diskless producer is refused with KafkaStorageException and retries, while the classic topic in the same cluster is still acked. Step through it in the playground
The bucket was only slow, 2 s per call, but that is past Inkless’s S3 timeouts: all three upload attempts failed, p1 got KafkaStorageException 6.5 s after it sent the record, and nothing reached PostgreSQL. Step through it in the playground
The only broker in az-b died. Its clients go to a broker in az-c, picked by the simulator’s own hash, which reads the record from object storage; nothing had to be copied. Step through it in the playground

Cross-zone traffic: what goes, what stays

Goes

  • Replication between brokers: there is none
  • Producer traffic, when the client names its zone in client.id
  • Consumer reads, when the client names its zone, served from that zone’s broker

Stays

  • Traffic from clients that do not name their zone
  • Calls to PostgreSQL, wherever it runs
  • Requests to object storage, billed per request

Does it support...

FeatureStatusDetails
Idempotent producer Yes Supported. Inkless features
Transactions No Diskless topics cannot take part in transactions, and read_committed consumers cannot read them. A diskless topic may only appear as the offset key of sendOffsetsToTransaction. Inkless features
Compacted topics No cleanup.policy=compact is not supported. Inkless features
Tiered storage Partly Through consolidation, which rewrites diskless objects into tiered Kafka segments. Off by default (diskless.remote.storage.consolidation.enable); Aiven plans to make it the default. Inkless tiered storage consolidation
Consumer groups Yes The classic and the KIP-848 consumer group APIs are not affected by diskless topics: offsets are committed through Kafka’s group coordinator. Inkless features
Diskless internal topics No System topics are never diskless, whatever the default, and a request to create one as diskless is refused. So __consumer_offsets, which holds committed offsets and group state, stays a classic topic replicated on local disks. Inkless system topics are never diskless (ReplicationControlManager.java)
Share groups No Not supported; the share group APIs are listed as untested. Inkless FAQ
Converting a classic topic Partly Classic to diskless, online, with consolidation turned on. Not back: diskless.enable cannot be turned off once set. Inkless classic-to-diskless switch
Classic and diskless in one request No A produce or fetch request cannot mix diskless and classic topics. Inkless features
Replication factor above 1 Partly With managed replicas (diskless.managed.rf.enable, off by default): metadata-only replicas for rack-aware placement and leadership, with no data copied between brokers. Inkless features

The configs it adds

ConfigLevelWhat it does
inkless.control.plane.classBrokerThe batch coordinator implementation; the default keeps it in memory, for tests. Production uses PostgreSQL. Inkless configs
inkless.storage.backend.classBrokerThe object storage backend. Inkless configs
inkless.produce.commit.interval.msBrokerHow often the write buffer is closed and committed. Default 250. Inkless configs
inkless.produce.buffer.max.bytesBrokerHow large the write buffer grows before it is closed, best effort. Default 8 MiB. Inkless configs
inkless.consume.cache.max.countBrokerHow many objects the broker’s read cache holds. Default 1000. Inkless configs
diskless.managed.rf.enableBrokerAllows a replication factor above 1, as metadata-only replicas. Default false. Inkless features
diskless.remote.storage.consolidation.enableBrokerTurns on consolidation into tiered storage. Default false. Inkless tiered storage consolidation
diskless.enableTopicMakes the topic diskless. Cannot be turned off once set. Inkless topic configs
client.idClientEnding it in diskless_az=<zone> routes the client to brokers in its zone, with any client version. Inkless AZ alignment

How it differs from Apache Kafka

The batch coordinator is a PostgreSQL database, a separate system to run and back up. KIP-1164 keeps the same role inside Kafka, in the internal topic __diskless_metadata with a SQLite index on each coordinator.

Clients name their zone in client.id (diskless_az=<zone>), which works with any client today. KIP-1163 adds client.rack to metadata requests instead; Inkless plans to accept both.

The buffer closes at 8 MiB instead of the KIP’s 4 MiB; the 250 ms interval is the same.

Transactions are not supported. KIP-1163 plans them for transaction protocol v2.

Inkless already switches classic topics to diskless online, and rewrites diskless objects into tiered Kafka segments. The KIPs list topic type changes as later work and leave object merging to KIP-1165.

The managed service differs from the open source code in places. Aiven’s docs add that Kafka Streams state stores are not supported and that a service with no diskless topics for two days has the feature turned off. In BYOC the coordinator runs as an Aiven for PostgreSQL service in the customer’s project.

See it in the simulator

The simulator stretches the timings so each step is visible: a 500 ms buffer interval, a 600 ms upload and a 60 ms commit. Where Inkless’s docs are silent it makes its own choices: brokers refuse diskless produce at once while PostgreSQL is down, and a fetch fails then even when the broker has the data cached. An object whose commit failed is deleted from storage, as Inkless’s code does. A slow bucket takes 2 s per call, and an upload attempt ends 2010 ms after the previous one (the 2 s call timeout plus the 10 ms backoff); an attempt that ends after the bucket recovered succeeds. Its zone hash is its own, not the one Inkless uses. It does not model managed replicas (topics have replication factor 1), PostgreSQL replicas or failover, or consolidation into tiered storage.

The proposals behind it

Sources

Changes to this page

  • Consumer groups and diskless internal topics added to the feature table, and what a broker keeps to the failure table, for the new consumer groups and broker state columns on the diskless hub.
  • A slow object storage bucket, with a simulator step from scenario 07.1.4.
  • Published, with simulator steps from scenarios 07.1.1, 07.1.2 and 07.1.3.
  • First version, against Inkless 0.51 and Aiven’s docs as of 8 November 2026.

All diskless implementations