2026 field guide

Refreshed for cloud-native, multi-region, streaming, and AI infrastructure.

Explore 41 concepts →
Search DistillSys

Find a concept

Type at least two characters to search lessons, designs, papers, and interview prep.

Messagingintermediate7 min read

Event Schema Evolution

Change event contracts safely while old producers, new consumers, retained logs, and replay coexist.

2–5 minute refresher
Mental model

An event contract must survive versions moving independently in both time directions.

30second
refresher
Event producers and consumers deploy independently, while retained events may be replayed months later. Schema evolution defines how fields, meanings, defaults, and versions change without coordinated downtime.

What problem does it solve?

A field rename or semantic change can break live consumers, corrupt projections during replay, or silently change the meaning of historical data.

How it works

  1. Define an owned contract and compatibility policy.
  2. Prefer additive optional fields with safe defaults.
  3. Deploy tolerant readers before new writers.
  4. Version semantic breaks explicitly rather than reusing fields.
  5. Test new consumers against retained historical samples and replay.
Decision guide

Key trade-offs

ChoiceWhat you gainWhat it costs
Backward compatibleNew readers handle old dataDefaults preserve legacy meaning
Forward compatibleOld readers tolerate new dataUnknown fields must be ignorable
New event typeClean semantic boundaryMigration and dual consumption
What happens if?

A field keeps its type but changes meaning

amount remains an integer but changes from cents to micros. Every schema check passes while consumers calculate values incorrectly. Semantic versioning and contract tests must cover units and invariants.

Where it appears

  • Kafka contracts
  • CDC streams
  • Data lakes
  • Workflow events
Senior interview modeIs adding an optional field always safe?Show answer
Only syntactically. A default can still change behavior, validation, ordering, privacy, or downstream storage. Compatibility requires testing real consumers and historical replay, not only the schema registry.
#schemas#compatibility#events#replay