Strangler-figパターンは段階的に移行します。モノリスをルーティングレイヤーでラップし、一度に1つの機能をサービスに抽出し、トラフィックをそこにリダイレクトします。モノリスが"strangled"されるまでこれを繰り返します。ビッグバンの書き直しはありません。
動作方法
text
Step 1: route all traffic through a facade/proxy to the monolith
Step 2: extract ONE capability → new service
Step 3: route just that path to the new service
Step 4: repeat; delete that code from the monolith
Client ─▶ [ Proxy ] ─┬─▶ /orders ─▶ NEW Orders service
└─▶ everything else ─▶ Monolith
最初に抽出する対象を選択する
text
✓ A bounded context with clear boundaries
✓ Something that needs independent scaling or deploys
✓ A part with few inbound dependencies (low risk)
✗ Don't start with the tangled core
