Our microservices can only be released together
“Every release ships five services in a fixed order. Deploying one alone breaks another, staging is the only place anyone trusts, and one slow service makes all of them slow.”
THE PRINCIPLE
A service boundary is real only if you can deploy either side alone. If two services always change together, they are one module split across the network.
FIRST MOVES
- Measure it: for the last 20 releases, count how often each pair of services changed together and which ones could not ship alone. That list is the real boundary map.
- Make every contract change backward compatible: add fields, tolerate unknown ones, never remove or repurpose in one step. Breaking changes get a new version that runs beside the old one.
- Gate deploys on verified compatibility with what is live in the target environment (consumer-driven contracts) instead of on a shared staging run.
- Find chatty pairs (many calls per request, or calls in both directions) and either merge them or move the boundary; Azure's guidance is to redraw boundaries when two services constantly exchange data.
- Replace synchronous calls the caller doesn't need an answer to with events, so one service being down or slow doesn't take the others with it.
TOOLS: THEN → NOW
Shared integration environment and coordinated release trainsPer-service pipelines gated by contract verification (Pact can-i-deploy)
Shared DTO libraries upgraded in lockstepPublished, versioned schemas (OpenAPI, Protobuf, Avro) with additive evolution
Splitting further when coupling hurtsMerging tightly coupled services back into a modular monolith where that is cheaper
PATTERN SNAPSHOT
# Each service ships on its own; the broker knows what is live where.
pact-broker can-i-deploy \
--pacticipant orders --version "$GIT_SHA" --to-environment production
./deploy.sh orders "$GIT_SHA"
pact-broker record-deployment \
--pacticipant orders --version "$GIT_SHA" --environment productionCLOSE THE AI. EXPLAIN THIS.
Name two signals that two services are really one module, and the two options for fixing it.HOW IT WORKS UNDERNEATH
RELATED SYMPTOMS
SOURCES
- microservices.io: Pattern: Microservice architecture (opens in new tab)Checked
- Azure Architecture Center: API design (versioning) (opens in new tab)Checked
- Azure Architecture Center: Data considerations for microservices (opens in new tab)Checked
- InfoQ: Sam Newman on monolith decomposition and the distributed monolith (QCon London 2020) (opens in new tab)Checked
- Pact Broker: Can I Deploy (opens in new tab)Checked
Guide reviewed