BISWAS Bengali reliability markBISWASAGENTIC RELIABILITY & TRUST
← All stories

AI OBSERVABILITY · INCIDENT REVIEW

One deleted flag, one shared cache, every AI feature down

A flag cleanup sent nearly every chat request down an experimental agent path. It worked for two and a half hours, then saturated a shared cache and took permission checks with it. What happened, why rollback took five hours, and the five signals that were missing.

Deepak BiswasDeepak Biswas
19 November 2026 · 18 min read

A personal learning write-up, drawn from an incident review I studied and retold as a generalised case. The company, the products, the tools, the people and the dates are removed, and components are named by the job they do. Every code snippet, query, alert, metric name and number below is written for this post and is not taken from any real system. The numbers are illustrative and chosen so you can check the arithmetic. The telemetry is what I would build. It is not a description of anything that was running.

The alert fired on time. I'll start there, because it's the uncomfortable part.

A WHAT STOPPED WORKING

6AI features down,
in every region
  • Chat
  • Agents
  • Bots inside chat apps
  • Search answers
  • AI features in the issue tracker
  • Live chat on the service desk

People got “access denied” or no answer at all.

B DID ANYONE NOTICE?

Yesstraight away
  1. 1The alert firedThe service’s own alert caught it
  2. 2An incident openedBy itself. Nobody had to raise it
  3. ✓Detection workedNo time was lost here

C THE QUESTION

So what was the problem?

The alarm did its job. Three other things went wrong.

D PROBLEM ONE: TIME

2½ hrsit hid. The bad change was live, nothing failed, nobody knew
5 hrsto undo. Everyone knew, and getting the old version back kept failing
bad change shipsalert firesold version is back

The warning sign was there the whole time, on a network graph. No alert was watching that graph.

E PROBLEM TWO: THE BACKUP ALARM

The second alarm never spoke up

A central monitor is meant to notice a big outage on its own and raise the urgency. It stayed silent. Its alarm line was set too tight, tighter than a normal day.

  1. 1A normal day crossed the line
  2. 2So it was already ringing about nothing
  3. 3The real outage landed inside that false alarm
  4. 4It read as more of the same. The urgency was never raised

F PROBLEM THREE: HOW MANY PEOPLE?

The damage count missed most of the damage

One dashboard was built to answer “how many people are hit?”. It only counted requests that reached an AI agent.

NOT COUNTEDRequests turned away at the door, at the permission check, before any agent started. By the review’s upper-bound count, most of the people affected.
COUNTEDRequests that reached an agent and then failed.

That was the blind spot. The outage looked much smaller than it was.

Figure 1. Every AI feature failed and the alert fired on time, yet three other things went wrong.
WHAT A USER SAW
Summarise the open incidents for my team
You don’t have access to this feature.
Summarise the open incidents for my team
Something went wrong. Try again.

Same user, same permissions as yesterday.

WHAT THE CACHE DASHBOARD SHOWED
22%CPU
41%memory
normalconnected clients
—network bandwidth: not on the board, no alert
Figure 2. In the worked example, a failed chat sits beside the cache dashboard from the same hours.

No model misbehaved in this story. I can't find a prompt, a token count or an answer-quality score anywhere in the causal chain. That's why I think it's worth an AI team's time: the failure sat in the plumbing around the model, where most AI monitoring doesn't look.

The system, one block at a time

Ten blocks matter. Click through them before reading on, because the failure only makes sense once you know which blocks share what.

Figure 3. The production architecture by role. Select a block to read what it does and how it failed.

Three design choices let one bad deploy reach everyone.

The first was the shared cache. An experimental long-running agent mode, the long-run path in the diagram, became the default for all chat traffic. It stored its working state in the same cache cluster that held permission answers, and every AI surface needs a permission answer before it does anything. When the agent’s data filled the cache’s network link, permission lookups slowed down with it.

The second was running in a single region. The orchestration service sat next to the model gateway to keep latency low, which meant there was nowhere else to send traffic when that region got into trouble.

The third was the release process. The change passed a short soak in staging and tests at lower scale, then went to all users at once. No small group of real users got it first, so the first real test at full traffic was the whole customer base.

