Self-Healing Networks#
In the same CDN from Chapter 16, another ISP link, this time at the Amsterdam PoP, started to go bad (I told you, it happens very frequently). The on-call engineer in charge validated that everything was correct from his perspective: config in sync, BGP sessions established, and so on. So, the emergency procedure was clear: drain the circuit.
However, that day, before draining it, the engineer noticed on the incident management page that one of the service apps was reporting degraded performance, and he correlated both problems and observed the problem in the PoP’s ISP from different vantage points (other PoPs), discovering that the latency between them, via this circuit, had moved from 40 milliseconds to 130. This connected the dots: the network could look healthy but not behave correctly.
The aha moment was realizing that the information had been there during the forty minutes of degradation. Many of the other PoPs, when connecting to that PoP over the internet, could reproduce the user experience in the app, so measuring and collecting that data to infer that the ISP circuit was having a bad day was all that was needed to conclude where the problem was (even though it was not evident with the current checks).
This chapter builds on top of Chapter 16’s loop. In the previous one, we kept the configuration equal to intent. Here, we keep the service healthy when the configuration is already correct and the service is not. How? By reproducing the actual user experience and observing it from vantage points to conclude when things degrade (before receiving a page or a ticket).
It is the second loop of Part 5, and it leverages the same five stages as Chapter 16.
First, we draw the boundary between having the proper config and having a healthy service.
When the Config Is Right but the Service Is Sick#
Complex systems run in degraded mode.
Richard Cook
Chapter 16 ended on an ambiguous case it could not resolve: an ISP that is up, configured correctly, and carrying its share of users, yet performing badly. An ISP running at 4% loss is that degraded mode. To the conformance loop, that ISP is healthy, because a configuration and a RIB entry do not carry loss and latency. This chapter resolves it.
This chapter follows one content network and its ISPs, but none of it is specific to a content network. In a data center, the same loop drains a leaf uplink that a probe mesh between racks reports as lossy, by raising its BGP cost so ECMP stops using it. In a WAN, SD-WAN application-aware routing is this loop shipped as a product: probes per path, a threshold per application, and a policy that moves the traffic. Where a product already runs the loop for its own domain, use it. Build it on the Network Automation Platform (NAP) where intent spans vendors or domains the product cannot see.
Keep the two questions side by side. Chapter 16 asks: did the configuration drift from intent? This chapter asks: did the service stop being healthy, while the configuration stayed correct? They are different failures with different sensors. The first is a comparison against a stored value. The second is a measurement of the real world.
A brownout, a path that stays up but performs badly, falls in the blind spot of both defenses a network usually has. Session-liveness detection does not trigger, because it keys on an ISP or session going down, and a brownout keeps everything up. Configuration comparison does not trigger, because nothing about the configuration changed. The ISP is doing everything it was told; it is just doing it badly. Catching that requires measuring the path, not inspecting the device, and measuring the path is a capability the network does not have until you add it.
Figure 17.1 shows the loop this chapter builds: the same five stages as Figure 16.1, with a note beside each one this chapter changes. The sections that follow take it one stage at a time, starting with the sense it adds.
Synthetic Monitoring: The Missing Sense#
The missing sense is synthetic monitoring: active probes that generate test traffic and measure what happens to it, rather than reading counters off a device. Chapter 7 built a rich observability stack, but we treated it mostly as passive: it collects what the devices report about themselves. A device experiencing a brownout on an upstream ISP reports nothing wrong, because from its own point of view nothing is wrong. Only traffic that actually crosses the bad path feels the loss, so the only way to see a brownout is to send traffic across the path and measure it. Synthetic monitoring belongs to the Observability block: the probes are one more Collector input, and their results are one more signal Observability analyzes, next to the counters and the route state.
The technology is older than most automation stacks, and you probably run some of it already. The simplest probes are ICMP and UDP packets that measure reachability, loss, latency, and jitter. Most routers can generate and answer them on the box, through features such as Cisco IP SLA or Juniper RPM, and TWAMP (RFC 5357) standardizes the measurement between vendors. Probes can also speak the application: a Hypertext Transfer Protocol (HTTP) request that times the TLS handshake and the first byte measures what a user waits for, not just what a packet does. And where your own devices cannot reach, external probe networks can.
Probes are not specific to ISPs either: they work wherever a path can degrade while every device stays up. In a data center, a full mesh of probes between racks finds the bad link that no switch reports; Microsoft’s Pingmesh, in this chapter’s references, runs that at the scale of entire data centers. On a campus, a probe from a test host is the service-state check in the wave gates of Chapter 8. Toward the cloud, it measures the path to a provider region. It is one pipeline, built once. It feeds the wave gates, the observability stack of Chapter 7, and the service levels of the NAP itself in Chapter 12, as well as the healing loop this chapter builds.
Two design choices decide whether the measurement is worth anything: where you measure from, and what you send.
Where you measure from. A router cannot credibly measure its own uplink; if the uplink is bad, its own probes suffer the same fate and it has no baseline to compare against. So the measurement is external: every point of presence probes every other one, through each of its ISPs. The target is a probe responder at the remote point of presence, addressed from space that only that ISP routes, so the probe has to enter through that ISP.
The responder is a dedicated host or a reflector built for measurement, such as a hardware-assisted TWAMP reflector, never the router itself. Routers rate-limit and deprioritize traffic aimed at their own control plane. A probe that pings an ISP’s router reports loss that user traffic, which only passes through, never sees.
Each ISP is judged from the outside, by peers that do not share its fate. Across thirty points of presence this is a large full mesh, and the size is a feature: the more independent vantage points watch an ISP, the more trustworthy the verdict about it.
You do not have to build the whole vantage-point mesh yourself. Public measurement networks like RIPE Atlas, and commercial synthetic-monitoring services such as Catchpoint or ThousandEyes that keep probes in hundreds of networks, give you vantage points off your own infrastructure. They complement your own points of presence, and they are especially good at seeing your ISPs the way a distant user’s network sees them, not just the way your other sites do.
What you send. A probe measures the path the probe takes, which is not automatically the path the application takes. Figure 17.2 shows the difference.
A network engineer will spot the trap here. Across ISPs, Border Gateway Protocol (BGP) chooses the path per destination prefix. A probe aimed at an address in a different prefix from the content can leave or enter through a different ISP than the users it stands for, and you will confidently measure a path they never take. So each responder sits in a prefix that BGP routes through the same ISP, and along the same path, as the content traffic it represents.
The probe must resemble that traffic in the rest too. If the network treats DSCP classes differently, an unmarked probe measures a queue the application does not use. Match the protocol and the marking of the HTTPS flows it represents. A synthetic monitor that does not look like its workload is worse than none, because it produces confident wrong answers.
The same rule in a data center. Inside a bundle or an equal-cost group, the path is not chosen by BGP but by a per-flow hash over the packet’s 5-tuple. One probe flow rides one member and says nothing about the others. So vary the field the hash reads: keep the destination fixed and step the source port, one probe flow per port, until every member has carried at least one. That sweep is what a probe mesh between racks needs to find the one lossy link in an ECMP fabric.
One more dimension decides what a probe represents: its address family. A dual-stack ISP carries IPv4 and IPv6 over what are often different internal paths and different peering arrangements, so the same provider can be clean on one and in a brownout on the other. A probe measures the family it is sent over and says nothing about the other. So the mesh runs both, the quorum is judged per family, and the drain is per family too: you may withdraw an ISP’s IPv6 and leave its IPv4 in service, because only one of them is bad. Treating an ISP as a single health verdict across both families hides the one-sided degradation that is common in real networks.
Three details decide whether the numbers mean what they say.
- Clock sync. Round-trip time needs no clock synchronization, but one-way delay, which tells you which direction is bad, needs clocks synchronized well enough to measure it, usually through PTP or carefully disciplined Network Time Protocol (NTP); TWAMP supports both.
- Shared definitions. Loss and delay have precise definitions in the IETF’s Internet Protocol (IP) Performance Metrics RFCs (RFC 7679 for one-way delay, RFC 7680 for loss), worth adopting so that two tools reporting “loss” mean the same thing.
- Baselines. Judge every reading against the path’s own baseline: latency varies by hour, which is why the thresholds later in this chapter are relative to normal.
With trustworthy per-ISP measurements arriving from many vantage points, the question becomes when to believe them. Figure 17.3 shows the answer.
The answer is a quorum rule: treat an ISP as degraded only when a quorum, a configured fraction of the independent remote vantage points, agrees that it is degraded. One point of presence reporting loss to an ISP is more likely a problem at that site, or a fluke on one probe path, than a real ISP fault. A quorum of unrelated sites reporting the same degradation is a fact about the ISP.
Quorum turns a noisy field of individual measurements into a single trustworthy verdict, and it is what lets the loop act without a human sanity-checking every reading. At this scale the fraction is a real dial, and the From Signal to Decision section shows how to set it. At four sites, with three vantage points, quorum barely means anything; at thirty it matters. Apply it wherever a distributed measurement drives an automated action, because the cost of a single false vantage point is an unnecessary drain.
Quorum rests on an assumption worth guarding: that the vantage points fail independently. A shared upstream, a common transit provider or a peering point behind several of your sites, can make many vantage points agree for the wrong reason. Figure 17.4 shows the shape that gives it away.
If every vantage point degrades toward every ISP at one site at the same moment, the fault is almost certainly local to that site or its aggregation, not a coincidence across all its ISPs. Draining every ISP the site has would black-hole it, so the loop escalates instead.
The probe results themselves are just another telemetry stream. They flow into the same collection, normalization, and storage pipeline as every other telemetry stream; the Collector does not care whether a measurement came from a device counter or a synthetic probe. At scale the mesh is the thing to watch, because a full mesh of vantage points against ISPs grows with the square of the sites. Thirty points of presence probing three or four ISPs at each of the others is already a few thousand probe relationships. That cardinality follows the same collection-frequency and sampling trade-offs that Chapter 7 applies to any high-volume telemetry. Probe less often, sample vantage points, or introduce a hierarchy before the mesh outgrows the pipeline.
Probes and a quorum give a verdict. Turning that verdict into something the loop can act on is the next step.
From Signal to Decision#
A quorum verdict is not yet a decision. Turning it into one takes three steps, and each guards against a way the loop could hurt more than it helps.
Insist on persistence. A single degraded sample, even by quorum, is a spike, not a brownout. Require the degradation to hold across several consecutive intervals before it counts. Put numbers on it: probe each ISP every 30 seconds and require four sustained intervals. The loop then catches a real brownout in about two minutes and ignores a lone bad sample, the same hysteresis a network engineer applies to route-flap damping, for the same reason. Those two dials, the probe interval and the number of sustained intervals, are the whole trade-off between how fast you react and how often you react to nothing. The opening story’s forty minutes becomes two, at the cost of a two-minute floor on detection.
Correlate the degraded ISP to what actually rides it. An ISP is not the unit anyone cares about; a service is. The loop maps the degraded ISP to the prefix sets and users it carries, and from there to the affected content-delivery traffic. The decision is then “these users are riding a bad ISP”, not “an ISP has 4% loss”.
Emit a machine-consumable health event, the same alert-to-action payload the Alert-to-Action Interface section of Chapter 7 specified. It is structured for the next stage, not written for a human to read:
health_event: isp: dc-ams tier1-c family: ipv6 verdict: degraded quorum: 24_of_29 metrics: {loss_pct: 4.1, rtt_ms: 28, jitter_ms: 6} sustained_intervals: 4 affected_prefix_sets: [cdn-eu] correlated_site_failure: false detected_at: 2026-07-16T09:42:00Z
The threshold that decides what counts as “degraded” is the key design question, and it does not depend only on the network team. The team that runs the content service knows how much loss and latency its users can absorb before it matters; the network team does not. So the definition of “bad” belongs to the consumer: the team that runs the content service sets its own tolerance through a self-service Application Programming Interface (API), and the NAP enforces it. This is the point where Chapter 15’s view of the network as a product enters Part 5. The network is a service, the content team is its customer, and the drain behavior the customer gets is the Service Level Agreement (SLA).
The API should be simple, and simplicity here is also a guardrail. Do not let a consumer type raw numbers. Offer named tolerance levels (low, medium, and high sensitivity) that the NAP translates into concrete thresholds (loss percentage, latency ceiling, number of sustained intervals) stored in the Source of Truth (SoT). A high-sensitivity service drains an ISP at 2% loss; a best-effort one tolerates 8%. The named levels do two jobs at once. They keep the consumer out of numbers they have no basis to choose. And they bound the input, so a customer cannot set a pathological threshold that flaps the network or undercuts the minimum-service floor. The product exposes choices, not dials, and the choices are all safe.
Table 17.1 gives a starting point, to calibrate per service:
| Tolerance | Loss | Latency over baseline | Sustained intervals |
|---|---|---|---|
| High | 2% | 20 ms | 3 |
| Medium | 4% | 40 ms | 4 |
| Low | 8% | 80 ms | 6 |
Figure 17.5 shows what the last column buys. The curves are illustrative.
Each extra interval adds 30 seconds to detection and cuts the drains caused by noise. Medium sits where the curves cross; high reacts sooner and accepts more false drains.
Keep two dials apart. The tolerance in Table 17.1 decides what counts as bad from one vantage point. The quorum decides how many vantage points must agree before the loop believes it. With twenty-nine vantage points, a simple majority of fifteen already makes one wrong vantage point harmless. A supermajority (e.g., the 24 of 29 in the event above) takes a little longer to reach but ignores almost any correlated noise. Choose by what an unnecessary drain costs the service: if draining is cheap, take the majority and react faster; if it is expensive, wait for the supermajority.
A health event now says which ISP is bad and whom it hurts. Next, we explore how the loop moves the traffic.
Healing Through a Dynamic Intent Layer#
Like the drift event in Chapter 16, the health event is an event and not a report. The Observability layer emits it, and it triggers a remediation workflow in the Orchestrator (Chapter 8): the same event-driven handoff the two loops share. Healing has to move the traffic. How that workflow records the move is the central design decision of the chapter: it determines whether this loop cooperates with Chapter 16’s loop or wars with it.
The wrong way is to reach into the device and change the BGP policy directly, out of band. Do that and the Chapter 16 conformance loop, which is still running, retrieves the running config, finds a drain that declared intent does not mention, calls it drift, and reverts it. The two loops undo each other on every cycle.
The right way is a dynamic intent layer: healing does not edit declared intent and does not touch devices out of band. It writes a machine-authored, time-boxed override that says, in the same intent model the human uses, “for now, drain dc-ams tier1-c for cdn-eu”. The network is then reconciled against effective intent, which is declared intent with any active overrides applied on top. Chapter 16’s loop sees the drain as part of effective intent and enforces it instead of fighting it. The two loops compose because they read the same combined intent, as Figure 17.6 shows.
The override is a set of short records, one per active drain, kept beside declared intent, outside it. The two usually live in different stores, because they behave differently. Declared intent is slow-moving, reviewed, and versioned, which suits Git or the Source of Truth. The override is fast-moving, machine-written, and short-lived, which suits an operational store built for rapid writes and expiries. Both belong to the Source of Truth block, as Figure 17.6 shows, and effective intent is composed from both at read time: the federation idea of Chapter 5, one view over several stores, applied to intent itself. The listing later in this section shows one override record.
That composition has a failure mode to design for up front. If the override store is unreachable, the loop must not silently fall back to declared intent alone: that would drop every active drain at once and send traffic back onto the ISPs it just moved off. The safe behavior is to hold the last-known effective intent and alert that the override store is down, failing static, never open.
What “drain” means concretely is the outbound/inbound distinction Chapter 16 drew, and here it is the whole story. Outbound traffic, the content the point of presence sends back to its users, it commands. Lower the degraded ISP’s local-preference or weight, and the point of presence’s own route selection promptly moves those responses onto its other ISPs. Inbound, the requests users send in over that ISP, it can only influence. It can make the ISP’s advertisement less attractive with AS-path prepending or a community the transit acts on, or withdraw the content prefix from that ISP entirely. Then it waits for the internet to react.
Two standard tools do most of this work. The first is the GRACEFUL_SHUTDOWN well-known community (RFC 8326), which asks the neighbor to lower the preference of the routes it learned from you before anything is withdrawn, so traffic moves before packets are lost. The second is the set of action communities that most transit providers publish, such as “prepend toward this region” or “do not announce to that peer”, which steer inbound traffic more finely than withdrawing the prefix. The drain override renders into these.
So a full drain of a degraded ISP is two actions with two certainties: an immediate, reliable shift of the outbound traffic you command, and a slower, best-effort nudge of the inbound traffic you do not. Treating the inbound side as if it were as prompt and certain as the outbound is a classic way to be surprised by where users actually land.
This pays off a rule Chapter 16 followed on faith: it compared against effective intent even while the override was always empty. Now the override has contents, and nothing in Chapter 16 has to change.
Three properties make the override safe.
Ordered. The loop writes the override first. Then it renders the drain and pushes it through the very same Chapter 16 machinery: the Chapter 11 change workflow, with its waves and rollback, and the Chapter 13 audit trail. An autonomous drain takes the same governed path a human change takes, with no shortcut around governance, and that is part of what makes it safe to run unattended. Writing intent before changing the device closes the race where the conformance loop wakes up between the push and the override and briefly sees the drain as drift.
Bounded. The drain honors the minimum-service floor, which in Chapter 16 was only data in the model and here becomes an enforced limit. The loop will not drain an ISP if doing so would drop a prefix set below its minimum number of healthy ISPs.
And it is capacity-aware, the check a network engineer will insist on. Draining a degraded-but-working ISP moves its users onto the others. If the others cannot absorb them, the cure is worse than the disease. The synthetic probes cannot see that headroom, because loss and latency say nothing about spare bandwidth. It comes from the passive utilization telemetry of Chapter 7, the interface counters and the traffic matrix, which the loop reads alongside the probe verdict. The loop drains only when the remaining ISPs have the headroom to carry what it is about to move; if they do not, it does not silently relocate the congestion, it escalates.
Headroom alone is not enough, though, because ISPs are not interchangeable. Transit reaches the whole internet. A settlement-free peer routes only to its own customers, so it can absorb the prefixes it reaches and would black-hole the rest. The drain’s candidate set is the ISPs that both have the headroom and carry the affected destinations. If the only ISP with reachability is the degraded one, there is nothing safe to drain onto. The loop escalates instead of trading a brownout for an outage.
Self-reversing, and measured while drained. Draining an ISP moves user traffic off it, which raises a fair question: if nothing rides it, how does the loop know when it recovers? Because the mesh does not depend on user traffic. The probes keep hitting the responder addressed from that ISP’s space, and that address stays routed through the ISP even with the content prefix withdrawn. The same vantage points that saw the ISP go bad keep watching it while it is out of service. When they agree, by the same quorum rule and the same persistence requirement, that it has been healthy for long enough, the override expires and effective intent collapses back to declared. The drain undoes itself; nobody has to remember to undo a drain six weeks later.
Figure 17.7 shows the bounded check on two days at Amsterdam, with the same degraded ISP.
To make the bounded check concrete, put the model’s numbers to work. Amsterdam’s uplinks follow the same model as Frankfurt’s in Chapter 16: it serves cdn-eu over three ISPs of capacity_gbps: 10 each. The NAP holds each uplink to 80% safe utilization, so 8 Gbps is usable apiece. Suppose cdn-eu draws 12 Gbps, evenly spread at 4 Gbps per ISP, and tier1-c is the degraded one. Draining it asks the other two to absorb 4 Gbps. Each has 4 Gbps of spare (8 usable minus 4 in use), 8 Gbps between them. So the drain proceeds, and each survivor settles at 6 Gbps, under its ceiling.
Now suppose cdn-eu draws 21 Gbps, 7 per ISP. Each survivor has just 1 Gbps of spare, 2 Gbps between them against 7 needed. The drain would saturate them, so the loop escalates instead. Same degraded ISP, opposite decision, and the utilization telemetry is what tells them apart.
Each override record is small and self-describing, in the same intent model as the declared layer, so the loop can read both together:
override:
drain: dc-ams tier1-c
prefix_set: cdn-eu
family: ipv6
reason: quorum-degraded
quorum: 24_of_29
created_at: 2026-07-16T09:42:07Z
ttl: 30m
restore_when: healthy for 4 intervals by quorumThe record is also a small example of the technical-layer modeling of Chapter 4: no product ships it. You design the model yourself, at the level of detail you need, to track one kind of intent your network has.
Everything the three properties need is in it: what to drain, for which prefix set, and why, which the audit trail keeps. It also records when it was written, a time-to-live so it cannot outlive its usefulness the way an undocumented manual drain can, and the condition that ends it. Effective intent is the declared model with this record applied on top.
The time-to-live is a lease, not a timer for the drain. While the quorum still reports the ISP degraded, the loop renews it. If the loop cannot renew it because it has lost its senses, it escalates before the lease runs out, and the override holds until a human decides: failing static, the same rule as for the override store.
Those three properties are also what let this loop act on its own at all. The Continuous Compliance and Drift Remediation section of Chapter 13 set the rule, and Figure 13.11 draws it: auto-remediate only when restoring intent has no forwarding-plane impact and the change is unlikely to be deliberate; otherwise alert and wait. A drain moves traffic, so it fails the first test, and Chapter 16 kept routing on the alert-and-wait side. A healing drain is a deliberate exception, for two reasons. It is incident response, and an incident does not wait for a human or a window. And the three properties make it safe to run unattended: it is bounded by the floor and the capacity check, and it undoes itself.
The ISP drain is one remediation among many that follow the same shape. These are the ones teams usually automate first, roughly in order of risk:
- Recover an error-disabled port once a known, benign cause has cleared: automatic.
- Drain a link with rising CRC or FEC errors from an ECMP group or a bundle: automatic, inside the same floor and capacity checks.
- Bounce an access port after an 802.1X or DHCP failure on a single endpoint: automatic, rate-limited per port.
- Clear a stuck BGP session that stays down past a timer: recommend first, automatic once the track record supports it.
- Shift weight off an overloaded link: recommend only, until the capacity model is trusted.
- Respond to a hardware alarm (a fan, a power supply, an optic): recommend only. The fix is a spare part, so the loop drains traffic and opens the case, without acting on the device.
All of them run on the same machinery: an event from Observability, a workflow in the Orchestrator, and the Executor. The category name for it is event-driven automation, and Event-Driven Ansible and StackStorm are common examples.
That is the ideal goal. The rest of the chapter is about what happens when things go wrong.
Limits, Risk, and the Confidence Ladder#
When a measure becomes a target, it ceases to be a good measure.
Goodhart’s Law
Self-healing is the point in this book where automation starts changing production on its own, so how it fails needs more attention than how it works, starting with the one Goodhart warned about.
- Healing that hides the cause. The most insidious failure is that healing works. An ISP that browns out every afternoon and gets drained every afternoon looks, on the dashboard, like a loop doing its job. It is actually hiding a chronic ISP problem that belongs in a ticket to the carrier or a procurement conversation, not in an endless loop of automatic drains. The loop must count. A single ISP drained repeatedly over a window is an escalation, not a healing target, and the automation that silently absorbs the pain is the automation that prevents anyone from fixing the cause. The healthy dashboard has become the target, which is Goodhart’s Law at work.
- Flapping. Hysteresis needs both edges: drain on sustained degradation, and restore on sustained recovery. Without it, an ISP hovering at the threshold flaps in and out of service, and each flap is a routing change the whole network feels. The persistence requirement from the From Signal to Decision section and a deliberate hold-down before restoration are what keep a marginal ISP from becoming a metronome.
- Blast radius. The minimum-service floor and the capacity check are hard limits, not preferences. Picture a bad internet day, when several ISPs degrade at once. A loop that drains without either can drain a prefix set onto nothing, or onto an ISP that promptly saturates. The floor and the capacity check are the difference between healing and outage.
- The wrong diagnosis. Healing can simply be wrong about the cause. If draining an ISP does not restore the service, the problem was not that ISP, and continuing to drain is thrashing. The loop verifies that the drain actually helped, by watching the affected service recover, and if it does not, it stops and hands the incident to a human with everything it observed. The same correlated-failure shape from the Synthetic Monitoring section, all vantage points bad at once toward one site, is another such stop condition. Self-healing that does not know when to give up is an automated way to make an incident worse.
- Losing its own senses. The healer depends on the probe mesh and on whatever aggregates the vantage points into a quorum verdict, and both can fail. The rule is that the loop fails safe: no trustworthy data means no drain, never a drain on a guess, and a loud alert that the healer has gone blind so an operator knows the safety net is down. The probe mesh and the aggregator are themselves monitored, the same way Chapter 12 monitors the NAP itself. A self-healing system that cannot tell when it has lost its own senses is more dangerous than no automation, because the operators have relaxed their watch on the very thing that has stopped working.
The first failure mode, healing that hides the cause, is interesting because when your automation masks network issues by fixing others’ problems, the root problem persists and does not get solved. It happened to my team: after checking logs, we discovered that an ISP was behaving very badly, and we had not opened a ticket because our automation was working around their problem. Later, when another ISP had a bad day, both coincided, and the overall capacity was impacted.
Those failure modes decide where self-healing sits on the Confidence Ladder from Chapter 14: above conformance. It does more than keep the network equal to a stored value: it changes the network in response to the world, without asking first. That is real autonomy, and it is earned with the automation track record from Chapter 14. How often did the quorum verdict match a real degradation, and how long did it take from the first degraded sample to the drain? How often did a drain restore the service, and how often did it have to be undone or escalated?
Prove it in a lab before production. netem, the Linux traffic-control module, adds loss and latency to one link in a containerlab topology, which is enough to watch the quorum form, the drain happen, and the override expire, all without a real brownout.
Where to start mirrors Chapter 16: detect before you drain. The minimum viable version is the full mesh, the quorum rule, and the health event, surfaced to the on-call engineer as a recommendation: “dc-ams tier1-c degraded by a 24-of-29 quorum, affecting cdn-eu, recommend drain”. The drain is a single confirmed action a human takes. That alone would have turned the opening story’s forty silent minutes into an alert and a click within a few minutes, with no risk of the loop draining anything on its own.
Wait until the automation track record shows the verdicts are trustworthy and the drains are helping. Only then let the loop write the override itself: first for the least critical prefix sets, and always inside the floor and the capacity check. A team that can reliably see a brownout by quorum is already most of the way to healing it.
Summary#
Every network scenario needs a slightly different approach to self-healing mechanisms, but the basic requirement is to be able to introduce synthetic monitoring (or leverage production traffic if available) to evaluate the real user experience on top of your network.
In the CDN scenario, measuring the performance of a single circuit from multiple perspectives provides enough information to introduce some logic (e.g., the quorum verdict) to conclude when something is not behaving as expected and needs to be mitigated (even if it matches your network intent). This mitigation override is constantly challenged to see if the conditions are still present and eventually goes away.
The closed loop of Chapter 16 enforced the desired state. In this chapter, we include the human’s tolerance in the equation and act accordingly, creating an override on the intent from logic defined by a human. This is great, but it is limited to a binary decision: to drain or not to drain (with safety bounds). Chapter 18 starts from here and introduces autonomous networks that solve a mathematical optimization problem, leveraging AI and agentic frameworks.
References#
- Pingmesh: A Large-Scale System for Data Center Network Latency Measurement and Analysis, Chuanxiong Guo et al. (ACM SIGCOMM, 2015). A full probe mesh across Microsoft’s data centers, the data-center version of the synthetic monitoring in this chapter.
- Computer Networking Problems and Solutions, Russ White and Ethan Banks (Addison-Wesley, 2017). Routing, traffic engineering, and measurement from first principles.
- Site Reliability Engineering, Betsy Beyer, Chris Jones, Jennifer Petoff, and Niall Richard Murphy (O’Reilly, 2016). Service level objectives and the discipline of acting on measured service health, the basis for consumer-set tolerance and the healing decision. (Full text free online.)
- Feedback Control for Computer Systems, Philipp K. Janert (O’Reilly, 2013). Hysteresis, damping, and stability, the tools that keep the healing loop from flapping a marginal ISP.
- Internet Routing Architectures, 2nd Edition, Sam Halabi and Danny McPherson (Cisco Press, 2000). BGP path control and traffic engineering, the mechanics behind draining an ISP with local-preference, communities, and advertisement control.
💬 Found something to improve? Send feedback for this chapter