liveBook · Manning

Strangler pattern

As explained in Kafka for Architects

The strangler fig pattern is an incremental replacement approach in which a new implementation gradually takes over functionality from a legacy system.

The strangler pattern replaces a legacy application incrementally: new functionality is introduced alongside old functionality, then validated before the older implementation is retired. This avoids all-at-once replacement, downtime, and disruptive data migration. section 6.2.5

Event-driven migrations commonly coordinate versions through:

  • Backward compatibility: upgrade consumers first so new consumers can read older events. section 6.2.5
  • Forward compatibility: upgrade producers first so older consumers can process newer events. section 6.2.5
  • Schema compatibility rules, enforced by schema repositories, prevent consumers from failing during deserialization. section 6.2.5
Figure 6.11 The new version of producer, consumer, and channel are deployed in the same environment as the old ones. After validation of the new version, the old one can be retired.
A diagram of a computer program

AI-generated content may be incorrect.

Shows old and new producers, consumers, and channels operating together until the validated new version replaces the old one. section 6.2.5

How Kafka for Architects covers it

How deep it goes
Explains coexistence, compatibility direction, schema validation, and retirement, but stops short of implementation walkthroughs.
Examples
Uses concurrent producers, consumers, and channels, followed by validation and retirement of the legacy deployment.
What it assumes
Assumes producers, consumers, events, channels, and schemas; teaches how their versions coexist during migration.
What you can do after
Apply the pattern by coexisting versions, selecting compatibility direction, validating schemas, and retiring the legacy implementation.
How it connects
Connects application migration with event versioning, backward compatibility, forward compatibility, and schema compatibility.

Also explained in

Compare how 4 books explain strangler pattern →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.