← Back to the library
ArchitectureDeep dive · 9 min

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

  1. 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.
  2. 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.
  3. Gate deploys on verified compatibility with what is live in the target environment (consumer-driven contracts) instead of on a shared staging run.
  4. 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.
  5. 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 production

CLOSE 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

SOURCES

Guide reviewed