The Strangler pattern is a technique for gradually migrating a monolithic application to microservices by building new functionality as separate services and slowly redirecting traffic away from the old system, rather than rewriting everything at once.
A legacy retail platform might extract its "shopping cart" first as a microservice, route only cart-related requests to it through a facade, and continue routing checkout and inventory requests to the monolith until those are migrated in later phases.
# Strangler fig with Spring Cloud Gateway: new cart service gets /cart/**,
# everything else still goes to the monolith
spring:
cloud:
gateway:
routes:
- id: cart-new
uri: lb://cart-service
predicates:
- Path=/cart/**
order: 0
- id: legacy-monolith
uri: http://legacy-shop:8080
predicates:
- Path=/**
order: 1
# Each time another feature is extracted, add one route above the catch-all.
# When no traffic reaches the monolith any more, it can be retired.A concise interview answer is
The Strangler pattern replaces a monolith piece by piece — new functionality is built as microservices, a facade routes requests to either the old or new system, and traffic shifts gradually until the monolith has nothing left to do and can be decommissioned. It's much lower risk than a full rewrite because old and new can be validated side by side.
Last updated: 1 November 2026
Previous question: Can you give an example of a real-world use case for the Orchestration pattern?
Next question: What are the key benefits of using the Strangler pattern for application modernization?