Skip to content
IT glossary
ArchitectureUpdated December 3, 2026

Strangler fig pattern

Strangler Fig

A way to replace a running system one capability at a time. The new implementation handles each capability when it is ready, while the old system continues to handle the rest.

Also known as: распил монолита

What is the Strangler fig pattern?

The Strangler fig pattern replaces a legacy system in increments rather than in a single cutover. Both implementations run side by side: the replacement takes over one capability at a time, and the team retires the old code once nothing relies on it. Users can keep working while the migration is underway.

This is a migration strategy, not a target architecture. You can use it to extract services from a monolith, move to a new modular monolith, or replace only part of a system that is otherwise worth keeping. Splitting an application into microservices is not, by itself, an example of the pattern.

How the switch works

Pick a capability with recognizable boundaries and trace how it is used. A public API call might be easy to redirect, but the same functionality could also be called by a scheduled job or directly by another module. Find a point where each relevant call can be sent to either implementation. For HTTP traffic, a reverse proxy or API gateway can often do this without changing the public URL. In-process calls may need an adapter instead.

Start with the legacy implementation as the default. Check that the replacement honors the existing client contract, then route a small share of eligible traffic to it. Watch both service metrics and user outcomes before expanding the rollout. Removing the legacy path is a separate step: no traffic at the gateway does not prove that internal callers have stopped using it.

Example: moving order history

An online retailer moves GET /orders/history first and leaves checkout in the monolith. The new component serves history from a read model fed by the monolith, which still owns order writes. The team checks that historical orders match and measures how long a new order takes to appear. If customers expect to see an order immediately after checkout, a fast response with stale data may still fail the rollout criteria. If the checks fail, the gateway can send reads back to the monolith without having to move any writes back.

Where teams get stuck

Moving a route is often easier than moving data ownership. Once the new system accepts writes, reversing a routing rule may leave the old system serving outdated records. Decide which system is authoritative at each stage and what must happen to accepted writes if you roll back. Also budget for the overlap: two implementations, temporary integrations, and more paths to monitor. For a small, well-understood system that can tolerate a planned cutover, that overhead may not be worth it.

How it comes up in interviews

A system design interviewer might ask how you would replace part of a monolith without interrupting checkout. Explain what you would migrate first, how you would redirect calls, and what evidence would let you turn off the old implementation. Be explicit about whether rollback means changing a route or also reconciling data.