Monedula

Scenario 07.1.3 · Inkless: a broker dies

Aiven Inkless: what losing a Kafka broker costs

Diskless · Advanced · about 3 min · Apache Kafka 4.4 · Aiven Inkless 0.51

Aiven Inkless 0.51 · the broker in the clients' zone dies: nothing to catch up, since the data is in object storage; the clients fall back to another zone, whose cache starts cold.

Run this scenario in the playground

Writes back in az-b. t+6.900s

p1's next record went to broker-2 again and was committed at 6810 ms. Over the whole run nothing was copied between brokers; the cost of the failure was a cold cache on each broker that took over and, while az-b had no broker, traffic across zones.

Open at this step: step 5, Writes back in az-b

What you start with

In Inkless any broker can serve any diskless partition, and a client that names its zone in client.id is sent to a broker in that zone. A producer and a consumer group in az-b use broker-2, the only broker there. broker-2 will die. Watch the WAL counters, the remote reads and the cross-AZ count.

Step by step

  1. Written through broker-2 t+1.400s p1 is in az-b, so its record went to broker-2, the only az-b broker, and was committed by PostgreSQL at 1310 ms. broker-2 keeps the committed range in its cache. The consumer group g1, also in az-b, has not polled yet. Open at this step: step 1, Written through broker-2
  2. broker-2 dies t+2.100s broker-2 was killed at 2000 ms. The record it wrote is in object storage and committed in PostgreSQL, so nothing has to be copied or caught up: Inkless keeps no committed data on the broker that another broker needs (broker-2's write buffer was empty when it died). What is lost is broker-2's in-memory cache, and az-b has no broker left. Open at this step: step 2, broker-2 dies
  3. Clients fall back to another zone, reading from object storage t+2.550s With no broker in az-b, the clients are sent to a broker in another zone, as Inkless's docs describe: p1's next record went to broker-3 in az-c at 2250 ms, a cross-AZ write. g1 polled at 2500 ms and was served by broker-3 too, which had nothing cached, so it read the object from object storage (remote read) and now caches it. Which zone's broker takes over comes from the simulator's own hash. Open at this step: step 3, Clients fall back to another zone, reading from object storage
  4. broker-2 back, cache empty t+5.050s broker-2 restarted at 4500 ms and az-b clients are routed to it again. g1's next read at 5000 ms was for the record written through broker-3 while broker-2 was down, so broker-2 had to read it from object storage (remote read) and cache it. Its cache was empty anyway: it did not survive the restart. Open at this step: step 4, broker-2 back, cache empty
  5. Writes back in az-b t+6.900s p1's next record went to broker-2 again and was committed at 6810 ms. Over the whole run nothing was copied between brokers; the cost of the failure was a cold cache on each broker that took over and, while az-b had no broker, traffic across zones. Open at this step: step 5, Writes back in az-b

The takeaway

Nothing had to be copied or caught up: the records were in object storage. With az-b empty the clients fell back to another zone, which Inkless's docs describe, and paid cross-AZ traffic; the new broker had nothing cached, so its first read went to object storage. broker-2 came back with an empty cache, because the cache lives in memory. Simulator choice: the fallback broker comes from the simulator's own hash.

Configs in this scenario

  • client.id A logical name the producer sends with every request - it shows up in broker logs, metrics, and quota enforcement so traffic can be attributed to an application.

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=07.1.3" title="Kafka Simulator: Inkless: a broker dies" 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/inkless-broker-failure/">Aiven Inkless: what losing a Kafka broker costs</a></p>

Further reading

Aiven Inkless source on GitHub (inkless-release-0.51)

More in Diskless

All scenarios