Grokking Microservices Design Patterns
Vote

0% completed

The Strangler Pattern: A Solution

Implementation starts by choosing one piece of the legacy system that can be rebuilt on its own. A good first choice has a clear boundary and low risk, such as a page that only reads data.

That piece is built in the new system. A facade is a single entry point that hides what is behind it. It receives every request and decides which system handles it. Requests for the rebuilt piece go to the new system. Everything else goes to the old one. Over time more pieces move, and traffic to the legacy system falls until none is left.

The four steps

  1. Identify a piece to move: pick a part of the legacy system with a clear boundary.
  2. Route the traffic: put a facade or proxy in front, so the choice of system is one decision in one place.
  3. Rebuild and replace, piece by piece: each piece is built, routed and watched before the next one starts.
  4. Retire the old system: when nothing routes to it, switch it off and remove it.
The four steps of the migration. The bar under each step is the share of traffic the legacy system still answers, and it only ever shrinks.
The four steps of the migration. The bar under each step is the share of traffic the legacy system still answers, and it only ever shrinks.

This order matters. The facade goes in before the first piece is migrated, not after it. Without it there is no way to move traffic gradually, and the migration becomes the single large cutover the pattern exists to avoid.

prabal kene

prabal kene

· 2 years ago

Is there a video classes available for this course Microservices Patterns.

Show 1 reply

Reading Progress

0%


Vote for new content