Closed-Loop Automation#
The Content Delivery Network (CDN) had thirty Points of Presence (PoPs) scattered across the globe, with a very consistent architecture of a handful of ISPs to connect to the public internet (3 or 4, plus a few local peerings). Under normal operations, with the default Border Gateway Protocol (BGP) config, the traffic in each PoP spread across all the connections.
One Tuesday at 02:00, a page woke the on-call engineer because some users were seeing a rise in latency and lossy connections, all of them reaching the Frankfurt PoP via one ISP circuit, tier1-a. Why? Not clear. To stop the bleeding and troubleshoot the problem without pressure, the engineer used a known exception: she skipped the NAP and connected directly to the router to drain the circuit, withdrawing the BGP prefix advertisement to steer the traffic off it, and moved the users from tier1-a to other circuits (or PoPs).
The errors stopped at once, which confirmed that tier1-a was the culprit and let her resolve the page and go back to sleep. A temporarily underperforming link is business as usual in the big internet, so she knew that the faulty link would clear by itself a few hours later, as it did.
However, the “correct” emergency drain was never undone. The change was not covered in the intent or in any documentation by the engineer to eventually roll it back. The change lived in that router from then on.
For six weeks, the PoP served all its users over two of the three ISPs without major problems. Nothing was broken, and two ISPs were enough to carry the load of an ordinary day within the performance expectations. The Observability block did not fire any alert because the dashboards looked healthy: BGP sessions up, traffic flowing, and no errors. However, the Source of Truth still said that tier1-a was active, and the reality in the router said otherwise. Nothing was comparing the two.
One day, a live event pushed extra traffic to the PoP, but still something the PoP was designed to absorb… with the three ISPs. Unfortunately, only two were active, so they saturated. For 30 minutes, the 95th-percentile time to first byte for all the PoP users climbed from 40 milliseconds to 180, and the complaints started. When the engineer logged into the box to troubleshoot, the fix was obvious: undo the emergency change, which recovered the service in 5 minutes. But the PoP users had already suffered an impact that could have been avoided.
The emergency drain was the right call at 02:00. There was a known exception to allow on-call engineers to move faster than the normal automation workflow, which requires review and approval. What failed was the process afterward: the change was not reconciled back. The NAP was completely unaware of the drift, and this is something that closed-loop automation solves.
This chapter builds the first and most basic control loop in Part 5: keeping the running network equal to the declared intent. It introduces the five-stage loop that I will develop in the following chapters. Here, we will focus on ensuring that the configuration and route state match the intent. More fun comes later.
The Closed Loop as Architecture#
Feedback is a method of controlling a system by reinserting into it the results of its past performance.
Norbert Wiener
Most network automation projects start as open-loop. A change is designed, validated, and deployed, and the workflow reports success when the last device accepts the configuration. The loop ends at deployment, and nothing reinserts the result. Whether the network still matches the intended state an hour later, a week later, or after someone else touches a device, is nobody’s job. The opening story is the natural consequence of an open loop: a change that succeeded, was never checked again, and drifted in silence.
In this story the team is mature: every change normally goes through automation. In a brownfield environment just adopting automation, the potential for old-style, out-of-band changes is much higher, even once a golden path exists to roll changes out through automation. That is where a closed loop pays off, because it catches the manual changes the golden path has not yet replaced.
A closed loop does not end at deployment. It treats the deployed change as a claim about the network and keeps testing that claim against reality. It runs five stages, shown in Figure 16.1:
- Define: state what the network should be, as intent in the Source of Truth.
- Sense: read back what the network is actually doing.
- Compare: find where the two differ.
- Decide: choose what to do about a difference, correct it or ask a human.
- Act: change the network, through the same change workflow as any other change.
The cycle is not new. Autonomic computing named it MAPE-K in 2003: Monitor, Analyze, Plan, and Execute, around shared Knowledge (Kephart and Chess, in this chapter’s references). Telecom standards for closed-loop and autonomous networks build on it, and the IETF describes the same cycle for intent-based networking in RFC 9315. This book uses plainer words for the same stages, and Part 5 runs them three times. Here they keep the configuration equal to intent, in Chapter 17 they keep the service healthy, and in Chapter 18 they choose a plan.
Two consequences follow. A first deployment, whether a new site, a new ISP, or a new service, is simply the first pass of Act, on a network where that intent is still missing. And a team with an excellent deployment workflow but no Sense and Compare stages has built half of the loop; the missing half is the one that would have caught the Frankfurt drain.
The loop is not a new building block. Figure 16.1 names the Part 2 block behind each stage: the Source of Truth (SoT) holds intent (Chapter 4), the Collector reads the network and Observability compares (Chapter 7), the Orchestrator decides (Chapter 8), and the change workflow (Chapter 11) and the Executor (Chapter 6) act. What Part 5 adds is the closure.
The sections that follow take the stages in order, starting with Define.
Define: Modeling the Network’s Intent#
A closed loop is only as good as the intent it compares against. If intent lives in a wiki page or an engineer’s memory, there is nothing to compare to. The loop starts in the SoT, and the first design decision is what to model.
Model intent, not configuration. Chapter 4 argued this in general; the content network makes it concrete. The Source of Truth should not store “AS-path prepend of 3 on interface X”. It should store the decision that produced that prepend, so that the loop can tell the difference between an ISP that is intentionally deprioritized and one that drifted.
Model it at Chapter 4’s two layers: a compact service-layer intent that a human declares, and a technical-layer intent that a deterministic expansion derives from it. The Source of Truth of Chapter 5 holds and serves both. The loop compares the running network against the expanded technical-layer intent, so the expansion must be deterministic and versioned: if the same input can produce a different output, every run looks like drift.
A service request is small. Someone wants to add a point of presence, bring up a new ISP at one, or change how a region’s users are spread across the ISPs that serve them. The information a human should have to provide is equally small:
pop:
site: dc-fra
isps: [tier1-a, tier1-b, local-c]
class: standardThat is service-layer intent: the smallest input that still expresses a decision. It says nothing about local-preference values, community tags, or how many ISPs must stay in service. Those follow from the class and the design.
Technical-layer intent is what the request expands into: the concrete, per-ISP routing policy that will be rendered to configuration. It also carries a minimum-service floor, min_service_isps: a hard lower bound on how many ISPs must keep carrying a prefix set. Listing 16.2 shows it.
isp_uplink:
site: dc-fra
isp: tier1-a
capacity_gbps: 10
local_address: 203.0.113.2/30
peer_address: 203.0.113.1
advertise: [cdn-eu]
egress_share: equal
export_communities: [65000:100]
prefix_set:
name: cdn-eu
served_by: dc-fra
min_service_isps: 2
tolerance: mediumThe model also holds what the loop and the next chapters reason about. Addresses come from the IPAM through the Source of Truth’s federation, so an address that drifts from its assignment is caught too. And each uplink’s capacity is there for the capacity check in Chapter 17. The floor is only data here; in the next chapter it becomes an enforced limit, once something drains ISPs automatically.
The Intent does not define only the desired configuration. It also states the intended operational outcome: which ISPs should carry a prefix set, and in what balance. Both perspectives come from the same data. Say cdn-eu is served over all three of Frankfurt’s ISPs at an equal share. That is a configuration intent: advertise the prefix on each. It is also an operational intent: spread its users across the three. You do not author the expected route state separately; it falls out of the model. Then, the Compare section has more concrete data to compare against (the route state).
One property of this network shapes everything that follows, so name it now: a point of presence steers user traffic in two directions, and it controls them to different degrees:
- Outbound, the content it sends back to users, it commands: its own route selection across its ISPs decides which uplink a response leaves by, with local-preference and the like.
- Inbound, the requests users send it, it can only influence. Other networks choose which ISP to reach the point of presence through. The most it can do is make one uplink more or less attractive with prepending, communities, or selective advertisement, and wait for the internet to react.
The two directions ride the same ISPs, so a bad uplink hurts both, but the tools and the certainty differ. When self-healing drains an ISP, it uses both directions, with different certainty.
This loop steers which ISP a point of presence uses, not which point of presence a user reaches. In a global content network the second decision, mapping a user to a nearby point of presence, is made a level up, by DNS-based global load balancing or by anycast. That layer is the faster tool when a whole point of presence is in trouble: pull the DNS answer or withdraw the anycast route, and users re-home to the next point of presence.
It is out of scope here, but it is not a different kind of system: it runs the same conform, heal, and decide loops this part describes, over its own intent and its own health signal. Draining an ISP keeps a point of presence healthy from the inside; steering users away from a point of presence is what you do when it cannot be healed at all.
The intent modeled in this section is the human-declared layer. It is authored by people, reviewed, and versioned. Self-healing adds a second author, a machine that writes a different kind of intent in response to what it observes. Both intents complement each other, but keeping them apart is cleaner.
One consequence of modeling intent this way is that most changes through the loop are data changes, not code changes, and they validate accordingly. Adding a point of presence or bringing up a new ISP edits source-of-truth data and re-runs an expansion whose rules are unchanged and already proven, and the Executor renders the result with adapters that are equally unchanged. That needs data validation, schema checks, and referential ones: the ISP exists, its addresses are allocated, the minimum-service floor still holds. It does not need a full network simulation, because no new device behavior is introduced. Simulation (Chapter 10) is reserved for changes to the templates or the expansion logic, or for high-risk config, where novel behavior is possible. Matching validation depth to what changed is what keeps the common case fast enough to run in a loop.
With intent defined, the loop needs to see what the network is actually doing.
Sense: Reading Back the Network#
Sense is the stage most automation skips, and it is two reads, not one. Use whichever management interface the device offers for structured configuration and state; Chapter 10 compares them. The loop does not care which, only that it can both push configuration and read reality.
The first read is the running configuration: the routing policy for each ISP uplink and prefix set. This answers “was the device set up the way intent said?”
The second read is the operational route state: the best path the device selected for each prefix set, the effective local-preference in force, and the ISP the traffic is leaving through. This answers “did the intent actually take effect?” These are different questions, and the next section is built on the difference.
Retrieving state is the Collector’s job from Chapter 7. On a small network you can pull the running config and route state on a schedule, every cycle, and hand the answer to the comparison. At scale that pull gets expensive, and it is also unnecessary, because the route state can be streamed. BGP Monitoring Protocol (BMP) exports a router’s BGP RIB to a collector as it changes, and a gRPC Network Management Interface (gNMI) subscription streams operational state the same way. Streaming turns the read-back from a periodic query into a change feed, which lowers the load and shortens the gap between a drift appearing and the loop seeing it.
Either way, the comparison cadence is a scaling decision, not an afterthought: it follows the same collection-frequency trade-offs as any other telemetry in Chapter 7, and the same sharding ones in Chapter 12.
Before the loop acts on what it senses, pre-checks confirm that acting is safe. They run at two different moments:
- Before a run starts. The read-back is fresh: every device in scope reported inside the collection window. The Source of Truth answered, and the records the run needs are complete. And nothing else holds the devices: no other workflow’s lease, no maintenance window, no emergency change waiting to be reconciled.
- Before a data change. An edit to intent passes the schema and referential checks of the Define stage, and the minimum-service floor still holds after it.
A failed pre-check stops the loop and raises an alert. It never falls through to a correction based on data the loop cannot trust, for the same reason a wave gate in Chapter 8 treats absent data as a failure, not a pass.
Two reads come back each cycle. Observability turns them into two comparisons, which I describe next.
Compare: Detecting Drift at Two Levels#
Trust, but verify.
Russian proverb
Configuration applied is not intent achieved. Those are two claims, and a closed loop verifies both: deployment is the trust, and the two comparisons below are the verify.
The configuration-level comparison normalizes the running policy and diffs it against the technical-layer intent, as the Executor’s adapter renders it. Normalization matters because a raw diff of vendor syntax is noise; the comparison happens on the normalized model from Chapter 7, so “local-preference 100” compares cleanly across platforms. A difference here is configuration drift: the device is no longer set up the way intent says. The industry calls this golden-configuration compliance, and most Source of Truth products offer it as a feature.
The route-state comparison diffs the actual best path the RIB selected against the path intent expects. A difference here means the intent was configured but not achieved: the traffic is not where the design put it. It compares against the operational intent from the Define section: the ISPs a prefix set should ride, and in what balance. So there is a concrete expected route state to diff against, not a guess.
Normalization is the Processor’s job, applied to configuration instead of metrics, and it is most of the work at the configuration level. Vendors reorder lines, insert defaults the engineer never typed, hash secrets differently on every read, and name interfaces their own way. Parse the running configuration into structure before comparing it, with a template parser such as TTP or ciscoconfparse, or read it as a model through OpenConfig. Then compare only the sections the Network Automation Platform (NAP) manages (yes, you could automate only part of your configuration).
Return to Frankfurt to see how the two levels differ. In the declared intent, the cdn-eu prefix set is served over all three of Frankfurt’s ISPs at once, its users spread across them evenly. Six weeks ago an emergency change drained tier1-a, steering its share onto the other two, and the drain was never undone.
- At the configuration level, the loop retrieves Frankfurt’s running policy and compares it to intent. Intent advertises cdn-eu over tier1-a at an equal share; the running config has it withdrawn. Mismatch, on the very next cycle. The loop reports configuration drift on dc-fra tier1-a.
- At the route-state level, the loop retrieves where cdn-eu’s users actually flow. Intent spreads them over three ISPs; the RIB shows them on two. Mismatch. The loop reports route-state drift on cdn-eu.
Either signal alone would have caught the Frankfurt drain six weeks early. So why insist on both? Because they fail independently.
A configuration can match intent perfectly while the route state is wrong. A neighboring network suddenly prefers a different ISP into Frankfurt, an upstream withdraws a prefix, a next hop changes: the advertisements are as declared and the users still arrive over the wrong uplink, or stop arriving at all. Configuration comparison alone reports all-clear, and only the route state sees it.
Turn it around, and a configuration can drift where route state cannot yet see it. Frankfurt’s intent includes how it should redistribute users when an ISP is drained; if that redistribution policy drifts, nothing changes today, because nothing is drained today, so the route state looks as intended. The drift sits latent in the config until the next drain applies it wrong, and only the configuration comparison catches it before then.
Comparing configuration tells you the device was set up as intended, while comparing route state tells you the intent was actually achieved. You want both because each is blind exactly where the other sees, and production breaks in either gap.
For inbound traffic, the router’s own RIB is the wrong witness: what matters is how the rest of the internet sees your advertisements. Public route collectors (e.g., RIPE RIS and RouteViews) and providers’ looking glasses show it. Two checks belong in the loop. Each prefix should be visible through the ISPs intent says should carry it. And its Resource Public Key Infrastructure (RPKI) state should be valid. A route origin authorization that no longer matches an advertisement makes the prefix invalid, and networks that filter invalid routes drop it silently. No device-side comparison will ever see that drift.
The route-state comparison has a limit, and it is the first thing a network engineer will worry about. The intended spread is really the intended spread under nominal conditions. If one of Frankfurt’s ISPs goes down and its users redistribute across the others, the network is doing what it should. That is not drift. A comparison that flags every ISP failure as drift will page the on-call engineer during every real incident and get muted within a week, which is worse than having no loop at all. So the route-state comparison cannot be a blind diff against the nominal spread. It has to ask a second question first: are conditions still nominal?
Part of that answer is cheap and local, and this loop already has it, because retrieving state tells you whether each ISP session is up and its next hop reachable. But the rest of the answer, whether an ISP that is up and configured correctly is carrying its users well, is the sense this chapter does not have. In the general case, telling a legitimate ISP failure apart from real drift needs the link-health signal that Chapter 17 introduces.
Until then, the workable rule has three cases. A missing ISP that is healthy and reachable is drift. A missing ISP whose session is down is an expected withdrawal. And the ambiguous middle, an ISP that is up but degraded, is the case Chapter 17 was written to resolve.
Two smaller rules keep the same comparison quiet: compare at prefix-set granularity, not per individual prefix, and treat a prefix spread across several ISPs as the normal state it is, flagging only a departure from the intended set of ISPs and their balance.
The scheduled mechanism that performs the comparison already exists: it is the continuous-compliance loop from the Continuous Compliance and Drift Remediation section of Chapter 13. This chapter reuses it and adds the second comparison level. Each cycle emits a drift event: a structured record the next stage can act on without a human parsing it.
drift:
device: dc-fra
prefix_set: cdn-eu
level: route_state
expected_isps: [tier1-a, tier1-b, local-c]
observed_isps: [tier1-b, local-c]
tier1-a_reachable: true
tier1-a_session: established
detected_at: 2026-07-14T02:14:09ZThe drift event is written for a machine to act on. The Observability layer emits it as the machine-consumable alert-to-action payload that the Alert-to-Action Interface section of Chapter 7 specified. It triggers a remediation workflow in the Orchestrator (Chapter 8), which makes the reconcile-or-alert decision the next section describes. The tier1-a_reachable and tier1-a_session fields travel with the event so that workflow can lean toward drift or toward a legitimate withdrawal before it pages anyone. Detection observes and announces; remediation decides and acts; the drift event is the handoff between them.
What the Orchestrator does with that event is the next question.
Decide: Reconcile or Alert#
A drift finding demands a decision: correct it automatically, or raise it for a human. The Continuous Compliance and Drift Remediation section of Chapter 13 already set the rule, and Figure 13.11 draws it. Auto-remediate only when restoring intent has no forwarding-plane impact and the drift is unlikely to be a deliberate manual change. Otherwise, alert and wait.
Routing sits on the risky side of that line. An engineer may have moved a prefix’s users on purpose during an incident, so the default for route-affecting drift is alert-and-wait: page the on-call engineer with the device, the prefix set, and the expected and observed ISPs. Reconciliation re-renders intent and re-pushes it through the same change workflow, with the same validation and rollback safety as the original change. Because the push relies on idempotency, reconciling a device already in the desired state is a no-op.
That no-op is the crux of the difference between the two drift levels. Configuration drift has an obvious cure: re-render and re-push. Route-state drift often has none, because the configuration may already match intent. If cdn-eu is missing from a healthy ISP that is configured to carry it, re-pushing the identical config changes nothing; the users moved for a reason outside the config, such as a more-preferred route from a neighbor or an upstream withdrawal.
The finding’s own fields point to the response. If the missing ISP’s session is down, it is a legitimate withdrawal: say so and stay quiet. If the ISP is healthy and its users still left, something the intent did not anticipate is overriding the design; escalate, so a human decides whether the intent should change. If the ISP is up but degraded, that is the ambiguous middle only Chapter 17 can resolve. Re-push cures configuration drift; route-state drift is more often a decision than a repair.
Auto-reconcile also has to coexist with people. A loop that reverts the on-call engineer’s 02:00 fix while they are still typing is the incident it was meant to prevent. The contract is the known exception itself. A direct change made under one is logged, and it pauses auto-reconcile on the affected devices until the change is reconciled back into the SoT. When the NAP itself is down, the break-glass path from the When the Path Is Blocked section of Chapter 11 follows the same rule. Without that handshake, the loop and the on-call engineer write the same devices toward opposite goals, the oscillation failure that the Boundaries, and the Confidence Ladder section names.
Timing is part of the same problem. A loop that reconciles at 14:00 on a Tuesday is making an unscheduled change, however correct it is. The NAP draws the line by urgency. Detection runs continuously. Automatic reconciliation is a change, and it is gated like one: inside a maintenance window, or against a standing change ticket for that class of drift, under the governance of Chapter 13. Healing in the next chapter is the deliberate exception, because it is incident response and it is bounded and undoes itself; the optimization in Chapter 18 is scheduled into windows by design. Detect always; change when the change process allows.
One design rule keeps this chapter from colliding with the next: compare and reconcile against effective intent, not the declared layer alone. Here the two are identical, because nothing else writes intent yet. The next chapter adds a machine that drains an ISP and records the drain as a temporary override, a second layer of intent. A loop that compared only against the declared layer would see that drain as drift and revert it, and the two loops would fight. Writing the comparison against effective intent now, while the second layer is empty, lets them compose later.
Once the loop has decided to change the network, the last stage is how it does so safely.
Act: Pushing Intent Safely#
The loop renders technical-layer intent into configuration and pushes it. Rendering is the Executor adapters’ job from Chapter 6: the intent becomes the routing policy, prefix lists, and neighbor settings for each platform in its own dialect.
Before the push, one check is cheap and catches a whole class of mistakes: configuration analysis. A tool such as Batfish reads the rendered configurations and answers what they will do to routing, such as which prefixes each ISP will receive and which paths will be preferred, without touching a device. It complements the simulation of Chapter 10 and is fast enough to run on every Act.
The push stages the change on the device, validates it there where the platform can, and commits it. Use a confirmed commit where the platform offers one: the device applies the change, and reverts it on its own unless the loop confirms within a timer. That bounds the blast radius the same way the execution rollback in Chapter 6 does. A mixed fleet needs a fallback for platforms without it: a pre-change snapshot and an external rollback path, as Chapter 6 describes. The whole push runs inside the change workflow from Chapter 11, with the same validation gates and wave controls as any other change.
Reconciliation also has to respect physics. BGP has to reconverge after a commit, and re-verifying before it settles shows phantom drift: the loop chasing a state still in motion. So the verify step waits a convergence window before comparing again, sized the way the Consistency Models section of Chapter 12 sizes any reconciliation window: a small multiple of the observation interval. The confirmed commit holds a safety net under the change while the wait gives the control plane time to settle.
The loop also has parameters: how long to wait before treating a difference as real, how often to compare, how large a reconciliation wave should be. They start as fixed values and improve from the NAP’s own record, in two ways. Engineers tune them from what the NAP reports: a drift class that self-resolves within one polling interval 95% of the time gets a wider wait window and stops paging. Some of that tuning can also run as rules inside the loop. Neither is a model making decisions; that is Chapter 18. Here, the loop gets steadier because people and rules watch its record.
That covers what the loop does. What it cannot do, and how to adopt it safely, closes the chapter.
Boundaries, and the Confidence Ladder#
The closed loop in this chapter tells a strong but simple story. It can prove that the running network matches declared intent, at both the configuration and route-state levels, and it can hold that match over time. That is what the opening story needed and did not have.
However, it has an important blind spot. It compares the network state against the intent, but the network intent defines network attributes, not the service level expected. An ISP can match its intent perfectly: advertised and weighted exactly as the design says, and carrying its share of users. It can still drop 4% of packets because the provider behind it is having a bad hour. To this loop, that ISP is healthy: configured correctly, achieving the intended spread, no drift. Nothing in a configuration or a RIB entry reveals a brownout. To detect it, we need to measure the path performance, and that is the subject of Chapter 17.
The loop has some relevant failure modes. It can oscillate if it fights an external actor: an engineer making manual changes while auto-reconcile reverts them, each undoing the other. Its feedback can optimize the wrong dial, widening a wait window until real drift goes unnoticed. And an over-eager reconcile can turn one drifted device into a fleet-wide reconciliation storm. Each of these is a reason to add automation gradually.
That gradual path is the Confidence Ladder from Chapter 14, and closed-loop conformance sits on its lower rungs. The evidence that justifies climbing is the automation track record from Chapter 14: how often the loop detected real drift, how often it flagged a transient as drift, and, once reconciliation is enabled, how often a reconcile succeeded without a surprise. Measure the time from a drift appearing to its alert, too; it is the number the opening story would have changed most.
Before pointing the loop at production, prove it in the simulation environment from Chapter 10. Inject a known drift into the simulated network, such as a stray prepend, a withdrawn prefix, or a lowered local-pref. Confirm the loop detects it at the right level and reports the right expected and observed values. Then inject a legitimate ISP failure, take an ISP down in the simulation, and confirm the loop does not cry drift when its users correctly redistribute across the others. A drift detector that has not been tested against both a known-bad and a known-good change is a pager waiting to cry wolf.
Between the lab and full production, run the loop in production in shadow mode for a few weeks. It senses, compares, and decides, logs what it would have done, and changes nothing. Compare its proposals with what the engineers actually did. When they agree week after week, you have the track record to let it act.
Expect the first run to be loud. Turning the loop on in an existing network produces hundreds of differences on day one, most of them old and harmless. Triage them once, as a backlog: accept a difference into intent if it is right, fix the device if it is not, and suppress the rest with an owner and an expiry date. A loop that starts with five hundred open findings is ignored by the second week.
I have done this dozens of times in many environments, and my recommendation is to come prepared for a long list of drift issues. However, if you establish a mitigation plan that keeps fixing them, you will succeed in the long run.
None of this is specific to a content network. On a campus, the configuration-level comparison is golden-configuration compliance across thousands of access switches, and route state becomes VLAN and 802.1X state on the access ports. In a data center fabric, the route-state comparison checks BGP sessions and EVPN routes against the fabric’s intent. Many controllers also run a version of this loop for their own domain. Where one controller owns the domain, use its loop; run the NAP’s where intent spans vendors or domains.
Where to start is the same answer the Confidence Ladder gives everywhere: detect before you reconcile. The minimum viable closed loop is the read-back and the two comparisons, with every finding going to a human and nothing corrected automatically. That single step closes the gap the opening story fell into, silent drift, with zero risk that the loop itself makes a bad change. It is complete when a drifted ISP produces an alert within one comparison cycle, at both the configuration and route-state levels. Only then, and only for the lowest-risk drift classes the automation track record has vouched for, do you turn on auto-reconcile. A team that can reliably see drift is already far ahead of the one in the opening story, even if it never automates a single correction.
Summary#
Acknowledging that not 100% of your network changes will go through the NAP is the starting point to mitigate their impact. The five-stage loop provides a clear framework to constantly close the gap.
Start by defining the intent in the Source of Truth, and sense the running configuration and the route state. Then, compare the actual and intended data at both levels, decide whether to reconcile or alert, and act accordingly through the change workflow, as you would do for any other change. This should run periodically. Never assume that the intent and the reality match; check it.
Naturally, you will not go all in as soon as the closed loop is in place. Give it a try. Earn trust and climb the Confidence Ladder from Chapter 14 before you let it reconcile on its own. At the end of it, your network will be better, closer to your desired state.
This loop keeps the actual network state aligned with the intent, but it has limitations. It cannot detect that the paths within the network are performing badly, because the actual configuration and the RIB do not carry loss or latency information. Chapter 17 expands the loop by injecting the necessary information to make the decisions needed via automation.
References#
- The Vision of Autonomic Computing, Jeffrey O. Kephart and David M. Chess (IEEE Computer, 2003). The MAPE-K loop (monitor, analyze, plan, and execute over shared knowledge), the source of the five stages Part 5 runs.
- Feedback Control for Computer Systems, Philipp K. Janert (O’Reilly, 2013). Setpoints, stability, and hysteresis in software control loops.
- A General Approach to Network Configuration Analysis, Ari Fogel et al. (USENIX NSDI, 2015). The Batfish paper: deriving the data plane a configuration would produce, and finding errors before anything is pushed.
- Infrastructure as Code, 2nd Edition, Kief Morris (O’Reilly, 2021). Declarative intent, reconciliation, and drift as first-class concerns.
💬 Found something to improve? Send feedback for this chapter