Chapters

15 SDN Resilience: API Availability

reference-architectures
sdn
apis
clustering

15.1 Start With the Decision

This section: Start With the Decision — Write the request in plain words first.

Write the request in plain words first. Name who may ask, which ward is in scope, what must change, when the change must end, and what result will count as proof.

15.2 Route Overview

This section: Route Overview — This is part 1 of 2.

This is part 1 of 2. Continue with SDN Resilience: Failover Validation.

15.3 Part Objectives

This section: Part Objectives

  • Define api and availability decision route with explicit inputs, errors, and change rules.
  • Validate controller cluster responsibilities with a concrete scenario and pass criteria.

15.4 Chapter Roadmap

This section: Chapter Roadmap

  • Start With the Request That Must Survive
  • API and Availability Decision Route
  • Northbound and Southbound Boundaries
  • Request Lifecycle
  • Northbound Contract Design
  • Southbound Action Checks
  • Controller Cluster Responsibilities

15.5 Start With the Request That Must Survive

This section: Start With the Request That Must Survive — Picture a hospital wing where a nurse asks the building system to give one ward a safer data path.

Trace One Change From Request to Proof

Picture a hospital wing where a nurse asks the building system to give one ward a safer data path. The ward must stay online while a control computer fails and its partner takes over. The service owner needs to know that the right request reached the right switches and that no old rule survived by mistake.

Write the request in plain words first. Scope names which ward the change may affect; also name who may ask, what must change, when it must end, and what result proves success. Follow that request through the control pair, the two computers that can take over from one another, to the installed rule in the switches. Keep one request id, a shared label for this change, in every record so the trail can be joined later.

Test a lost control node, stale shared state, a split pair, a late reply, and a switch that reconnects with old rules. Check both the service result and the recorded path. A healthy control screen is not proof that the ward received the intended service.

Keep any urgent safe action available when central control is unsure. A change should fail closed or fall back to a known rule when its owner cannot prove current state.

This opening does not select a product or prove every failure mode. Practitioner turns the request into a boundary and recovery plan. Under the Hood examines state sharing, leader choice, rule order, and the records needed to explain a change.

APIs and clustering matter because a service request has to survive translation, controller failure, state movement, and switch action. If the request cannot be traced, availability claims are just slogans.

Start simple: follow one northbound request through authorization, controller state, southbound action, and failover. The API contract and cluster design are good only when that trace stays understandable.

15.6 API and Availability Decision Route

This section: API and Availability Decision Route — Use Figure 15.1 when checking an SDN controller API or high-availability design.

Use Figure 15.1 when checking an SDN controller API or high-availability design.

Figure 15.1 follows an authorized request through controller state and failover proof.

SDN API and availability decision route from authorized intent through contract validation, controller state, switch rule, failover path, service proof, and review condition.
Figure 15.1: SDN API and availability decision route

Before making the decision in this section, inspect Figure 15.1. It makes the decision concrete by showing SDN API and availability decision route, so the relationships can be checked before they are turned into a design claim.

The requester states an authorized service intent, and the contract defines scope and the result it should return. The controller must identify the owner and version of its state before translating the request into southbound rules. Failover then tests what happens when the preferred controller or path is unavailable. The final proof is the service outcome at a receiver, not merely an API success code. If that outcome fails, revise the contract or fallback behavior and rerun the request. This route makes availability a tested property across application and network boundaries.

Start with the requester—an application, workflow, operator, or automation that is permitted to request a network change—and define a northbound contract containing intent fields, authorisation, scope, idempotency, response shape, and expected proof. Assign an owner for topology, policy, flow records, counters, and conflict decisions so the controller state behind that contract is explicit.

The corresponding southbound action may install or remove a rule, query a counter, change a role, issue a barrier, or apply a fallback. Test that action through quorum loss, stale state, switch-controller role changes, reconnection, and degraded mode. Receiver evidence, counters, alerts, rollback results, and the next review condition then verify whether the original request survived both the API boundary and the availability path.

