Strangler Fig, Backend for Frontend and API Composition
Learn Strangler Fig, Backend for Frontend and API Composition (Phase 14 · Advanced Architecture Patterns (Advanced), Microservices) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Strangler Fig pattern • Incrementally replace a monolith : put a facade/proxy (gateway) in front; route one capability at a time to a new microservice while the rest still goes to the monolith; when a capability is fully migrated, delete it from the monolith; eventually the monolith is "strangled". Avoids risky big-bang rewrites. • Steps: (1) identify a seam (a bounded context with few dependencies; e.g. notifications, catalogue search), (2) add the routing layer, (3) build the new service and synchronise data (CDC/events, dual-run, anti-corruption layer to translate models), (4) shadow/canary...