What broke, frame by frame

Here's the whole incident on that diagram. Press Play, or step through with the arrow keys. Watch the strip of four monitors under it as much as the boxes.

Figure 4. Eight frames replay the incident on the architecture, above a strip of four monitors.

Deleting the feature flag switched on the wrong feature. The flag had never been rolled out, and the cleanup kept the code behind it, so the long-running mode began handling nearly every chat request. Each of those requests moved about 75 times more data through the shared cache, and that choked the cache’s network link without one extra request arriving. This is precisely why the usual monitoring showed nothing odd. Request counts were normal. Cache CPU and memory were normal. The resource that ran out was network bandwidth, and it sat on a graph of its own that no alert watched.

× SAME REQUESTS, MORE BYTES

75×more cache data for each chat request40 KB → 3 MB
16%of the cache’s network ceiling, in quiet hours2,000 req/min × 3 MB = 0.8 of 5 Gbit/s
104%of the ceiling, at the daily peak13,000 req/min × 3 MB = 5.2 of 5 Gbit/s

The deploy went out in quiet hours, so the link had room for about two and a half hours. The daily peak did not fit. Through all of it the request count was unchanged, cache CPU read 22% and cache memory read 41%.

Figure 5. Cache traffic created by one chat request before and after the cleanup, in the worked example.

From a slow cache to “access denied”

Permission answers lived in the same cache as the agent’s data. Once the network link was full, permission lookups timed out, and each failed lookup became a direct call to the permission service. In the worked example the cache normally answers nine checks in ten. When it answered only three in four, direct calls rose two and a half times and went past the rate limit set for this caller. The permission service rejected the extra calls, the check failed closed as it should, and users saw “access denied” on features that never use the long-running mode.

IN THIS INCIDENT
Permission checkcache first, then ask Permission servicerate limit per caller Shared cachenetwork link fullagent data fills it ✕ 1. Lookuptimes out 2. Direct calls2.5 times more 3. Rate limit used 60%was 150% during the incident limit 4. Rejected “Access denied”on every AI feature
REDRAWN FROM THE PAPER “METASTABLE FAILURES IN DISTRIBUTED SYSTEMS”, BRONSON, AGHAYEV, CHARAPKO AND ZHU, HOTOS ’21 [1]
APPLIES TO THIS INCIDENT DID NOTAPPLY Stable Vulnerable Metastable Increasing loada rate limit sizedfor a working cache Triggerthe cache link fills Recoverythe rollback Sustainingeffect
Figure 6. Permission checks diverted from a full cache into a rate limit, beside the state model from the metastable failures paper.

The permission rate limit had been sized for a cache that always worked. Bronson and colleagues give this gap a name in their paper on metastable failures [1]. Advertised capacity is what a system handles while its cache is helping, and hidden capacity is what it handles without it. Their example is a database behind a cache with a 90% hit rate, which can serve ten times the traffic it could serve alone. This incident was not a metastable failure in their sense, because service recovered once the trigger was removed, and that is why the sustaining loop sits outside the dotted outline. The capacity gap is the same one.

The shape of the incident

The incident has two parts of very different length. In the short one nothing failed and nobody knew. In the long one everybody knew, and each way back to the previous build was blocked.

2½ hrsHIDDENThe bad change is live. Nothing fails.
  1. The cleanup is deployed in quiet hoursThe unused flag is deleted and the code behind it is kept
  2. The long-running mode takes nearly all chat requestsEvery request succeeds and moves 75 times more cache data
  3. The working day starts and traffic climbsCache network use climbs with it, and no alert watches it
  4. The cache’s network link fills upReads and writes time out, then permission checks fail
The service’s alert fires and an incident opens. Detection worked. The clock on the second part starts here.
5 hrsGETTING BACKEverybody knows. Each way back is blocked.
  1. Add more serversThe limit is the cache’s network link, not the serversNo change
  2. Raise the permission rate limit until it is doubledRate-limit errors fall and cache timeouts riseErrors moved
  3. Run the rollback commandIt fails with an error that explains nothingBlocked
  4. Roll back through the deploy pipelineOne step fails intermittentlyBlocked
  5. Start servers for the previous buildStacks kept from earlier deploys have used up the load balancer’s capacityBlocked
  6. Pass the health check on the previous buildThat build depends on the same overloaded cacheBlocked
  7. Delete the old stacks, and the previous build goes liveThe long-running mode drops to zero and cache traffic returns to normal
