EMZETT.
Login

Strangler fig pattern and migration

In short: In the strangler fig pattern you replace a legacy system step by step: new features arise in the new system and a router sends more and more requests there until the old one can be switched off.

In more detail: Instead of a risky complete rewrite (“big bang”) one part after another is moved. A facade (proxy) decides per request which system answers. Risk stays small and you can roll back at any time.

In Depth

  • Steps: Introduce facade → pick a function → build it in the new system → redirect traffic → switch off the old piece.
  • Data migration: Shared database, synchronisation or anti-corruption layer.
  • Feature flags: Switch traffic by percentage (canary).
  • Parallel run: Compare both systems (shadow traffic).
  • Pitfalls: Data consistency, double maintenance, a migration that is never finished.
  • Name: After the strangler fig that slowly envelops a tree.

See also: Hexagonal architecture, Feature flags and progressive delivery