A ride-hailing server team wants to retire an endpoint that some old rider app builds still call; how do you decide when and how to switch it off?
answer
- count callers by build, not by date
- riders and rides, not just requests
- nobody to email on an installed build
- raise the floor before the switch-off
- a thin adapter is sometimes cheapest
basics
~20 sMeasure who still calls it by app build, in riders and rides, then either keep a cheap adapter or raise the hard minimum version above the last calling build. Switch it off only after that floor is in force.
solid answer
~50 sUnlike a public API with integrators you can email, installed builds cannot be told to migrate, so the decision is driven by **traffic by build version**: which builds still call the endpoint, how many riders and completed rides sit behind them, and whether any current build still calls it from a forgotten path. Then pick one of three exits. Keep a thin adapter onto the new service if it is cheap and those builds still carry real rides. Or raise the **hard minimum version** above the last calling build, wait for the block to take effect, and only then switch off. Switching off first is the worst order: old builds hit a generic error at that step, perhaps mid-booking, because a `Sunset` header or a 410 means nothing to code that was never written to read it.
go deeper
Recall that an installed build keeps calling the endpoints it shipped with, so an endpoint cannot be switched off just because newer builds stopped using it.
Explain the measurement: requests, riders and rides per build version, plus a check that no current build still calls the endpoint.
Show the order: raise the hard floor, let it take effect, watch traffic fall, then switch off, and know why Sunset and 410 move no old build.
Turn one-off retirements into a written support window with a scheduled floor, batching retirements and weighing riders lost against code kept.
## Why this differs from retiring a public API A public HTTP API retires an endpoint by announcing it, sending deprecation signals and emailing the teams that integrate with it, who then change their code. An installed app has no such loop: the code calling the endpoint is frozen inside builds on riders' phones. Nobody can be emailed into migrating it. The only levers the server holds are to keep serving the endpoint, to stop serving the builds that call it (the **hard minimum version**), or to switch it off and accept what those builds do. ## Step 1: measure the callers The app sends its build version and platform on every request, so the server can break the endpoint's traffic down: - **Requests per build version and platform**, to see which builds call it at all. - **Distinct riders and completed rides from those builds**, because a build that calls the endpoint once a day on launch is not the same as one that calls it on every booking. - **Calls from current builds**, which should be zero; a forgotten retry or background refresh in a recent release would otherwise be broken too. - **The trend**, since natural upgrades may shrink the tail on their own. In this scenario the old ride-estimate endpoint is called only by builds below 4.2, and those builds account for 2% of weekly riders. ## Step 2: choose an exit | Exit | What old builds see | Cost | Fits when | |---|---|---|---| | Keep a thin adapter onto the new service | Business as usual | Code to maintain and test against old builds | Real rides still flow through those builds and the adapter is small | | Raise the hard floor, then switch off | An update block, then nothing | Riders who cannot or will not update are turned away | The tail is small, or the endpoint is costly or unsafe to keep | | Return a degraded but valid response | A reduced feature | Must know exactly how the old build reacts | The build is known to handle, say, an empty list well | | Switch off with 404 or 410 | A generic error at that step | Broken flows, support load, bad reviews | Almost never for a call on the booking path | Keeping the adapter is not a failure of discipline: if the endpoint is cheap and the builds still carry real rides, it may be the right answer for a while. Blocking is not a failure either: an endpoint that leaks data or cannot price fares correctly justifies a hard floor. ## Step 3: get the order right 1. **Raise the hard floor** above the last build that calls the endpoint. 2. **Wait for it to take effect.** Builds see the block only when they next reach the server, so a rarely opened build may call weeks later. 3. **Watch the endpoint's traffic fall** to what the team accepts, from builds that predate the gate contract and could not be gated gracefully. 4. **Switch it off**, and keep monitoring for stray callers. Reversing the order means old builds meet a missing endpoint first. The rider taps "Request ride" and gets "Something went wrong", with no hint that an update would fix it. ## What the deprecation headers can and cannot do The `Deprecation` and `Sunset` response headers tell a client, at runtime, that a resource is deprecated and when it is expected to stop responding. They are useful for newer builds written to log or report them, and for any other consumers of the same API. They cannot move an old build: a client that does not interpret `Sunset` keeps operating as usual and simply finds the resource unavailable one day. Their mechanics belong to the HTTP API's own versioning policy; for the installed app, the gate is the signal that works. ## Turning one decision into a policy Doing this endpoint by endpoint is slow. Teams that ship for years usually write a **support window** down, for example "builds older than a stated age are blocked unless traffic data says otherwise", and raise the floor on a schedule, retiring several old fields and endpoints at once. The window's length is a company choice, set from the install base by version and what blocking costs, not a standard number.
- Some builds below the floor predate the gate contract. What happens to them?They cannot recognise the block, so they see whatever their generic error handling shows, both from the gate and from the switched-off endpoint. The server cannot fix that. The practical response is to measure how many riders are on those builds, accept the loss once it is small enough, and make sure every build from now on ships with the gate contract.
- Telemetry shows a current build still calls the old endpoint. What now?Stop and fix the client first. Some path in the current release, often a retry, a background refresh or a rarely used screen, still depends on the endpoint, and switching it off would break up-to-date riders too. Move that path to the new endpoint, ship it, and restart the count from the release that no longer calls the old one.
- Send a Sunset header for six months, then switch it off.
- A 410 Gone response will prompt old builds to update.
- Switch the endpoint off first, then raise the minimum version.
- Request counts alone tell us how much switching off will hurt.
- Keeping any adapter for old builds is always a mistake.