45 minCONFIRMING
  1. Recovery is confirmedPermission answers come from the cache again and direct calls fall under the rate limit

Steps are grouped by kind. Some overlapped on the clock, and the rate limit was still being raised after the first rollback attempt. Durations are rounded.

Figure 7. The incident has a short hidden phase and a long phase spent getting the previous build back.

Five observability blind spots that add to MTTR

Each blind spot below is set out the same way: what was measured before, the metric to add, how it is calculated, and what it reads on a regular day and in this incident. The readings come from the worked example. None of these metrics was running at the time.

1. Which execution mode handled the request

Measured beforeThe feature-flag setting for the long-running mode. On a regular day it read “off, 0% of requests”. During the incident it read nothing, because the flag had been deleted. The code behind the flag still ran, and no metric recorded that.
Metric to addai_route_decisions_total, a counter. It goes up by one each time the router sends a request to a mode. Labels: ai_execution_path (standard or long_run) and the build that served the request.
How it is calculatedRequests per minute in one mode, divided by requests per minute in all modes. The result is that mode’s share of traffic.
Regular daylong_run 0%, standard 100%.
This incidentlong_run 97%, standard 3%, from the first minutes after the deploy.
AlertA mode’s share is more than 5 points above its approved share for ten minutes. The approved share for long_run was 0%.
Read it withThe build label. The share changes at build 4f2a, which names the deploy that caused it.

2. How much cache data each request moves

Measured beforeNothing per request. The cache reported totals, and nobody divided them by request or by mode.
Metric to addai_cache_io_bytes_total, a counter of bytes read from and written to the cache. Labels: ai_execution_path, the operation (read or write), the kind of key (agent state, permission, session) and the build.
How it is calculatedCache bytes per minute, divided by requests per minute. The result is bytes per request, for each mode and each build.
Regular day40 KB per request in standard mode.
This incident3 MB per request in long_run mode, 75 times more, starting at build 4f2a.
AlertA new build moves more than twice the cache bytes per request of the build before it.
Read it withMetric 1. Both change at the same build. The key label shows the extra bytes are agent state, so the new mode is the cause.

3. How close the cache is to its network limit

Measured beforeCache CPU and cache memory. They read 22% and 41% on a regular day and the same during the incident. Network throughput was not on the dashboard and had no alert.
Metric to addNetwork throughput of the cache nodes, in and out, as a share of the limit for that node size. This is an infrastructure metric from the cache itself, and its name depends on the provider.
How it is calculatedLive: throughput divided by the limit. Projected: bytes per request (metric 2) times yesterday’s peak traffic, divided by the limit.
Regular dayAbout 1% at the daily peak.
This incident16% in quiet hours (2,000 requests a minute at 3 MB is 800 Mbit/s of a 5 Gbit/s limit). 104% demanded at the peak (13,000 requests a minute at 3 MB is 5.2 Gbit/s). The projection reads 104% at the deploy.
AlertThe projection passes 80% of the limit, or live use passes 70%.
Read it withMetric 2 for the cause. CPU and memory stay flat and say nothing here.

4. How the permission service is being used

Measured beforeRate-limit errors returned by the permission service. They read zero on a regular day and rose only once the quota was already used up, so they showed the result and not the cause.
Metrics to addai_permission_cache_lookups_total, a counter labelled by result (hit, miss, error). ai_permission_outcomes_total, a counter labelled by outcome, reason and source (cache or live). Quota used, which is live calls per minute divided by the per-minute limit the permission service gives this caller.
How it is calculatedHit rate: hits divided by all lookups. Direct calls per check: outcomes with source “live” divided by all outcomes.
Regular dayHit rate 90%. Direct calls per check 0.10. Quota used 60% at the daily peak.
This incidentHit rate 75%. Direct calls per check 0.25, which is 2.5 times as many. Quota used 150%.
AlertQuota used passes 80%, or direct calls per check double.
Read it withMetric 3, and the order of events. If the hit rate fell before the quota ran out, the cache is the cause and a higher limit will not fix it.