15.7 Northbound and Southbound Boundaries

This section: Northbound and Southbound Boundaries — Northbound and southbound APIs should not be treated as two names for the same interface.

Northbound and southbound APIs should not be treated as two names for the same interface. They cross different responsibility boundaries.

Make the northbound and southbound boundaries premise visible in the diagram Figure 15.2: SDN northbound and southbound API boundary map. Begin by distinguishing Applications from service outcome proof.

SDN API boundary map showing applications using northbound contracts, controllers validating and translating intent, switches enforcing southbound rules, and operations checking proof.
Figure 15.2: SDN northbound and southbound API boundary map

Interrogate Applications first, then find service outcome proof in Figure 15.2. Apply the service outcome proof review question before receiver outcome, and operations check. Those answers support northbound and southbound boundaries; the figure states: SDN northbound and southbound API boundary map.

Northbound boundary

In Figure 15.2, applications and workflows ask for outcomes such as isolate, prioritize, mirror, route, meter, or report. The contract should include identity, scope, reason, and proof expectations.

Controller boundary

The controller validates authorization, checks topology and policy conflicts, computes rule changes, records decisions, and exposes state back to approved clients.

Southbound boundary

The controller programs forwarding devices and asks for device state. Switches should not receive unchecked application intent directly.

Operations boundary

Operations connects API behavior to change approval, monitoring, incident learning, degraded operation, and rollback ownership.

Common northbound styles include REST-style request/response APIs, streaming RPC-style APIs, and configuration-model APIs. Common southbound actions include flow-rule changes, statistics requests, role changes, barrier checks, and device-state queries. The decision question is not “which interface is newest?” It is “which interface carries the right responsibility with enough proof?”

15.8 Request Lifecycle

This section: Request Lifecycle — A safe API design describes what happens after an application request arrives and before the network is allowed to change.

A safe API design describes what happens after an application request arrives and before the network is allowed to change.

Do not apply request lifecycle until its premise is visible near Intent in Figure 15.3: SDN API request lifecycle from application intent through authorization, validation, rule computation, southbound install, switch enforcement, and proof response. Inspect the span to Install.

SDN API request lifecycle from application intent through authorization, validation, rule computation, southbound install, switch enforcement, and proof response.
Figure 15.3: SDN API request lifecycle from application intent through authorization, validation, rule computation, southbound install, switch enforcement, and proof response.

The API route in Figure 15.3 starts with an application intent, including requester, traffic class, scope, and duration. Authorization checks who may ask for that change, while validation compares it with current topology, protected traffic, policy, and rollback conditions. Translation makes a rule plan before installation sends it to switches. The controller then needs switch acknowledgement and receiver evidence, not just an accepted API response. The final record states whether the change was complete, partial, rejected, or rolled back. This path matters because a successful request can still leave one switch stale or a service path broken after the API has replied.

Lifecycle check:

  • Receive intent: capture the requester, service objective, affected traffic class, scope, and requested duration.
  • Authorize: confirm that the application or workflow may make this specific change.
  • Validate: check topology, policy conflicts, protected traffic, fallback behavior, and rollback conditions.
  • Translate: convert intent into rules, priorities, counters, timeouts, and affected devices.
  • Install and confirm: send southbound changes and verify whether devices accepted the request.
  • Observe outcome: compare switch proof with receiver or service proof.
  • Respond and record: return a clear API result and store enough proof for later checks.

15.9 Northbound Contract Design

This section: Northbound Contract Design — An SDN northbound API should be designed as a contract, not just as a URL or method name.

An SDN northbound API should be designed as a contract, not just as a URL or method name.

Use Figure 15.4 to check what a northbound request must state and what proof a client receives after the controller acts.

SDN northbound API contract elements including identity, intent, scope, safety checks, response, proof, version, and rollback.
Figure 15.4: SDN northbound API contract elements

