---
title: "Ursa for Kafka: diskless and disk topics, side by side"
description: "Ursa for Kafka refuses a transactional producer on a diskless topic with INVALID_REQUEST, and compaction there; a disk topic in the same cluster has both."
url: https://monedula.dev/kafka-simulator/scenarios/ursa-diskless-and-disk-topics/
---

# Ursa for Kafka: diskless and disk topics, side by side

Scenario 13.1.5 · Ursa for Kafka: diskless and disk topics side by side. Diskless · Advanced · about 4 min · Apache Kafka 4.4 · StreamNative Ursa for Kafka.

StreamNative Ursa for Kafka · one cluster holds a diskless topic and a disk topic: a transactional producer is refused on the diskless one with INVALID_REQUEST and commits on the disk one, a compacted topic can only be a disk topic, and only the disk topic's records cross zones here.

Run it: https://monedula.dev/kafka-simulator/playground/?scenario=13.1.5

## What you start with

Ursa for Kafka chooses per topic. A topic with ursa.storage.enable=true is diskless: one replica per partition, its records go through a zonal owner in the client's zone into WAL objects in object storage, and Oxia assigns the offsets. Any other topic is a disk topic, classic Kafka with replicas on the brokers' disks. Here orders is diskless, and payments is a disk topic with three replicas and min.insync.replicas 2. Two transactional producers write, one per topic: tx-orders (client.id: zone_id=az-a) to orders and tx-payments (az-b) to payments. Ursa does not support transactions on diskless topics yet, so it refuses tx-orders' produce with INVALID_REQUEST. payments takes the same transaction as classic Kafka does in scenario 04.2.1. accounts asks for ursa.storage.enable=true with cleanup.policy=compact, which Ursa refuses too. p-orders (client.id: zone_id=az-a) has no transactional.id and writes to orders. The timings are slowed so each phase gets its own frame (a simulator choice).

## Step by step

1. **One Ursa cluster: orders is diskless, payments is a disk topic** (t+0.000s): Three brokers, one in each zone (az-a, az-b, az-c), and three KRaft controllers. orders has ursa.storage.enable=true: it is diskless, with one replica per partition, and its records go through a zonal owner in the client's zone into WAL objects in object storage. payments is a disk topic: classic Kafka, one partition with three replicas on the brokers' disks, one per zone, and min.insync.replicas 2. accounts asked for ursa.storage.enable=true together with cleanup.policy=compact; frame 4 shows what became of it. tx-orders (client.id: zone_id=az-a) and tx-payments (az-b) are transactional producers, one per topic. p-orders (client.id: zone_id=az-a) writes to orders with no transactional.id. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.5&t=0)
2. **A transactional producer on orders is refused: INVALID_REQUEST** (t+0.150s): tx-orders began a transaction at 100 and sent order-1 (key k1, orders-2). Its first produce, at 150, was refused with INVALID_REQUEST: Ursa does not support transactions on diskless topics yet (its docs say "coming soon"), and it rejects a transactional producer's produce to one. This is Ursa's rule, not the simulator's. Nothing reached a broker's buffer; nothing was uploaded or committed, and orders-2 holds no record. The error is not retriable, so tx-orders stops. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.5&t=1)
3. **A transactional producer on payments commits** (t+1.200s): tx-payments began a transaction at 600 and sent payment-1 and payment-2 to payments-0. broker-3 in az-c, the leader of payments-0, appended them at offsets 0 and 1 at 650. The followers broker-1 (az-a) and broker-2 (az-b) fetched them at 950, the high watermark moved to 2 and tx-payments was acked. The commit at 1200 moved the last stable offset of payments-0 to 2, so a read_committed consumer would now read both records. This is a classic transaction on a disk topic, as in scenario 04.2.1: Ursa's disk topics support transactions. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.5&t=2)
4. **A compacted topic can only be a disk topic** (t+1.350s): accounts asked for ursa.storage.enable=true together with cleanup.policy=compact. Ursa does not support compacted diskless topics yet (its docs say "coming soon"), so it refuses the combination: Ursa's rule again, not the simulator's. The simulator shows the refusal by creating accounts as a disk topic, with the three replicas it asked for, and lists the config issue in the Why tab; on a disk topic compaction works as on classic Kafka. Select orders to see what a diskless topic refuses. Meanwhile p-orders, which has no transactional.id, sent order-2 (key k10, orders-0) at 1300, and broker-1, its zonal owner in az-a, buffered it into WAL object wal-0001 at 1350, with no offset yet. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.5&t=3)
5. **payments replicates across zones; orders keeps its data in object storage** (t+2.650s): broker-1 uploaded wal-0001 at 1850 and Oxia committed it at 2650: order-2 got offset 0 on orders-0, and p-orders was acked. The record went from p-orders to broker-1 in its own zone and from there to object storage. orders-0 has one replica, and no broker in another zone copied the record. payments-0 has a replica in each zone, and its two records crossed zones three times each: from tx-payments in az-b to broker-3 in az-c, and from there to the followers of payments-0 in az-a and az-b. That is six record hops in the cross-AZ counter, against none for orders. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=13.1.5&t=4)