5. What happened to each user request

Measured beforeAgent executions that started, and how many of them failed. At the peak that view read 14,000 executions and 10,500 failures, or 75%. A request stopped at the permission check never became an execution, so it was not counted at all.
Metric to addai_journey_outcomes_total, a counter that goes up once for every request attempt. Labels: the stage reached (entry, permission, routing, execution, stream), the outcome (completed, denied, failed) and the reason.
How it is calculatedCompleted attempts divided by all attempts. Failed attempts are then grouped by stage and reason.
Regular day99.6% of attempts completed.
This incidentIn the peak five minutes, 50,000 attempts. 3,500 completed (7%). 10,500 failed during execution. 34,500 failed at the permission check with the reason “dependency timeout” or “quota exhausted”. 1,500 were denied by policy, which is correct behaviour and not a failure.
AlertA burn-rate alert on completed attempts against the SLO. The service already had an SLO alert and it fired. The stage and reason labels are the addition.
Read it withMetric 4. The reason on the failed attempts points at the permission service, and metric 4 shows why it was overloaded.

How the five readings line up

Read in time order, the five metrics give the cause before they give the damage.

WhenWhat changes
At the deployMetric 1: long_run share goes from 0% to 97%. Metric 2: cache data per request goes from 40 KB to 3 MB. Both carry build 4f2a. Requests still succeed.
Deploy to peakMetric 3: cache network use climbs from 16% towards its limit as traffic rises.
At the peakMetric 4: hit rate falls from 90% to 75%, direct calls per check rise from 0.10 to 0.25, quota used goes from 60% to 150%.
Moments laterMetric 5: completed attempts fall from 99.6% to 7%, and 69% of attempts stop at the permission check.

Representative dashboard with 5 updated signals

Put the five on one time axis and the order of events is plain. The yellow ring on each panel marks where its alert line is crossed, and the column beside it names the rule and the signals to correlate it with.

AI REQUEST PATH · FIVE SIGNALSworked example, one day, made-up values

1Long-running mode, share of chat requests

deploylink full, alert firedrollback done alert line: approved share + 5 points 0%97%

ALERT WHENa mode handles 5 points more than its approved share for ten minutes.

CORRELATE WITHthe build id and the deploy marker.

2Cache bytes per request, by build

deploylink full, alert firedrollback done alert line: 2× the previous build 40 KB3 MB

ALERT WHENa new build moves more than twice the cache bytes per request of the build before it.

CORRELATE WITHpanel 1. If the bytes carry the long-running mode’s label, the mode is the cause.

3Cache network use, share of ceiling

deploylink full, alert firedrollback done ceiling 100% alert line 70% 1%16%104% forecast: 104% at peak a b

ALERT WHENeither of two things happens.

aForecast. Today’s bytes per request, at yesterday’s busiest traffic, would use more than 80% of the ceiling. The dotted yellow line is that forecast. Here it fires at the deploy.

bLive. Use right now passes 70% of the ceiling. Here it fires as traffic climbs.

CORRELATE WITHpanel 2 for the cause. CPU and memory stay flat and are no guide.

4Permission service, rate-limit quota used

deploylink full, alert firedrollback done rate limit 100% alert line 80% 60%150%limit doubled: 75%30%

ALERT WHENquota use passes 80%, or direct calls per check double (0.10 to 0.25 here).

CORRELATE WITHthe cache hit rate (90% to 75%) and panel 3. If the hit rate fell first, fix the cache, not the limit.

5User attempts completed

deploylink full, alert firedrollback done SLO line 99.6%7% completed the alert that existed fired here

ALERT WHENcompleted attempts burn through the SLO. This alert existed and it fired.

CORRELATE WITHthe stage and reason of each failed attempt. Here 69% ended at the permission check.

Panels 1 and 2 move at the deploy. Panels 4 and 5 move two and a half hours later, and panel 5 is the only one that had an alert.

