The strangler-fig pattern ਵਧਦੀ ਤਰੀਕੇ ਨਾਲ ਮਾਈਗ੍ਰੇਟ ਕਰਦੀ ਹੈ: ਤੁਸੀਂ monolith ਨੂੰ routing layer ਨਾਲ ਲਪੇਟਦੇ ਹੋ, ਇੱਕ ਸਮਰੱਥਾ ਨੂੰ ਹਰ ਵਾਰ ਇੱਕ service ਵਿਚ ਨਿਕਾਲਦੇ ਹੋ, ਅਤੇ ਇਸ ਵੱਲ traffic ਨੂੰ ਮੁੜ-ਭੇਜਦੇ ਹੋ — ਜਦੋਂ ਤੱਕ monolith "strangle" ਨਹੀਂ ਹੋ ਜਾਂਦਾ। ਇਥੇ ਕੋਈ big-bang rewrite ਨਹੀਂ ਹੈ।
ਇਹ ਕਿਵੇਂ ਕੰਮ ਕਰਦਾ ਹੈ
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
