---
title: "How Aiven Inkless works: diskless Kafka on PostgreSQL"
description: "Inkless, Aiven’s diskless Kafka fork, step by step: the write path, a PostgreSQL batch coordinator, caching, what it supports and how it differs from KIP-1163."
url: https://monedula.dev/kafka/diskless/aiven-inkless/
---

# 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.

## At a glance

- 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](https://github.com/aiven/inkless/releases/tag/inkless-release-0.51))
- License: Apache 2.0 for the Kafka code it forks; AGPLv3 for the Inkless code in `storage/inkless`. ([Inkless LICENSE.md](https://github.com/aiven/inkless/blob/inkless-release-0.51/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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/README.md))
- 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](https://aiven.io/docs/products/kafka/diskless/concepts/diskless-topic-overview))

## 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. Ack (the producer is acked here): The broker answers the produce requests in that object. It also keeps the data in its own cache for consumers that read it next.

Simulator, [Inkless: the write path](https://monedula.dev/kafka-simulator/scenarios/inkless-write-path/) step 4: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.1&t=3)

## Where the latency comes from

Source: [Inkless performance guide](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/PERFORMANCE.md).

| Part | P50 | P99 | Notes |
| --- | --- | --- | --- |
| Buffer | not stated | 250 ms | closes every 250 ms or at 8 MiB |
| Upload | not stated | 400 ms | observed on AWS S3: 200 to 400 ms at P99 for 2 to 8 MiB objects |
| Commit | not stated | 20 ms | observed on PostgreSQL: about 10 to 20 ms at P99, growing with batches per commit |
| Sum | not stated | 670 ms | |

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.

Simulator, [Inkless: the write path](https://monedula.dev/kafka-simulator/scenarios/inkless-write-path/) step 5: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.1&t=4)

## When something fails

- The upload: The broker retries it, three attempts in all by default, 10 ms apart. ([Inkless configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/configs.rst))
- PostgreSQL is unavailable: Diskless 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/ARCHITECTURE.md))
- A broker: It 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/CLIENT-BROKER-AZ-ALIGNMENT.md))
- A broker, with managed replicas: With 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md))
- Deleting a topic, halfway: The 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md))

Simulator, [Inkless: PostgreSQL goes down](https://monedula.dev/kafka-simulator/scenarios/inkless-postgresql-outage/) step 5: PostgreSQL is down: the diskless producer is refused with KafkaStorageException and retries, while the classic topic in the same cluster is still acked. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.2&t=4)

Simulator, [Inkless: object storage turns slow](https://monedula.dev/kafka-simulator/scenarios/inkless-slow-object-storage/) step 3: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.4&t=2)

Simulator, [Inkless: a broker dies](https://monedula.dev/kafka-simulator/scenarios/inkless-broker-failure/) step 3: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.3&t=2)

## Cross-zone traffic

What 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

What stays:

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

## Feature support

| Feature | Status | Details |
| --- | --- | --- |
| Idempotent producer | Yes | Supported. [Inkless features](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md) |
| 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md) |
| Compacted topics | No | `cleanup.policy=compact` is not supported. [Inkless features](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md) |
| 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/DISKLESS_CONSOLIDATION.md) |
| 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md) |
| 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)](https://github.com/aiven/inkless/blob/inkless-release-0.51/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java#L892-L913) |
| Share groups | No | Not supported; the share group APIs are listed as untested. [Inkless FAQ](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FAQ.md) |
| 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/CLASSIC_TO_DISKLESS_SWITCH.md) |
| Classic and diskless in one request | No | A produce or fetch request cannot mix diskless and classic topics. [Inkless features](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md) |
| 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](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md) |

## Configs

