Insights / Splitting a monolith without rewriting it: the API contract is the seam

Splitting a monolith without rewriting it: the API contract is the seam

You don't break up a monolith by choosing a new language. You break it up by finding the seam — and the seam is the API contract. A field guide to a split that ships in stages.

Published

May 2026

Length

7 min read

Topics

Architecture · Modernization

Every monolith eventually gets the same memo: it's time for a rewrite. A new language, a new framework, a clean repository, eighteen months on the calendar. The memo is almost always wrong — not because the monolith is fine, but because the rewrite is a bet you usually lose.

The rewrite is a bet you usually lose

A full rewrite asks the business to fund two systems at once: the one earning revenue and the one that might replace it. For the entire build, you ship nothing. Every feature the old system gains is a feature the new one now also has to gain. The finish line moves at the same speed you do.

Worse, you've converted a known quantity into an unknown one. The monolith's behavior — including its undocumented behavior, the quiet special cases ten years of production taught it — is a specification you threw away. Most rewrites discover that specification the hard way, in incidents.

Find the seam

You don't break up a monolith by choosing a new language. You break it up by finding the seam — and the seam is the API contract.

A contract is a boundary you can freeze. Once two parts of a system communicate only through a stable, documented interface — an HTTP API, a message schema, a well-defined function signature — you can change either side without touching the other. The contract is the part that has to hold still. Everything behind it is free to move.

The language behind a contract is an implementation detail. The contract itself is the architecture.

Carve in stages, each one shipping

With the seam identified, modernization becomes a sequence of small, reversible moves instead of one large irreversible one. Stand up the new component behind the contract. Route a slice of traffic to it. Watch it. Route more. Retire the old path only when the new one has earned it.

The discipline that makes this work: every release reaches production. Not a staging branch, not a demo — production. If a stage can't ship on its own, it's too big; cut it smaller. A modernization that delivers value in week three is a modernization the business will let you finish.

What the contract buys you

Three things, all of them valuable. Language independence — the public surface of a site can be rebuilt in a static framework while the admin and the data layer stay on the runtime they were always good at. Parallel work — once the contract is fixed, two people can build the two sides at once. Reversibility — if a stage goes wrong, you roll back one component, not one year.

The honest version

Staged modernization is slower to feel heroic and faster to actually land. It won't give you the satisfaction of a green-field repository. It will give you a system that was never down, a team that never lost the thread, and a business that watched the value arrive in increments it could trust.

Find the seam. Freeze the contract. Carve in stages. Ship every one.