Scenario 10.1.6 · WarpStream: lightning topics
WarpStream Kafka lightning topics: ack before the commit
WarpStream (Agent v857) · a produce to a lightning topic is acked when its file is uploaded, with offset 0, one commit earlier than on a classic topic; its records are readable only after the commit, and an idempotent producer is refused.
Run this scenario in the playgroundA classic topic and a lightning topic side by side. t+1.900s
orders is a classic WarpStream topic and fast a lightning topic (warpstream.topic.type=lightning), three partitions each (Agent v857). Three Agents run here, one per zone. p-orders and p-fast (ws_az=az-a), both with idempotence off, write through agent-1, which keeps lightning and classic records in separate files (the simulator's choice). Their first records, k1 to orders-2 and k2 to fast-1, went into two files uploaded from 650 to 1250. p-fast was acked at 1250, when its file's upload ended; p-orders at 1450, when the control plane committed its file. Both records got offset 0, and g-orders and g-fast (c-orders and c-fast in az-a) read them at 1800. The next round shows the difference.
Open at this step: step 1, A classic topic and a lightning topic side by sideThe lightning producer is acked after the upload, with offset 0. t+3.500s
At 2300 p-orders sends k3 to orders and p-fast sends k5 to fast. agent-1 appends both at 2350, each to its own file (wal-0003 for orders, wal-0004 for fast), and uploads both from 2850. The uploads end at 3450: fast's file is journaled and p-fast is acked at once, with offset 0. That offset is a placeholder: k2 already holds offset 0 of fast-1. The control plane has not committed the file yet, so k5 has no offset and fast-1's high watermark is still 1. p-orders is still waiting for its ack.
Open at this step: step 2, The lightning producer is acked after the upload, with offset 0The classic producer is acked after the commit, with its offset. t+3.700s
At 3650 the control plane commits both files (200 ms after the uploads ended, the slowed commit time). p-orders is acked then with k3's real offset, 1 of orders-2: one commit time after p-fast's ack. The same commit gives k5 its real offset, 1 of fast-1, and takes fast's file out of the journal; p-fast gets no second ack. The lightning topic saved its producer one commit time, and both files reached the log at the same moment.
Open at this step: step 3, The classic producer is acked after the commit, with its offsetThe lightning records become readable only after their commit. t+4.250s
c-fast's poll at 3600 came after p-fast's ack and before the commit, and found nothing to read: a lightning record is readable only once it is committed. At 4200 c-fast reads k5 at offset 1 of fast-1, and c-orders reads k3 at offset 1 of orders-2 in the same poll. From send to read, the lightning record took as long as the classic one.
Open at this step: step 4, The lightning records become readable only after their commitAn idempotent producer to the lightning topic is refused. t+4.850s
At 4300 p-fast-idem (ws_az=az-b), an idempotent producer, sends k4 to fast. It is refused at the flush at 4350 with INVALID_REQUEST, not retriable: WarpStream's docs say a lightning topic rejects produce with enable.idempotence or a transactional.id, and the error code is the simulator's choice. k4 is never written to a file. At 4800 both groups commit their positions: each has read every acked record once.
Open at this step: step 5, An idempotent producer to the lightning topic is refusedWhat you start with
WarpStream Agents run in your account, but the hosted control plane commits every file and assigns the offsets. A classic topic acks a produce after that commit. A lightning topic (warpstream.topic.type=lightning) acks it as soon as the file is in object storage, with offset 0, and commits it afterwards. Three Agents run here, one per zone. orders is classic and fast is lightning, three partitions each. p-orders writes to orders and p-fast to fast, both in az-a with idempotence off; p-fast-idem in az-b is idempotent and also writes to fast. Groups g-orders and g-fast read one topic each. Timings are slowed so each phase gets its own frame.
Step by step
- A classic topic and a lightning topic side by side t+1.900s orders is a classic WarpStream topic and fast a lightning topic (warpstream.topic.type=lightning), three partitions each (Agent v857). Three Agents run here, one per zone. p-orders and p-fast (ws_az=az-a), both with idempotence off, write through agent-1, which keeps lightning and classic records in separate files (the simulator's choice). Their first records, k1 to orders-2 and k2 to fast-1, went into two files uploaded from 650 to 1250. p-fast was acked at 1250, when its file's upload ended; p-orders at 1450, when the control plane committed its file. Both records got offset 0, and g-orders and g-fast (c-orders and c-fast in az-a) read them at 1800. The next round shows the difference. Open at this step: step 1, A classic topic and a lightning topic side by side
- The lightning producer is acked after the upload, with offset 0 t+3.500s At 2300 p-orders sends k3 to orders and p-fast sends k5 to fast. agent-1 appends both at 2350, each to its own file (wal-0003 for orders, wal-0004 for fast), and uploads both from 2850. The uploads end at 3450: fast's file is journaled and p-fast is acked at once, with offset 0. That offset is a placeholder: k2 already holds offset 0 of fast-1. The control plane has not committed the file yet, so k5 has no offset and fast-1's high watermark is still 1. p-orders is still waiting for its ack. Open at this step: step 2, The lightning producer is acked after the upload, with offset 0
- The classic producer is acked after the commit, with its offset t+3.700s At 3650 the control plane commits both files (200 ms after the uploads ended, the slowed commit time). p-orders is acked then with k3's real offset, 1 of orders-2: one commit time after p-fast's ack. The same commit gives k5 its real offset, 1 of fast-1, and takes fast's file out of the journal; p-fast gets no second ack. The lightning topic saved its producer one commit time, and both files reached the log at the same moment. Open at this step: step 3, The classic producer is acked after the commit, with its offset
- The lightning records become readable only after their commit t+4.250s c-fast's poll at 3600 came after p-fast's ack and before the commit, and found nothing to read: a lightning record is readable only once it is committed. At 4200 c-fast reads k5 at offset 1 of fast-1, and c-orders reads k3 at offset 1 of orders-2 in the same poll. From send to read, the lightning record took as long as the classic one. Open at this step: step 4, The lightning records become readable only after their commit
- An idempotent producer to the lightning topic is refused t+4.850s At 4300 p-fast-idem (ws_az=az-b), an idempotent producer, sends k4 to fast. It is refused at the flush at 4350 with INVALID_REQUEST, not retriable: WarpStream's docs say a lightning topic rejects produce with enable.idempotence or a transactional.id, and the error code is the simulator's choice. k4 is never written to a file. At 4800 both groups commit their positions: each has read every acked record once. Open at this step: step 5, An idempotent producer to the lightning topic is refused
The takeaway
p-orders and p-fast sent at the same time through agent-1, each into its own file. p-fast was acked when its file's upload ended, with offset 0; p-orders was acked one commit time later, at the commit, with its real offset, 1. The same commit gave k5 its real offset, 1. c-fast's poll between the ack and the commit read nothing, so the lightning producer waited less, but its record took as long to become readable. p-fast-idem, idempotent, was refused. Both groups read every acked record once. WarpStream facts: the topic config warpstream.topic.type=lightning acks after the upload with offset 0 and commits asynchronously, the records are readable only after that commit, and it does not support idempotence or transactions (such produce is rejected). Simulator choices: the commit timing (the lightning file commits one commit time after its ack, when a classic file uploaded with it commits); lightning and classic records in separate files; INVALID_REQUEST as the refusal's code (the docs name none); and the 500 ms batchTimeout, 600 ms upload and 200 ms commit are slowed figures so each phase is a frame.
Configs in this scenario
-
enable.Gives the producer an id and a sequence number per partition so the broker drops duplicate retries and keeps them in order; on by default unless a conflicting setting (acks other than all, retries=0, more than 5 in-flight requests) turns it off. How enable.idempotence worksidempotence -
transactional.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.id
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=10.1.6" title="Kafka Simulator: WarpStream: lightning topics" 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/warpstream-lightning-topics/">WarpStream Kafka lightning topics: ack before the commit</a></p> Further reading
Troubleshooting
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 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 L0 to L1: the LRO and who serves a read
- 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