Scenario 11.1.4 · Redpanda: from L0 to L1, and who serves a read
Redpanda Kafka L0 to L1: the LRO and who serves a read
Redpanda v26.2.2 Cloud Topics · the reconciler moves L0 records into an L1 object and advances the LRO through Raft; a fetch at or below the LRO reads L1, a newer one the leader's batch cache, and a follower in the consumer's zone downloads the whole L0 object once.
Run this scenario in the playgroundRecords sit in L0 objects; the LRO is behind. t+3.200s
p1 (az-a) sent order-1 and order-2 at 100 ms and order-3 and order-4 at 1300 ms, to orders-1 and orders-4, both led by broker-2 in az-b. Each pair went into one L0 object holding both partitions, l0-0001 and then l0-0002; their placeholders took offsets 0 and 1, and once they reached the followers the high watermark moved to 2. g-tail (az-b) read each pair from broker-2's batch cache, at 1800 and 3000 ms. Nothing is reconciled yet: neither partition has an LRO, so every offset is served from L0. broker-2's first reconciler run is due at 3250 ms, 2 s after its first placeholder.
Open at this step: step 1, Records sit in L0 objects; the LRO is behindThe reconciler writes an L1 object and the LRO advances through Raft. t+3.890s
At 3250 ms broker-2's reconciler read offsets 0-1 of orders-1 and orders-4, from the LRO + 1 to the last stable offset, and uploaded them as one L1 object, l1-0001, which carries both partitions. At 3890 ms l1-0001 is registered in the L1 metastore, and the new LRO, 1, is written into the Raft log of each partition, a Raft write counted like a placeholder: the cross-zone card counts 4 more metadata hops, one per follower per partition. The simulator applies the new LRO in this tick, without timing a replication round. Offsets 0 and 1 are now read from L1. l0-0001 and l0-0002 stay in S3; garbage collection deletes an L0 object only after 12 h, not in this scene.
Open at this step: step 2, The reconciler writes an L1 object and the LRO advances through RaftA lagging consumer reads L1; a tailing one reads the leader's cache. t+6.000s
g-lag (az-b) joined at 4000 ms at the earliest offset. Its first fetch, orders-1 offset 0 at 4600 ms, is at or below the LRO, so broker-2 read L1 object l1-0001 from S3 into its disk cache; offset 1 at 5200 ms came from that disk cache, with no GET. order-5 and order-6, sent at 4100 ms, went into L0 object l0-0003 and were placed at offset 2 at 5250 ms, above the LRO: g-lag read orders-1 offset 2 at 5800 ms from broker-2's batch cache, and g-tail read both records at 6000 ms from the same cache. g-lag catches up one record per poll and still has orders-4 to read.
Open at this step: step 3, A lagging consumer reads L1; a tailing one reads the leader's cacheA consumer in another zone reads its zone's follower. t+6.400s
g-zone runs in az-c with client.rack=az-c, and the cluster sets enable_rack_awareness=true, so its fetches go to broker-3, the follower in az-c, not to the leader in az-b. It joined at 4000 ms at the end of the log, offset 2. broker-3 learned the high watermark 3 at 5850 ms, one replica fetch after the leader, so the poll at 5800 ms read nothing. At 6400 ms broker-3 serves orders-1 offset 2. It holds the placeholder, not the record, and a follower gets no batch cache fill, so it downloads the whole L0 object l0-0003 from S3 into its disk cache and serves order-5 from it. The read stays in az-c: the cross-zone card counts no consumer hop.
Open at this step: step 4, A consumer in another zone reads its zone's followerThat follower downloads the whole L0 object once. t+7.000s
g-zone reads one record per poll (max.poll.records=1), and in the simulator a poll is one fetch, so it fetches one partition at a time; a real consumer would fetch both partitions in one request and buffer the second record, and Redpanda merges concurrent reads of one object into one GET. At 7000 ms it reads order-6 at orders-4 offset 2, which sits in the same L0 object, and broker-3 serves it from its disk cache: no second GET. One download of l0-0003 served both partitions. With enable_rack_awareness off, g-zone would have read both records from broker-2 in az-b, two cross-zone reads. g-lag reads orders-4 on, from l1-0001 in broker-2's disk cache; broker-2's next reconciler run, at 7250 ms, moves offset 2 to L1 after this frame.
Open at this step: step 5, That follower downloads the whole L0 object onceWhat you start with
Redpanda Cloud Topics write every record first to an L0 object, which mixes the partitions one broker leads. On each partition leader a reconciler reads from the last reconciled offset (LRO) + 1 to the last stable offset, writes those records to an L1 object, registers it in the L1 metastore, and writes the new LRO into each partition's Raft log. A fetch at or below the LRO reads L1; a newer one reads L0: from the leader's batch cache, filled when the placeholder was appended, or by downloading the whole L0 object into the broker's disk cache. Producer p1 (az-a) writes to orders-1 and orders-4, both led by broker-2 in az-b. g-tail (az-b) reads from the start; g-lag (az-b) joins later at the earliest offset; g-zone runs in az-c and sets client.rack=az-c, and the cluster sets enable_rack_awareness=true, so g-zone reads from broker-3, the follower in its zone. On classic Kafka that follower would hold the records it serves (scenario 02.1.5); here it holds only placeholders. Timings are slowed so each phase gets its own frame.
Step by step
- Records sit in L0 objects; the LRO is behind t+3.200s p1 (az-a) sent order-1 and order-2 at 100 ms and order-3 and order-4 at 1300 ms, to orders-1 and orders-4, both led by broker-2 in az-b. Each pair went into one L0 object holding both partitions, l0-0001 and then l0-0002; their placeholders took offsets 0 and 1, and once they reached the followers the high watermark moved to 2. g-tail (az-b) read each pair from broker-2's batch cache, at 1800 and 3000 ms. Nothing is reconciled yet: neither partition has an LRO, so every offset is served from L0. broker-2's first reconciler run is due at 3250 ms, 2 s after its first placeholder. Open at this step: step 1, Records sit in L0 objects; the LRO is behind
- The reconciler writes an L1 object and the LRO advances through Raft t+3.890s At 3250 ms broker-2's reconciler read offsets 0-1 of orders-1 and orders-4, from the LRO + 1 to the last stable offset, and uploaded them as one L1 object, l1-0001, which carries both partitions. At 3890 ms l1-0001 is registered in the L1 metastore, and the new LRO, 1, is written into the Raft log of each partition, a Raft write counted like a placeholder: the cross-zone card counts 4 more metadata hops, one per follower per partition. The simulator applies the new LRO in this tick, without timing a replication round. Offsets 0 and 1 are now read from L1. l0-0001 and l0-0002 stay in S3; garbage collection deletes an L0 object only after 12 h, not in this scene. Open at this step: step 2, The reconciler writes an L1 object and the LRO advances through Raft
- A lagging consumer reads L1; a tailing one reads the leader's cache t+6.000s g-lag (az-b) joined at 4000 ms at the earliest offset. Its first fetch, orders-1 offset 0 at 4600 ms, is at or below the LRO, so broker-2 read L1 object l1-0001 from S3 into its disk cache; offset 1 at 5200 ms came from that disk cache, with no GET. order-5 and order-6, sent at 4100 ms, went into L0 object l0-0003 and were placed at offset 2 at 5250 ms, above the LRO: g-lag read orders-1 offset 2 at 5800 ms from broker-2's batch cache, and g-tail read both records at 6000 ms from the same cache. g-lag catches up one record per poll and still has orders-4 to read. Open at this step: step 3, A lagging consumer reads L1; a tailing one reads the leader's cache
- A consumer in another zone reads its zone's follower t+6.400s g-zone runs in az-c with client.rack=az-c, and the cluster sets enable_rack_awareness=true, so its fetches go to broker-3, the follower in az-c, not to the leader in az-b. It joined at 4000 ms at the end of the log, offset 2. broker-3 learned the high watermark 3 at 5850 ms, one replica fetch after the leader, so the poll at 5800 ms read nothing. At 6400 ms broker-3 serves orders-1 offset 2. It holds the placeholder, not the record, and a follower gets no batch cache fill, so it downloads the whole L0 object l0-0003 from S3 into its disk cache and serves order-5 from it. The read stays in az-c: the cross-zone card counts no consumer hop. Open at this step: step 4, A consumer in another zone reads its zone's follower
- That follower downloads the whole L0 object once t+7.000s g-zone reads one record per poll (max.poll.records=1), and in the simulator a poll is one fetch, so it fetches one partition at a time; a real consumer would fetch both partitions in one request and buffer the second record, and Redpanda merges concurrent reads of one object into one GET. At 7000 ms it reads order-6 at orders-4 offset 2, which sits in the same L0 object, and broker-3 serves it from its disk cache: no second GET. One download of l0-0003 served both partitions. With enable_rack_awareness off, g-zone would have read both records from broker-2 in az-b, two cross-zone reads. g-lag reads orders-4 on, from l1-0001 in broker-2's disk cache; broker-2's next reconciler run, at 7250 ms, moves offset 2 to L1 after this frame. Open at this step: step 5, That follower downloads the whole L0 object once
The takeaway
broker-2's reconciler moved offsets 0-1 of orders-1 and orders-4 out of two L0 objects into one L1 object, registered it in the L1 metastore, and wrote the new LRO, 1, into each partition's Raft log, a Raft write counted like a placeholder. Which tier served a fetch followed from its offset: g-lag's first read, offset 0, was at or below the LRO and came from the L1 object in S3, while offset 2, above it, came from broker-2's batch cache, as every read of the tailing g-tail did. g-zone read from broker-3 in its own zone, so none of its reads crossed a zone. A follower gets no batch cache fill from the write path, so broker-3's first read of L0 object l0-0003 downloaded the whole object into its disk cache, and the next read of that object, for the other partition, was served from there: one GET for both. Redpanda v26.2.2 facts: the reconciler runs on each partition leader, writes multi-partition L1 objects and replicates the LRO through Raft; reads at or below the LRO go to L1, the rest to L0; a follower serves fetches, bounded by the leader's high watermark, when enable_rack_awareness is on (it is off by default) and the consumer sends client.rack; a cache miss downloads the whole L0 object; and an L0 object is deleted only once it is reconciled and at least 12 h old, so l0-0001 and l0-0002, and the unreconciled l0-0003, are still in S3 at the end. Simulator choices: the reconciler runs every 2 s (Redpanda adapts the interval between 250 ms and 10 s); the new LRO takes effect in the tick the L1 object is registered, and its Raft write is counted as metadata hops, not timed as a replication round; enable_rack_awareness switches follower fetching only, and each partition's replicas are placed over the three zones whether it is on or off (Redpanda also uses it to spread replicas over racks); the tier is decided by a fetch's first offset; an L1 object read once stays in the broker's disk cache; a follower learns the high watermark on its next replica fetch; a poll is one fetch, so g-zone's max.poll.records=1 also makes it fetch one partition at a time, where a real consumer fetches both partitions in one request and buffers the second record (Redpanda merges concurrent reads of one object, so that is still one GET); g-lag catches up one record per poll; and the buffer interval, the upload and the L1 registration are slowed to 500 ms, 600 ms and 40 ms.
Configs in this scenario
-
client.The consumer's rack ID; with enable_rack_awareness=true on the Redpanda cluster and a rack set on each broker, the partition leader looks for a replica, itself or a follower, whose rack ID matches the consumer's and returns records from that replica, and otherwise handles the fetch itself.rack -
enable_A Redpanda cluster property that enables rack-aware replica assignment (default false); follower fetching also needs it set to true, with a rack on each broker and client.rack on each consumer.rack_ awareness -
max.The most records one poll() returns (default 500); a smaller value shortens the processing between two polls, which keeps a group member inside max.poll.interval.ms.poll. records
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=11.1.4" title="Kafka Simulator: Redpanda: from L0 to L1, and who serves a read" 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/redpanda-l0-to-l1-read-tiers/">Redpanda Kafka L0 to L1: the LRO and who serves a read</a></p> Further reading
Redpanda v26.2.2 source on GitHub
More in Diskless
- Diskless Kafka topics (KIP-1163): the write path
- Diskless vs classic Kafka: cross-AZ replication traffic
- Diskless Kafka produce latency: the price of object storage
- Diskless Kafka (KIP-1163): when object storage goes down
- Aiven Inkless diskless Kafka: the write path
- Aiven Inkless: what a PostgreSQL outage does to Kafka
- Aiven Inkless: what losing a Kafka broker costs
- Aiven Inkless: a slow S3 bucket fails Kafka produce
- KafScale diskless Kafka: etcd lease, S3 segment, ack
- KafScale 2.1 diskless Kafka: a lease owner crashes
- KafScale 2.1 diskless Kafka: when etcd goes down
- KafScale 2.1 diskless Kafka: when S3 goes down
- KafScale 2.1 proxy: etcd down past the 60 s cache TTL
- KafScale 2.1: a Kafka producer timeout that still wrote
- KafScale 2.1 diskless Kafka: lease handover, no overwrite
- KafScale 2.1 diskless Kafka: a paused broker comes back
- AutoMQ diskless Kafka: one S3 WAL per broker, then ack
- AutoMQ diskless Kafka: a broker crash and WAL failover
- AutoMQ diskless Kafka: moving a partition, no copying
- AutoMQ diskless Kafka: zone router, no cross-zone data
- AutoMQ diskless Kafka: when S3 goes down
- WarpStream diskless Kafka: the write path through Agents
- WarpStream Kafka: a leader per client, a cache per zone
- WarpStream Kafka: an Agent dies mid-commit
- WarpStream Kafka: the control plane goes down
- WarpStream Kafka Ripcord: produce without the control plane
- WarpStream Kafka lightning topics: ack before the commit
- WarpStream Kafka transactions in the control plane
- Redpanda Kafka write path: the offset comes after S3
- Redpanda Kafka leader crash: a Raft election, no replay
- Redpanda Kafka S3 outage: uploads time out, Raft holds
- Redpanda Kafka transactions: exactly-once on Cloud Topics
- Nisshi diskless Kafka: watermark.json, then the batch
- Nisshi diskless Kafka on PostgreSQL: a row lock per write
- Nisshi diskless Kafka: two brokers write one partition
- Nisshi diskless Kafka: reading through another broker
- Nisshi diskless Kafka: a broker dies mid-write
- Nisshi diskless Kafka: when PostgreSQL goes down
- Nisshi diskless Kafka: what 0.8.2 refuses
- Ursa for Kafka write path: Oxia assigns the offset
- Ursa for Kafka zones: the zonal owner and the zone cache
- Ursa for Kafka compaction: from WAL objects to Parquet
- Ursa for Kafka broker failure: a kill and a silent broker
- Ursa for Kafka: diskless and disk topics, side by side