| Config | Level | What it does |
| --- | --- | --- |
| `inkless.control.plane.class` | Broker | The batch coordinator implementation; the default keeps it in memory, for tests. Production uses PostgreSQL. [Inkless configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/configs.rst) |
| `inkless.storage.backend.class` | Broker | The object storage backend. [Inkless configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/configs.rst) |
| `inkless.produce.commit.interval.ms` | Broker | How often the write buffer is closed and committed. Default 250. [Inkless configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/configs.rst) |
| `inkless.produce.buffer.max.bytes` | Broker | How large the write buffer grows before it is closed, best effort. Default 8 MiB. [Inkless configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/configs.rst) |
| `inkless.consume.cache.max.count` | Broker | How many objects the broker’s read cache holds. Default 1000. [Inkless configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/configs.rst) |
| `diskless.managed.rf.enable` | Broker | Allows a replication factor above 1, as metadata-only replicas. Default false. [Inkless features](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md) |
| `diskless.remote.storage.consolidation.enable` | Broker | Turns on consolidation into tiered storage. Default false. [Inkless tiered storage consolidation](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/DISKLESS_CONSOLIDATION.md) |
| `diskless.enable` | Topic | Makes the topic diskless. Cannot be turned off once set. [Inkless topic configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/topic_configs.rst) |
| `client.id` | Client | Ending it in `diskless_az=<zone>` routes the client to brokers in its zone, with any client version. [Inkless AZ alignment](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/CLIENT-BROKER-AZ-ALIGNMENT.md) |

## 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

- Simulator, [Inkless: the write path](https://monedula.dev/kafka-simulator/scenarios/inkless-write-path/) step 4: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.1&t=3)
- Simulator, [Inkless: the write path](https://monedula.dev/kafka-simulator/scenarios/inkless-write-path/) step 5: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.1&t=4)
- Simulator, [Inkless: PostgreSQL goes down](https://monedula.dev/kafka-simulator/scenarios/inkless-postgresql-outage/) step 5: PostgreSQL is down: the diskless producer is refused with KafkaStorageException and retries, while the classic topic in the same cluster is still acked. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.2&t=4)
- Simulator, [Inkless: object storage turns slow](https://monedula.dev/kafka-simulator/scenarios/inkless-slow-object-storage/) step 3: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.4&t=2)
- Simulator, [Inkless: a broker dies](https://monedula.dev/kafka-simulator/scenarios/inkless-broker-failure/) step 3: 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. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=07.1.3&t=2)

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

- [KIP-1150 explained: diskless topics in Apache Kafka](https://monedula.dev/kafka/kips/kip-1150/)

## Sources

- [Inkless 0.51 release](https://github.com/aiven/inkless/releases/tag/inkless-release-0.51)
- [Inkless README](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/README.md)
- [Inkless architecture](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/ARCHITECTURE.md)
- [Inkless features](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FEATURES.md)
- [Inkless performance guide](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/PERFORMANCE.md)
- [Inkless configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/configs.rst)
- [Inkless topic configs](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/topic_configs.rst)
- [Inkless AZ alignment](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/CLIENT-BROKER-AZ-ALIGNMENT.md)
- [Inkless classic-to-diskless switch](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/CLASSIC_TO_DISKLESS_SWITCH.md)
- [Inkless tiered storage consolidation](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/DISKLESS_CONSOLIDATION.md)
- [Inkless FAQ](https://github.com/aiven/inkless/blob/inkless-release-0.51/docs/inkless/FAQ.md)
- [Inkless system topics are never diskless (ReplicationControlManager.java)](https://github.com/aiven/inkless/blob/inkless-release-0.51/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java#L892-L913)
- [Inkless LICENSE.md](https://github.com/aiven/inkless/blob/inkless-release-0.51/LICENSE.md)
- [Aiven docs: diskless topics](https://aiven.io/docs/products/kafka/diskless/concepts/diskless-topic-overview)
- [Aiven docs: diskless limitations](https://aiven.io/docs/products/kafka/diskless/concepts/limitations)
- [Aiven docs: diskless architecture](https://aiven.io/docs/products/kafka/diskless/concepts/diskless-topics-architecture)

## Changes to this page

- 15 November 2026: 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.
- 14 November 2026: A slow object storage bucket, with a simulator step from scenario 07.1.4.
- 11 November 2026: Published, with simulator steps from scenarios 07.1.1, 07.1.2 and 07.1.3.
- 8 November 2026: First version, against Inkless 0.51 and Aiven’s docs as of 8 November 2026.