Start Figure 15.4 with identity and authorization: the controller must know who is requesting a change and for which network domain. Intent and scope then name the affected traffic class, source, destination, gateway, tenant, site, or service goal. Idempotency defines what happens when a timed-out request is retried. Safety checks handle conflicts, protected paths, maintenance windows, fallback, and rollback before application. Read the response and proof fields last. Accepted, pending, partial, rolled-back, or degraded outcomes need a versioned record so clients can reconcile state and survive later contract changes.

Identity and authorization

Figure 15.4 begins by asking who is making the request, under which role, and for which network domain.

Intent and scope

Which traffic class, source, destination, gateway, tenant, site, or service objective is affected?

Idempotency

What happens if the same request is retried after timeout or failover?

Safety checks

Which conflicts, protected paths, maintenance windows, fallback rules, and rollback gates are checked first?

Response shape

Does the caller receive accepted, rejected, pending, partially applied, rolled back, or degraded state?

Proof and versioning

Which record proves the result, and how will clients survive contract changes?

Do not expose a raw switch-control surface as the first northbound design. Applications should not need to know every match field, rule priority, or device quirk to request a service outcome. The controller owns that translation and must make it traceable.

15.10 Southbound Action Checks

This section: Southbound Action Checks — Southbound actions are low-level and device-facing.

Southbound actions are low-level and device-facing. They should be treated as implementation details with strong proof.

Typical southbound action categories:

  • Rule changes: install, modify, delete, or expire forwarding rules.
  • Packet handling: request controller guidance for unmatched traffic or send a specific packet through a switch.
  • Counter queries: read flow, port, queue, or table counters.
  • Role and connection management: decide which controller instance may write to a device.
  • Synchronization checks: confirm whether earlier rule updates have been processed.
  • Fallback rules: preserve known safe behavior during controller or link degradation.

Check questions:

  • Which application intent caused this southbound action?
  • Which controller state version produced the rule?
  • Which switch accepted, rejected, or partially applied the update?
  • Which counters or receiver proof show the service objective?
  • Which timeout or rollback removes stale rules?

15.11 Controller Cluster Responsibilities

This section: Controller Cluster Responsibilities — A controller cluster is not automatically safer than one controller.

A controller cluster is not automatically safer than one controller. It is safer only when the system can explain which instance owns decisions, what state is shared, and what happens to switches during changeover.

Practitioner Knowledge Check

15.11.1 Controller Placement and Capacity

An OpenFlow switch is often drawn one line away from its controller. That is a logical attachment: the switch has a control session and controller role. The physical path may cross access, aggregation, routed WAN, firewall, load balancer, and encrypted tunnel hops. Every hop adds queueing and a failure domain, so placement must be calculated from both request capacity and path behavior.

Start with a request budget per switch group:

λgroup=∑s=1N(λmiss,s+λstats,s+λevent,s+λretry,s).\lambda_{group}=\sum_{s=1}^{N}\left(\lambda_{miss,s}+\lambda_{stats,s}+\lambda_{event,s}+\lambda_{retry,s}\right).

Measure those terms under startup, reconnection, topology change, and attack—not only steady telemetry. An older single-thread example used about 200 requests/s as controller capacity. Keep that only as a worked baseline. Current capacity depends on controller code, policy work, state-store replication, message type, CPU, and transport security; benchmark the exact release path.

If μ=200\mu=200 requests/s and arrivals are approximated as Poisson with exponential service, the M/M/1 estimate is

W=1μ−λ.W=\frac{1}{\mu-\lambda}.

At λ=120\lambda=120/s, mean service-plus-queue time is 1/80=12.51/80=12.5 ms. At 180180/s it rises to 50 ms even though offered load is still below nominal capacity. That nonlinear rise is why “under 200” is not a safe admission rule. Choose a target utilization such as 50–70%, then verify percentile latency under the real burst distribution. For kk workers, do not assume kμk\mu until shared locks, ordering, and replicated state have been measured.