Figure 8. Five signals share one time axis, and a yellow ring marks where each alert line is crossed.

This dashboard is a proposal drawn from the worked example. The review is clear that nothing showed the cache approaching its limit before the incident opened, so how early a real alert would fire is something to prove by replaying history. Panel 5 cannot warn early at all. Its job is to say how big the problem is, which is what a severity decision needs.

The code behind each signal is below, as sketches written for this post. Tenant, user and conversation ids stay off the metrics and go on spans.

Example: recording the path that ran (Python, OpenTelemetry)
from opentelemetry import baggage, context, metrics, trace

meter = metrics.get_meter("ai.orchestrator")
route_decisions = meter.create_counter(
    "ai.route.decisions", unit="{request}",
    description="Requests by the execution path that actually ran")

def route(request):
    # Decide first. Then record what was chosen, whatever chose it.
    if deep_reasoning_enabled(request):       # a flag today, a constant after cleanup
        path, gate = "long_run", "flag:deep_reasoning"
    else:
        path, gate = "standard", "default"

    route_decisions.add(1, {
        "ai.execution.path": path,
        "ai.path.gate": gate,
        "ai.experience": request.experience,  # chat, agents, search_answers ...
    })
    trace.get_current_span().set_attribute("ai.execution.path", path)

    # Baggage: every call below this point can read the path without being handed it.
    token = context.attach(baggage.set_baggage("ai.execution.path", path))
    try:
        return HANDLERS[path](request)
    finally:
        context.detach(token)
Example: the alert query (PromQL)
  sum by (ai_execution_path) (rate(ai_route_decisions_total{ai_execution_path!="standard"}[10m]))
/ on () group_left ()
  sum (rate(ai_route_decisions_total[10m]))
> on (ai_execution_path)
  (ai_path_approved_exposure_ratio + 0.05)
Example: a metered cache client (Python, OpenTelemetry)
cache_io      = meter.create_counter("ai.cache.io", unit="By")
cache_payload = meter.create_histogram("ai.cache.payload.size", unit="By")
oversize      = meter.create_counter("ai.cache.oversize_rejections", unit="{write}")

class MeteredCache:
    def __init__(self, client):
        self._c = client

    def _record(self, op, key, nbytes):
        attrs = {
            "ai.execution.path": baggage.get_baggage("ai.execution.path") or "none",
            "cache.operation": op,                      # read | write
            "cache.key_family": key.split(":", 1)[0],   # agent_state, permission, session
        }
        cache_io.add(nbytes, attrs)
        cache_payload.record(nbytes, attrs)

    def get(self, key):
        value = self._c.get(key)
        self._record("read", key, len(value) if value else 0)
        return value

    def set(self, key, value, ttl):
        if len(value) > MAX_VALUE_BYTES:              # a bound, and a refusal you can count
            oversize.add(1, {"cache.key_family": key.split(":", 1)[0]})
            raise ValueTooLarge(key, len(value))
        self._record("write", key, len(value))
        return self._c.set(key, value, ex=ttl)
Example: cache bytes per attempt, by build (PromQL)
  sum by (service_version, ai_execution_path) (rate(ai_cache_io_bytes_total[10m]))
/ on (service_version) group_left ()
  sum by (service_version) (rate(ai_journey_outcomes_total[10m]))
Example: a permission check that names its failures (Python, OpenTelemetry)
perm_cache_lookups = meter.create_counter("ai.permission.cache_lookups")
perm_outcomes      = meter.create_counter("ai.permission.outcomes")

def cached_verdict(user, resource):
    if cache_breaker.is_open():                       # stop asking a cache that is drowning
        perm_cache_lookups.add(1, {"result": "breaker_open"})
        return None
    try:
        verdict = perm_cache.get(key(user, resource), timeout=0.05)
        perm_cache_lookups.add(1, {"result": "hit" if verdict else "miss"})
        return verdict
    except (CacheTimeout, CacheError) as err:
        cache_breaker.record_failure()
        perm_cache_lookups.add(1, {"result": "error", "error.type": type(err).__name__})
        return None                                   # a broken cache is a miss, not a denial

