A real-world incident where an API change broke old mobile app versions: detection, rollback and mitigation, root cause, and the resulting policy for app-version telemetry, compatibility windows, minimum-version enforcement and deprecation.
Mobile is where backward compatibility hurts most, because you can't redeploy the client: app store review, staged rollouts and users who never update mean old versions call your API for months.
The story structure: detect through errors segmented by app version (I send an X-App-Version header and chart failures by it), mitigate first by rolling back the API deployment or flipping a feature flag, then find the root cause, typically a change that looked additive or harmless.
The lasting fix is a policy: a published support window for app versions, contract tests that run each supported version's expectations against every API build, expand-and-contract instead of in-place changes, and a minimum-version check with a graceful forced-upgrade screen for genuine breaks. The trade-off is carrying compatibility code for the length of the support window.
"The situation: at [company] we had a [retail] app with about [N] monthly users on iOS and Android, and an ASP.NET Core API behind Azure Front Door. A backend release [renamed
deliveryWindowtodeliverySlotand made it an object], because the new web front end needed it, and the web and the latest app version were updated together. What nobody accounted for was that [around 35]% of users were still on app versions from the last six months, which expected the old field.We detected it from the app side first: crash-free sessions in [Firebase Crashlytics / App Center] dropped on older versions within [20 minutes], and in Application Insights the checkout dependency failure rate jumped, but only for requests with older
X-App-Versionvalues. I was [on call / the tech lead]. My first action was mitigation, not diagnosis: we redeployed the previous API build through our slot swap in [about 10 minutes], and crash rates recovered. Then we found the cause in the PR: a field rename treated as a refactor, with no contract test covering older clients.The fix that mattered was the policy afterwards. We published a support window: the API supports every app version released in the last 12 months. Every request carries the app version, and we have a dashboard of traffic by version. Contract tests capture the requests and responses each supported app version uses and run on every API build. Changes follow expand-and-contract: add the new field, keep the old one populated until the last app version that reads it falls out of the window. And for real breaks there's a minimum-version endpoint the app checks at start-up, which shows a friendly upgrade screen instead of crashing. Over the next [year] we had [zero] incidents of that kind, and the forced-upgrade path was used [once], deliberately."
| Time | Event |
|---|---|
| T+0 | API release with field rename deployed to production |
| T+15 min | Crash-free sessions on app versions [4.1-4.6] drop from 99.6% to [91]% |
| T+20 min | Alert on checkout failure rate segmented by app version |
| T+25 min | Decision: roll back first, investigate second |
| T+35 min | Previous build restored via slot swap; crash rate recovers |
| T+2 h | Root cause found: rename without compatibility; no old-client contract test |
| T+1 week | Blameless review; policy and follow-ups agreed |
| Element | Detail |
|---|---|
| App version telemetry | X-App-Version and platform on every request; Application Insights custom dimension |
| Support window | All app versions released in the last 12 months (published to product and support) |
| Compatibility tests | Recorded contracts per supported app version run against every API build |
| Change rule | Expand and contract; no renames or type changes in place |
| Minimum version | GET /app-config returns minimumVersion; app shows upgrade screen below it |
| Deprecation | Old fields removed only when traffic from versions reading them is under [0.5]% |
The rollback took [10] minutes, but the incident affected about [8,000] checkout attempts. In the six months after the policy, oasdiff and the per-version contract tests blocked [four] changes that would have broken older app versions.
Checks incident handling under pressure and, more importantly, the senior ability to turn an incident into a durable compatibility policy.
Green flags
Red flags
web client: deploy ──► every user on the new version within minutes
mobile client: build ──► store review (hours-days) ──► staged rollout (days) ──►
users update over weeks... some never do
version distribution 3 months after a release (typical):
latest ██████████████████ 55%
-1 ███████ 20%
-2 ████ 12%
older ███ 13%
The API must serve the whole tail. A web release can be coordinated with the API; a mobile release can't.
You can only segment what you record. Options:
X-App-Version: 4.6.1, X-App-Platform: ios) set by the app's HTTP client.User-Agent (less reliable to parse).In ASP.NET Core, a small middleware puts these on Activity.Current as tags, which Application Insights records as custom dimensions. Then a KQL query groups failures by version:
requests
| where timestamp > ago(1h)
| summarize failures = countif(success == false), total = count()
by appVersion = tostring(customDimensions["app.version"])
| extend rate = todouble(failures) / total
| order by rate desc
Alerts should fire on the failure rate per version, because a total rate can hide a 30% failure in a version with 10% of traffic.
The fastest safe action is usually reverting the change:
Two practical approaches:
app start ──► GET /app-config ──► { minimumVersion: "4.2.0", recommendedVersion: "4.8.0" }
│
current < minimum │ ──► blocking upgrade screen (store link)
current < recommended ──► dismissible banner
The config endpoint itself must never break, so keep it tiny and version-neutral. The API can also return 426 Upgrade Required (or a ProblemDetails with a code like CLIENT_VERSION_UNSUPPORTED) when a too-old version calls a changed endpoint, which the app maps to the upgrade screen.
Blameless format: timeline, impact (users, transactions), what went well (fast rollback), what went wrong (no per-version contract), and follow-ups with owners and dates. The follow-ups, not the incident, are what an interviewer is listening for.
Activity.Current with X-App-Version and confirm it appears in Application Insights.GET /app-config with minimum and recommended versions from configuration.App-version telemetry, a minimum-version gate and an expand-and-contract response that serves old and new apps.
// Program.cs
using System.Diagnostics;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddProblemDetails();
builder.Services.Configure<AppVersionOptions>(builder.Configuration.GetSection("AppVersions"));
var app = builder.Build();
// 1. Record the client version on every request so failures can be segmented by version.
app.Use(async (ctx, next) =>
{
if (ctx.Request.Headers.TryGetValue("X-App-Version", out var v))
Activity.Current?.SetTag("app.version", v.ToString());
if (ctx.Request.Headers.TryGetValue("X-App-Platform", out var p))
Activity.Current?.SetTag("app.platform", p.ToString());
await next();
});
// 2. Tiny, version-neutral config endpoint the app calls at start-up.
app.MapGet("/app-config", (Microsoft.Extensions.Options.IOptionsSnapshot<AppVersionOptions> o) =>
TypedResults.Ok(new { o.Value.MinimumVersion, o.Value.RecommendedVersion }));
// 3. Expand and contract: new apps read deliverySlot; old apps still get deliveryWindow.
app.MapGet("/v1/orders/{id:int}", (int id) =>
{
var slot = new DeliverySlot(new DateTimeOffset(2026, 11, 21, 9, 0, 0, TimeSpan.FromHours(11)),
new DateTimeOffset(2026, 11, 21, 12, 0, 0, TimeSpan.FromHours(11)));
return TypedResults.Ok(new OrderResponse(
id,
DeliverySlot: slot,
// Kept until app versions that read it fall outside the 12-month support window.
DeliveryWindow: $"{slot.Start:HH:mm}-{slot.End:HH:mm}"));
});
app.Run();
public sealed class AppVersionOptions
{
public string MinimumVersion { get; set; } = "4.2.0";
public string RecommendedVersion { get; set; } = "4.8.0";
}
public sealed record DeliverySlot(DateTimeOffset Start, DateTimeOffset End);
public sealed record OrderResponse(
int Id,
DeliverySlot DeliverySlot,
[property: System.Obsolete("Remove when app < 4.7 traffic < 0.5%")] string DeliveryWindow);
// appsettings.json - change without a deployment via Azure App Configuration if needed
{ "AppVersions": { "MinimumVersion": "4.2.0", "RecommendedVersion": "4.8.0" } }
The incident is the least interesting part of this answer; interviewers want the system you built so it couldn't happen again, and evidence you balanced compatibility cost against product speed. A 12-month support window means carrying old fields and mapping code for a year, so I agree the window with product and make the cost visible: a dashboard of traffic by version and a list of compatibility shims with their removal conditions.
| Option | When it fits | Cost | When not to |
|---|---|---|---|
| Expand and contract in place | Most field and shape changes | Duplicate fields for the support window | Fundamentally different models |
New versioned endpoint (/v2/...) |
Large, incompatible changes | Two endpoints to maintain | Small additive changes |
| Backend for frontend per app major | Very different clients (mobile vs web) | Extra service to run | Small teams, similar clients |
| Forced upgrade (minimum version) | Security fixes, unavoidable breaks | User friction, store-review timing | Routine changes |
I measure success with crash-free sessions by app version, the share of traffic outside the support window, and the number of compatibility breaks caught in CI versus in production.
A breaking change is anything that makes a correct existing client fail or behave wrongly. Obvious ones are removing or renaming fields and changing types. Less obvious ones: a new required request field, stricter validation, a changed default or sort order, a different status code, and a new enum value that a client's exhaustive switch doesn't handle.
Adding optional fields and endpoints is safe only if clients are tolerant readers: they ignore unknown members and unknown enum values. System.Text.Json ignores unknown members by default, but opting into strict settings, such as UnmappedMemberHandling.Disallow or a plain JsonStringEnumConverter, makes a client throw JsonException on the next additive server change.
I protect compatibility with OpenAPI diffs for structure and consumer-driven contract tests (Pact) for the behaviour each consumer actually relies on, and I document what isn't promised. The trade-off: every observable behaviour becomes a contract, so you decide deliberately what you promise.
I add Asp.Versioning 10.x (Asp.Versioning.Http for Minimal APIs, plus Asp.Versioning.Mvc.ApiExplorer and Asp.Versioning.OpenApi), declare a versioned API with route groups per version, and let API Explorer group endpoints into v1 and v2 so the built-in OpenAPI support emits one document per version.
For deprecation I mark 1.0 as deprecated, so api-deprecated-versions is reported, and send the Deprecation header (RFC 9745, @epoch-seconds) and Sunset header (RFC 8594, HTTP-date) with a Link to the migration guide.
Both versions call the same handler; only the request and response DTOs and their mapping differ. The trade-off: every extra version is more mapping code and tests, so I keep the version count low and measure v1 traffic to know when to remove it.
Maybe. A mobile BFF owned by the app team lets the app's contract evolve with the app and isolates it from changes the web needs, which removes a lot of coordination. It can also aggregate several backend calls into one mobile-shaped response, cutting round trips and payload on slow mobile networks.
But it is another service to host, secure, monitor and be on call for, it adds a hop and a second contract to version, and it moves rather than removes compatibility: the BFF still has to serve every supported app version. I would introduce one when web and mobile needs genuinely diverge or the app team wants to own its API, not just to dodge one incident.
How to tell it (STAR)
**S:** A backend release renamed a delivery field for our new web front end and crashed checkout for the [third] of mobile users on older app versions. **T:** As [on-call tech lead] I had to restore checkout and make sure old app versions couldn't be broken like that again. **A:** I rolled back with a slot swap in [10 minutes] before investigating, then traced it through Application Insights segmented by app version to the rename. I reshipped it as expand-and-contract, and led the policy work: a 12-month support window, per-version alerts, contract tests for every supported app version and a minimum-version upgrade path. **R:** About [8,000] checkouts were affected that day; in the following [year] we had zero version-compatibility incidents, and CI blocked [four] changes that would have caused one.
Last updated 23 Nov 2026.