Monedula

Scenario 25.1.4 · Schema Registry down: warm clients keep going

Kafka Schema Registry down: why warm clients keep going

Schema registry · Intermediate · about 3 min · Apache Kafka 4.4 · Confluent Platform feature

The only SR instance dies, yet producing and consuming go on: both clients cached schema id 1 and never ask SR for a schema they know.

Run this scenario in the playground

O2 and O3 still flow. t+2.900s

The producer keeps sending and the consumer keeps reading: a schema they know never needs SR. The outage stays invisible until a client needs a schema it has not cached.

Open at this step: step 4, O2 and O3 still flow

What you start with

An Avro producer does not send the schema with each record, only a schema id. Its serializer asks Schema Registry once per schema and caches the id; the consumer's deserializer caches the id-to-schema lookup the same way. Here the only SR instance dies after both clients warmed their caches.

Step by step

  1. warm clients · sr-1 leads t+0.000s One DC, one Schema Registry instance. The producer and the consumer have both resolved schema id 1 already: it sits in their serializer and deserializer caches. The Setup review flags the single instance. Open at this step: step 1, warm clients · sr-1 leads
  2. O1 written and read t+1.000s O1 goes to Kafka with schema id 1 in its header bytes; the consumer decodes it from its cache. Neither client called Schema Registry. Open at this step: step 2, O1 written and read
  3. sr-1 down t+1.600s The only SR instance dies. The registry has no leader and no instance to answer a lookup. The brokers are untouched. Open at this step: step 3, sr-1 down
  4. O2 and O3 still flow t+2.900s The producer keeps sending and the consumer keeps reading: a schema they know never needs SR. The outage stays invisible until a client needs a schema it has not cached. Open at this step: step 4, O2 and O3 still flow

The takeaway

A Schema Registry outage does not stop clients that already know their schemas: they never call SR on the hot path. What stops is anything that needs a lookup or a registration - a restart, a new schema id, a new schema. 25.1.5 shows those.

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=25.1.4" title="Kafka Simulator: Schema Registry down: warm clients keep going" 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/sr-down-warm-clients/">Kafka Schema Registry down: why warm clients keep going</a></p>

Further reading

Confluent documentation

More in Schema registry

All scenarios