Free — no signup required

Choosing What to Strangle First

2 min read

The Art of Slice Selection

Not all parts of the monolith are equally good candidates for early migration. Choosing the wrong first slice can doom the entire effort — either by being too risky (breaking critical functionality) or too trivial (failing to demonstrate value to stakeholders and losing organizational support).

Criteria for selecting your first slice:

Factor Ideal First Candidate Avoid First
Business risk Low-risk, non-critical path Payment processing, authentication
Coupling Loosely coupled to other modules Deeply entangled with shared state
Change frequency Changes often (high business value from migration) Stable, rarely touched
Data complexity Simple, well-understood data model Complex joins across many tables
Team expertise Team understands this domain well Tribal knowledge, no documentation
Blast radius Outage affects a small subset of users Outage affects all users

A common first candidate is something like a notification service, user preferences, or search functionality — features that are relatively self-contained, have clear API boundaries, and where a brief outage wouldn't be catastrophic.

The "Seam" concept: Michael Feathers, in Working Effectively with Legacy Code, defines a "seam" as a place where you can alter behavior without editing the code in that place. Look for natural seams in the monolith: distinct URL paths, separate database tables, isolated background jobs, or features that are only called from one place. These are your extraction points. A feature that is called from 40 other places in the monolith is not a seam — it's load-bearing infrastructure.

Anti-pattern: "Strangling from the inside." Some teams try to refactor the monolith's internal code into cleaner modules before extracting them. This is tempting but dangerous — you're modifying the fragile system you're trying to escape. The Strangler Fig pattern works precisely because you build outside the monolith and redirect traffic, never touching the legacy internals until you're ready to delete them.

Key Point: The first slice you extract sets the organizational pattern for all subsequent extractions. It establishes the proxy configuration conventions, the CI/CD pipeline templates, the monitoring dashboards, and the team's confidence. Invest disproportionate effort in getting the first one right — it's a template, not just a feature migration. A first extraction that goes smoothly builds the organizational momentum needed to complete the remaining 95% of the work.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free