## The takeaway

tx-orders was refused with INVALID_REQUEST at its first produce: nothing reached a broker's buffer, nothing was uploaded or committed, the error is not retriable, and the producer stopped. tx-payments wrote payment-1 and payment-2 to payments-0, led by broker-3 in az-c; both followers fetched them, tx-payments was acked, and the commit moved the last stable offset of payments-0 to 2, as on classic Kafka. accounts asked to be diskless and compacted, and was created as a disk topic with three replicas. payments' two records crossed zones three times each, to the leader of payments-0 and to its followers in az-a and az-b. p-orders' record went to broker-1, its zonal owner in az-a, and from there to object storage as wal-0001: orders-0 has one replica, and no broker in another zone copied it. Ursa facts: each topic is diskless or a disk topic by its own setting; transactions and compaction are not supported on diskless topics yet (Ursa's docs say "coming soon"), and a transactional producer's produce to a diskless topic is rejected with INVALID_REQUEST; disk topics have both; a diskless topic has one replica, as object storage holds the data. Both refusals are Ursa's, not the simulator's. Simulator choices: Ursa refuses a compacted diskless topic, and the simulator shows that by creating accounts as a disk topic with the replicas it asked for; share groups on diskless topics are the simulator's limit (Ursa supports them); and the 500 ms buffer close, the 600 ms upload and the 200 ms Oxia commit are slowed.

## Configs in this scenario

- [`ursa.storage.enable`](https://streamnative.io/blog/ursa-for-kafka-deep-dive-the-kafka-problem-and-ursas-storage-leaderless-architecture): A topic setting of Ursa for Kafka: a topic created with ursa.storage.enable=true is a diskless topic whose data is stored in object storage, while the other topics of the same cluster keep classic local disks.
- [`min.insync.replicas`](https://kafka.apache.org/44/configuration/topic-configs/#topicconfigs_min.insync.replicas): The fewest in-sync replicas, leader included, that must have a write for an acks=all produce to succeed (default 1); with fewer in the ISR the leader rejects the write with NOT_ENOUGH_REPLICAS. [How min.insync.replicas works](https://monedula.dev/kafka/configs/min-insync-replicas/)
- [`client.id`](https://docs.streamnative.io/cloud/build/kafka-clients/config/config-kafka-client): On Ursa for Kafka a client asks for zone affinity by starting its client.id with zone_id= and its zone (zone_id=az-a, or zone_id=az-a,key1=value1 with other entries after it), and at least one broker must run in that zone.
- [`cleanup.policy`](https://kafka.apache.org/44/configuration/topic-configs/#topicconfigs_cleanup.policy): Whether old data is removed by age/size (delete), by keeping only the latest value per key (compact), or both - it decides whether the topic behaves like a stream or a keyed changelog. [How cleanup.policy works](https://monedula.dev/kafka/configs/cleanup-policy/)
- [`transactional.id`](https://kafka.apache.org/44/configuration/producer-configs/#producerconfigs_transactional.id): A stable name that turns on transactions for a producer (and implies idempotence); a new producer that calls initTransactions() with the same id fences the older one.

## Further reading

- [StreamNative blog](https://streamnative.io/blog/ursa-for-kafka-deep-dive-write-path-read-path-and-data-compaction)

## Troubleshooting

- [InvalidRequestException in Kafka: INVALID_REQUEST](https://monedula.dev/kafka/troubleshooting/invalid-request-exception/)