def may_use_ai(user, resource):
    outcome, reason, source = "allowed", "none", "cache"
    try:
        verdict = cached_verdict(user, resource)
        if verdict is None:
            source = "live"
            if not fallback_budget.try_acquire():     # token bucket, sized under the quota
                raise FallbackShed()
            verdict = permission_service.check(user, resource, timeout=0.3)
        if not verdict.allowed:
            outcome, reason = "denied", "policy"
    except FallbackShed:
        outcome, reason = "eval_failed", "fallback_shed"
    except QuotaExhausted:
        outcome, reason = "eval_failed", "quota_exhausted"
    except Timeout:
        outcome, reason = "eval_failed", "dependency_timeout"

    perm_outcomes.add(1, {"outcome": outcome, "reason": reason, "source": source})
    # Still fails closed. Only "allowed" lets the request through.
    return PermissionResult(allowed=(outcome == "allowed"), outcome=outcome, reason=reason)
Example: one outcome per attempt (Python, OpenTelemetry)
from contextlib import contextmanager

journeys = meter.create_counter("ai.journey.outcomes", unit="{attempt}")
tracer   = trace.get_tracer("ai.orchestrator")

@contextmanager
def journey(experience, tenant_id):
    j = Journey(stage="entry", outcome="failed", reason="unknown")
    with tracer.start_as_current_span("ai.journey") as span:
        try:
            yield j
        except Exception as err:
            if j.reason == "unknown":
                j.reason = type(err).__name__
            raise
        finally:
            # Low-cardinality labels on the metric.
            journeys.add(1, {
                "ai.experience": experience,
                "ai.journey.stage": j.stage,      # entry | permission | routing | execution | stream
                "ai.journey.outcome": j.outcome,  # completed | denied | failed
                "ai.journey.reason": j.reason,
            })
            # Who it happened to goes on the span, never on the metric.
            span.set_attributes({
                "ai.journey.stage": j.stage, "ai.journey.outcome": j.outcome,
                "ai.journey.reason": j.reason, "tenant.id": tenant_id,
            })

def handle_message(request):
    with journey(request.experience, request.tenant_id) as j:
        j.stage = "permission"
        perm = may_use_ai(request.user, request.resource)
        if not perm.allowed:
            # "denied" is a working system saying no. "failed" is a broken one.
            j.outcome = "denied" if perm.outcome == "denied" else "failed"
            j.reason = perm.reason
            return forbidden(perm.reason)
        j.stage = "routing"
        stream = route(request)
        j.stage = "stream"
        result = stream.run_to_completion()
        j.outcome, j.reason = "completed", "none"
        return result

What the team changed

The telemetry above is my wish list. The review also records what the team did, and most of it is about containment. I'm passing it on as reported. I haven't checked the current state of any of it.

A production canary boundary now exists, with a soak measured in hours, so a change meets real traffic on a small slice first. Alerts on cache network use were added. Rollback was standardised on the pipeline's default mechanism with a dedicated incident pipeline, and a later production rollback finished well inside its target without help from other teams. Safeguards for abandoned flags were being rolled out, so that removing an abandoned feature is no longer checked like removing a launched one.

Longer-running work was opened as well: moving critical permission caching off the cluster that experiments use, adding timeouts and exception handling to the permission cache path, attributing dependency traffic to each AI experience, regular capacity planning for the permission quota, counting entry-endpoint errors in the impact dashboards, revisiting the single region, and reviewing the long-run agent's resource use before it goes anywhere near wide exposure.

The stack I’d build this on

None of this needs a new product. Large SaaS engineering organisations have mostly converged on the same open pieces, and every signal in this post fits into them.

OpenTelemetry for instrumentation and transport. The SDKs give you the metrics, spans and baggage used above. The Collector gives you tail-based sampling and a place to drop or hash attributes before they leave your network. Three corners of its semantic conventions are relevant here, and it helps to know how settled each one is:

  • The GenAI conventions cover inference, agent invocation and tool execution. They moved to their own repository this year and are still marked as in development, so pin the version you emit. Use them at the model call. They don't describe path selection or the user's journey, which is why the ai.* names in this post are my own.
  • The feature-flag conventions define a feature_flag.evaluation event with the flag key, the variant and a reason. They're at release-candidate stage. Emit them, and remember what they can't do: a deleted flag evaluates nothing.
  • The database client conventions give you a stable db.client.operation.duration. As far as I can find, they define nothing for payload bytes. You have to add that yourself.

