Scenario 08.2.3 · KafScale: S3 goes down
KafScale 2.1 diskless Kafka: when S3 goes down
KafScale 2.1 · a failed segment upload answers REQUEST_TIMED_OUT while the S3 health monitor reports S3 degraded, then KAFKA_STORAGE_ERROR once it reports unavailable; the producer retries, and once the monitor clears, the record lands at the offset that failed, with no gap.
Run this scenario in the playgroundS3 goes down. t+2.150s
orders is a KafScale topic (KafScale 2.1) with one partition, owned by broker-2 through its etcd lease. order-1 became one S3 segment, etcd recorded the end offset and p1 was acked at 790 ms; c1 read it at 2000 ms. S3 stopped at 2100 ms. Each broker's S3 health monitor still says healthy: it only learns from S3 calls, and its 60 s window holds two good ones, order-1's segment and index uploads.
Open at this step: step 1, S3 goes downThe upload fails: REQUEST_TIMED_OUT. t+2.950s
order-2 took offset 1 and its segment upload started at 2250 ms. The upload failed at 2890 ms. The monitor records the failed call first: 1 of the 3 S3 calls in its 60 s window failed, 33%, and from 20% it reports S3 degraded, so KafScale answered REQUEST_TIMED_OUT, which Kafka clients retry. (At 60% or more it would report S3 unavailable and answer KAFKA_STORAGE_ERROR.) The owner's next offset went back to 1: offsets move on only after the upload and the etcd write succeed.
Open at this step: step 2, The upload fails: REQUEST_TIMED_OUTS3 is back, the monitor still refuses. t+6.100s
S3 started again at 4500 ms, but the health monitor does not probe: it judges only the calls in its window, and refused requests make no S3 call. So p1's retries at 3890, 4890 and 5890 ms were refused at once with REQUEST_TIMED_OUT, before any S3 call, and c1's fetches at 4000 and 6000 ms were refused the same way. etcd is fine, so c1's offset commit at 4000 ms went through. p1 keeps retrying every second.
Open at this step: step 3, S3 is back, the monitor still refusesThe good calls leave the window: KAFKA_STORAGE_ERROR. t+61.000s
At 60790 ms order-1's two good calls were 60 s old and left the window. Only the failed call is left: 100% failed, so the monitor now reports S3 unavailable and the refusals change to KAFKA_STORAGE_ERROR, still retriable. p1 got REQUEST_TIMED_OUT 58 times, from 2890 to 59890 ms (the failed upload, then 57 refused retries), and now KAFKA_STORAGE_ERROR at 60890 ms. S3 has been back for 56 s; the monitor clears when the failed call leaves the window too, at 62890 ms.
Open at this step: step 4, The good calls leave the window: KAFKA_STORAGE_ERRORHealthy again: order-2 lands at offset 1. t+63.600s
At 62890 ms the failed call left the window, which was then empty, and the monitor reported S3 healthy. c1's fetch at 62000 ms was the last one refused. p1's retry at 62890 ms was uploaded at offset 1, committed in etcd and acked at 63530 ms. That is the offset the failed upload had taken: no gap.
Open at this step: step 5, Healthy again: order-2 lands at offset 1c1 reads order-2, no gap. t+66.050s
c1 polled at 64000 ms and got order-2 at offset 1, and committed offset 2 at 66000 ms. Of two records sent, both were acked, at offsets 0 and 1, and read once. No offset was left empty: the failed upload gave offset 1 back.
Open at this step: step 6, c1 reads order-2, no gapWhat you start with
KafScale writes each produce request to S3 as a segment before it acks, and every broker runs an S3 health monitor over its own S3 calls, with a 60 s window. Once 20% of those calls failed it reports S3 degraded, from 60% unavailable, and either way the broker refuses produce and fetch up front: REQUEST_TIMED_OUT while degraded, KAFKA_STORAGE_ERROR while unavailable. Kafka clients retry both, and a failed upload gives its offsets back, so no gap is left. Here S3 stops just before a segment uploads and starts again 2.4 s later. Producer p1 is set to retries=100 and retry.backoff.ms=1000. Watch the object storage lane, the S3 health line in its Inspector, p1's errors and c1.
Step by step
- S3 goes down t+2.150s orders is a KafScale topic (KafScale 2.1) with one partition, owned by broker-2 through its etcd lease. order-1 became one S3 segment, etcd recorded the end offset and p1 was acked at 790 ms; c1 read it at 2000 ms. S3 stopped at 2100 ms. Each broker's S3 health monitor still says healthy: it only learns from S3 calls, and its 60 s window holds two good ones, order-1's segment and index uploads. Open at this step: step 1, S3 goes down
- The upload fails: REQUEST_TIMED_OUT t+2.950s order-2 took offset 1 and its segment upload started at 2250 ms. The upload failed at 2890 ms. The monitor records the failed call first: 1 of the 3 S3 calls in its 60 s window failed, 33%, and from 20% it reports S3 degraded, so KafScale answered REQUEST_TIMED_OUT, which Kafka clients retry. (At 60% or more it would report S3 unavailable and answer KAFKA_STORAGE_ERROR.) The owner's next offset went back to 1: offsets move on only after the upload and the etcd write succeed. Open at this step: step 2, The upload fails: REQUEST_TIMED_OUT
- S3 is back, the monitor still refuses t+6.100s S3 started again at 4500 ms, but the health monitor does not probe: it judges only the calls in its window, and refused requests make no S3 call. So p1's retries at 3890, 4890 and 5890 ms were refused at once with REQUEST_TIMED_OUT, before any S3 call, and c1's fetches at 4000 and 6000 ms were refused the same way. etcd is fine, so c1's offset commit at 4000 ms went through. p1 keeps retrying every second. Open at this step: step 3, S3 is back, the monitor still refuses
- The good calls leave the window: KAFKA_STORAGE_ERROR t+61.000s At 60790 ms order-1's two good calls were 60 s old and left the window. Only the failed call is left: 100% failed, so the monitor now reports S3 unavailable and the refusals change to KAFKA_STORAGE_ERROR, still retriable. p1 got REQUEST_TIMED_OUT 58 times, from 2890 to 59890 ms (the failed upload, then 57 refused retries), and now KAFKA_STORAGE_ERROR at 60890 ms. S3 has been back for 56 s; the monitor clears when the failed call leaves the window too, at 62890 ms. Open at this step: step 4, The good calls leave the window: KAFKA_STORAGE_ERROR
- Healthy again: order-2 lands at offset 1 t+63.600s At 62890 ms the failed call left the window, which was then empty, and the monitor reported S3 healthy. c1's fetch at 62000 ms was the last one refused. p1's retry at 62890 ms was uploaded at offset 1, committed in etcd and acked at 63530 ms. That is the offset the failed upload had taken: no gap. Open at this step: step 5, Healthy again: order-2 lands at offset 1
- c1 reads order-2, no gap t+66.050s c1 polled at 64000 ms and got order-2 at offset 1, and committed offset 2 at 66000 ms. Of two records sent, both were acked, at offsets 0 and 1, and read once. No offset was left empty: the failed upload gave offset 1 back. Open at this step: step 6, c1 reads order-2, no gap
The takeaway
The failed upload did not lose the record. It left 1 failed call of 3 in the health monitor's window, so S3 was degraded and KafScale answered REQUEST_TIMED_OUT. p1 retried every second, and the broker refused each retry before touching S3. When order-1's two good calls were 60 s old and left the window, only the failed call was left, so the monitor reported S3 unavailable and the refusals turned into KAFKA_STORAGE_ERROR, for the last 2 s. Once the failed call left the window too, 58 s after S3 was back, order-2 was uploaded, committed in etcd and acked at offset 1, the offset its failed upload had taken: the owner gave the offset back, so there is no gap, and c1 read both records. On a busy broker the same failure would count for less: below 20% failed calls the monitor stays healthy, the failed request alone gets KAFKA_STORAGE_ERROR and the next one is served. Simulator choices: one monitor for the cluster (KafScale runs one per broker), uploads at normal speed count as fast, fetches take no samples, and p1's backoff is fixed at 1 s.
Configs in this scenario
-
retriesHow many times the producer sends a batch again after a transient error (default 2147483647, so in practice delivery.timeout.ms ends the retrying); idempotence needs it above 0. -
retry.How long the producer waits before retrying a failed send, so it does not hammer a broker that is still recovering.backoff. ms
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=08.2.3" title="Kafka Simulator: KafScale: S3 goes down" 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/kafscale-2-s3-outage/">KafScale 2.1 diskless Kafka: when S3 goes down</a></p> Further reading
KafScale v2.1.0 source on GitHub
Troubleshooting
- TimeoutException in Kafka producers: causes and fixes
- KAFKA_STORAGE_ERROR in Kafka: disk failures and Inkless
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 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 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