Video in progress

You need to make a breaking change in an internal API that many teams use. How do you plan it?

First I find out who uses what (logs, tracing, contracts). Then I release the new version in parallel with the old one, add deprecation signals to the old one, watch the consumers migrate, and delete the old one only once its traffic drops to zero.

📖 Answer

The hardest part isn't technical: it's knowing who will be affected.

Identifying consumers. Gateway and service logs must carry a caller identifier: the client_id from client credentials, the service identity in the mesh, or at least the User-Agent. I add metrics so I can see at the endpoint and field level. The question "who reads the legacyStatus field in the /v1/orders response" is answered by contract tests. Without contracts there is no answer, so they have to be introduced in advance.

A parallel version. The new v2 is written, but the internal logic stays single: the v1 controller calls the v2 service and converts the response to the old format. That way you don't end up with two kinds of business logic.

Signals:

HTTP/1.1 200 OK
Deprecation: @1767225600
Sunset: Wed, 01 Apr 2026 00:00:00 GMT
Link: </docs/migration-v2>; rel="deprecation"

Besides that, a clear message to each team, a migration guide, and often me opening the PR for them myself. That is often the fastest way.

Tracking. A dashboard: v1 traffic broken down by consumer. The ones still left close to the sunset date get a separate conversation.

Removal. Even after traffic hits zero, not right away: a "brownout" for a week or two, where v1 returns 410 Gone in short time windows. A forgotten monthly batch job shows itself here, and that is cheaper than a prod outage.

If you can avoid the breaking change at all, by adding a new field and filling the old one alongside it for a while (expand/contract), that is the path I choose. A version bump is the last resort.