Prometheus, or a horizontally scaled store that speaks its query language, for metrics. Recording rules turn the ratios in this post into cheap series. Native histograms make payload-size distributions affordable. Exemplars link a spike on a chart to one trace that caused it.

Grafana or an equivalent for the views, with deploy markers on every panel. A trace store such as Tempo or Jaeger behind it. A columnar or log store for wide events, where tenant and user ids can live without multiplying your time series.

OpenFeature for flags, with its OpenTelemetry hook, so evaluations land on the trace that made them. LLM-specific tracing layers built on OpenTelemetry, such as OpenInference or OpenLLMetry, cover the model call in detail. A progressive delivery controller with automated canary analysis, such as Argo Rollouts or Flagger, is where “bytes per attempt, new build against old” turns from a chart into a gate.

Practices matter more than the tools, and these are the ones I'd adopt this week:

  1. Instrument the branch your code takes. Flags, configs and agent registries describe intent. The branch counter describes what ran.
  2. Alert on ratios that should stay flat between builds: dependency bytes per attempt, dependency calls per attempt, live calls per cached check. Raw totals rise and fall with traffic and hide a multiplier.
  3. Put a saturation alert on every finite resource, and write the list down. The USE method (utilisation, saturation, errors) is decades old and it would have put network bandwidth on that list.
  4. Define the SLO at the user's attempt, with failure stages and reasons. Use multi-window burn-rate alerts on it.
  5. Treat rate limits as load shedding and say so in the runbook. Before raising one mid-incident, name the number that should improve and watch that number.
  6. Give every cache call a deadline, a breaker and a budgeted fallback. Size the thing behind the cache for the day the cache is cold.
  7. Rehearse rollback with a shared dependency degraded. If the rollback gate needs that dependency healthy, you've found your next incident early.
  8. Check your detectors against their own baselines. One that opens on a healthy day will be busy when you need it.

Where I’d start

I wouldn't build all five signals at once. Three of them cover most of what went wrong in this incident, and the order matters. Once they exist, test each alert before you rely on it.

A BUILD THESE FIRST

  1. 1The branch counterCount requests by the mode that handled them. It is a small code change and needs no new infrastructure. Of the five signals, it is the one that changes while requests are still succeeding
  2. 2The metered cache clientRecord how much data each request reads from and writes to the cache, split by mode and by build
  3. 3The attempt counterRecord one outcome for every request a user makes, including the ones that fail before the agent starts. This changes how the SLO is defined, so expect the agreement to take longer than the code

B THEN TEST THE ALERTS

Trigger each alert once, on purpose

  1. ✓Route one test tenant to a mode that is not approvedThe alert should fire and name the mode and the build
  2. ✓Slow the cache down for a few minutesFailed permission checks should be recorded as a dependency timeout, not as a denial

C IN SHORT

Three questions the dashboard should answer

Which mode handled the request, how much it used from each shared dependency, and whether the user got an answer.

Figure 9. Three signals to build first, in order, with two tests that confirm the alerts fire.

References

  1. Nathan Bronson, Abutalib Aghayev, Aleksey Charapko and Timothy Zhu. Metastable Failures in Distributed Systems. HotOS ’21.
  2. Benjamin H. Sigelman and others. Dapper, a Large-Scale Distributed Systems Tracing Infrastructure. Google technical report, 2010.

Deepak Biswas is a senior engineering reliability leader working on automated incident detection, impact measurement, resiliency testing and disaster-recovery orchestration. More at https://biswas-ai.com. This article reflects personal learning and opinion, not the position of any employer.

CONTINUE THE CONVERSATION

What does this change for your platform?

Talk reliability with Deepak ↗

NEWSLETTER

AI observability,
in your inbox.

The latest technical news and trends in AI observability, AI infrastructure reliability and AI gateways.