Complete end-to-end control delay with the network path:

Dcontrol=∑h=1H(dprop,h+dser,h+dqueue,h)+DTLS+W+Dswitch.D_{control}=\sum_{h=1}^{H}(d_{prop,h}+d_{ser,h}+d_{queue,h})+D_{TLS}+W+D_{switch}.

For small control frames, serialization may be minor on a fast LAN, while queueing, WAN propagation, retransmission, and TLS/session recovery dominate. Measure one-way or round-trip distributions from each switch site; hop count alone is not a latency metric.

Placement questionLocal controllerRegional controllerRemote/global controller
Miss latencyusually lowestpath-dependenthighest and most variable
Failure containmentsite can retain authorityregion can coordinate several sitesshared service can become a broad dependency
State scopenarrow topology and identity viewregional policy and mobility viewglobal optimisation and policy view
Operations burdenmany instances to patch and observemoderate instance countsimpler central operations but demanding WAN/fallback design

Place authority with the state needed for the decision, then bound what happens when that state is unavailable. A local controller may own emergency and gateway rules while a regional controller owns cross-site paths. During a partition, prohibit overlapping writers for the same match space; preserve already approved local rules; stop changes that require fresh global policy; and reconcile cookies, versions, counters, and expiries when connectivity returns.

A placement test should therefore inject a synchronized reconnect storm, link delay/loss, controller failover, stale replicated state, and physical loss of a shared network hop. Record arrival rate by message class, queue depth, decision and installation percentiles, state convergence, rule conflicts, receiver behavior, and recovery time. The diagram can remain logically one hop; the evidence must enumerate the real path.

Before approving controller cluster responsibilities, test the depicted proposition in Figure 15.5: A controller cluster keeps a primary and a hot standby in state sync, so the switch fabric keeps forwarding through a controller failover. Read from Enterprise SDN Three-Tier Architecture toward Active routing.

Clustered SDN controllers in a three-tier architecture: a primary controller with a hot-standby backup and distributed state synchronization, managing a spine-leaf switch fabric over a southbound API.
Figure 15.5: A controller cluster keeps a primary and a hot standby in state sync, so the switch fabric keeps forwarding through a controller failover.

The controller cluster in Figure 15.5 keeps a primary and hot standby in state sync so the switch fabric keeps forwarding through controller failover.

Decision ownership

Only one authorized decision path should commit a conflicting policy update for the same scope.

Shared state

Topology, policy records, active rule records, and ownership leases need clear replication and freshness rules.

Local switch behavior

Switches should keep known safe forwarding behavior when possible, but the design must test what actually survives a controller loss.

Operations visibility

Operators need proof of which controller was active, which rules changed, what degraded, and what was rolled back.

15.11.2 State Classes

Not every kind of state needs the same consistency model.

  • Strongly coordinated state: policy ownership, topology decisions, rule install records, and rollback gates.
  • Eventually checked state: counters, sampled telemetry, trend summaries, and diagnostic observations.
  • Local state: switch cache behavior, packet counters, link-local status, and temporary buffering.
  • External proof: receiver service health, application acknowledgement, incident record, and operator approval.

The decision record should state which state can be stale, for how long, and what risk that creates.

15.12 Continue to the Next Part

This section: Continue to the Next Part — Carry this evidence into SDN Resilience: Failover Validation, which begins with Failover Sequence Checks.

Carry this evidence into SDN Resilience: Failover Validation, which begins with Failover Sequence Checks.

Find help

3 reviewed answers.

Where should I start in a module?

Open the module page from the sidebar to see its chapters in order. Use the module map to return to a topic you need.

Modules and paths

Reviewed

What can I try when a project does not work?

Check the symptom, then work through the diagnostic steps. Keep the error message and the smallest example that reproduces it.

When you are stuck

Reviewed

How do interactive examples work?

Use the interactive guide to check how examples and simulations work before changing your project.

Interactive examples guide

Reviewed