TECHNOLOGY / UPLINK FAILOVER
Failover Is Working. Why Can’t Users Get Online?
Health: someone answered. Can users get online?
“Is failover working?”
“Yes. Both gateways answer ping.”
“Then why can’t anyone get online?”
“We didn’t check quite that far.”
It is like calling customer service, getting an answer, then spending forty minutes on hold. The dashboard reports a 100% answer rate. You’re still on hold, and the problem is still unresolved.
I built Uplinkstead as a Linux IPv4 failover experiment. This article covers its explicitly enabled dual-DHCP mode: two dedicated uplink interfaces and one routed LAN, with independent lease acquisition and renewal before choosing a path for new traffic. Static dual-uplink and single-DHCP deployments are separate modes with different operating contracts.

A gateway reply answers a nearby question. An upstream blackhole, missing forwarding rule or broken return path can still prevent a user from opening a connection. These observations need different names:
On narrow screens, scroll the table sideways to read every column.
| Observation | What it supports | What it does not establish |
|---|---|---|
| Gateway reachability | The tested path from this host to that gateway responds. | Reachability beyond the gateway or a working user service. |
| Uplink-bound TLS probes | Configured targets meet the TLS quorum through the specified device, source address and mark. | Universal Internet access or correct HTTP business results. |
| A new LAN TLS connection | A tested LAN client reaches the specified TLS target through the expected uplink. | Recovery of every application, DNS or untested destination. |
| Existing-flow continuity | This needs its own observation of the original connection. | A new successful connection does not prove old NAT mappings or sessions survived. |
Uplinkstead binds probes to a device, source address and mark so a test of A cannot quietly borrow B or the main default route. Health depends on the configured target quorum. It measures those paths, not HTTP business behavior. The controlled fixture’s three targets are three ports on one server, not three independent failure domains.
Freshness: does this evidence still belong to the present?
Once a probe succeeds, the next question is when its result must expire. A renewed or changed lease, a changed gateway and lease loss invalidate that uplink’s health. A restarted writer cannot restore forwarding from yesterday’s green light either.
Using the old result would be like changing suppliers and submitting the previous supplier’s audit. The paperwork is complete. It describes somebody else.
Health therefore needs more than a boolean: it must belong to the current lease and authority generation, and remain within its validity period. A new writer must acquire newly admitted leases and fresh health before restoring traffic. Late requests cannot revive retired authority.
That costs availability. Even a routine renewal that appears to keep the address needs fresh proof; a path without valid supporting evidence may be withdrawn in the meantime. The design accepts temporary uncertainty rather than continuing to authorize from expired results. That trade-off still needs to fit the deployment’s tolerance for interruption, renewal cadence and probe cost.
Switching: is more movement actually more resilience?
Switching immediately can look responsive. Switching straight back after the next good result can keep interrupting the same work.
Imagine a request handed from department A to B and back three times, still unfinished. The manager studies the workflow: “Very agile.” The person waiting just wants to know who owns it now.
Uplinkstead uses success and failure rounds, candidate hold and withdrawal grace instead of letting one result decide everything. Once a healthy backup is selected, recovery of the original primary does not automatically preempt it. This sticky choice favors a currently healthy path over returning to the nominal favorite.
Waiting reduces flapping but delays reaction to a real failure. Staying on backup reduces disruption but can retain a more expensive or lower-capacity link. A controlled run cannot supply universally best timing values.
A durable switching budget and latch add another limit. Once latched, the service may deliberately refuse another failover until an authorized person intervenes. That bounds repeated changes and can prolong an outage. Restart and resume cannot clear the latch. Initial selection consumes budget; ordinary renewal itself is not a cross-uplink charge.
The promise concerns new traffic. Changing uplinks may break old NAT mappings and existing flows. Establishing a fresh TLS connection does not migrate an unfinished download or session to the other connection.
Connections: the backup works, but can the original work continue?
The distinction between fresh connections and existing traffic matters because they can behave differently during the same failover.
In a separate controlled Linux VM run, I opened a TLS connection over A and completed three request–reply exchanges. Client socket records and the server’s connection identifier stayed the same. I then blocked upstream forwarding on A, leaving that socket open with no automatic reconnect. Only after Uplinkstead reported B selected did the test open a second TLS connection.
The fresh connection received a valid test-application reply over B. The original connection received no further replies. After sending its fourth request, the client recorded thirteen read timeouts while waiting for that one response, then read EOF on the original socket. Those were thirteen waits, not thirteen retransmitted application requests. The server’s application log contained no fourth request from that connection.
On narrow screens, scroll the table horizontally to read every column.
| Observation | What the records show | What remains unproven |
|---|---|---|
| Original connection before the fault | Three exchanges over A, with the same client socket and server connection identifier. | Working before the fault does not establish continuity through it. |
| Fresh connection after selection of B | A new connection received a reply matching its request, with the server observing B’s source address. | This did not exercise a production client’s reconnect behavior. |
| Original connection kept open | No further replies; thirteen read timeouts waiting for request four, followed by EOF. | Application exchanges did not resume. No packet capture was taken, so the transport closure mechanism is unknown. |
The sampled reply over B arrived 1.974 seconds after the driver read back and confirmed the blocking rule on A. The new connection was attempted only after B was observed as selected. That interval therefore does not establish the earliest possible recovery, a client reconnect time, or an outage guarantee. A remained blocked at the end of the observation window.
This was one A-to-B comparison using a JSON test application over TLS, not HTTP or a production operation. I checked the retained program and logs for this addition; I did not rerun the VM. It is also separate from the six-cycle closure series discussed below. It demonstrates a narrower result: a fresh connection had a usable reply while the original connection had not resumed.
To turn that result into a release decision, I would first agree with Product and the service owner on the work users must be able to finish, how long they can wait, whether reconnecting is acceptable, and which effects must not happen twice. The following three acceptance designs are proposals. They were not executed in this experiment.
1. If reconnecting is acceptable, test the client that will ship
Test: Use the intended client build and retry configuration. Establish service over A, then inject the fault. Keep A blocked while the client detects the interruption, reconnects, validates TLS and obtains a correct application response. Record fault timing, detection, retries, connection establishment and the valid response separately, including the interval between fault injection and rule readback.
Pass: The interval from the agreed, observable fault reference to a valid application response stays within the agreed limit, under the required TLS and retry policy. B being selected, or a separate test client connecting successfully, is insufficient to qualify the client users will run.
2. Interrupt unfinished work and establish what actually happened
Test: Start a traceable operation before failover, recording acknowledged progress and server state. Inject the fault while it is unfinished. After reconnection, use the same operation identifier to determine whether it never executed, completed with its reply lost, or completed only in part. Follow the intended resume, restart or manual recovery procedure. A client timeout or EOF alone cannot establish that the server did nothing.
Pass: The operation completes within the agreed time and data-preservation limits, with required progress and results verified. No work silently disappears, and an unknown outcome is not reported as success. If restarting is an accepted part of the service, the extra user steps and lost progress must remain within that agreement.
3. Lose the reply, retry, and count the effects
Test: Set a controlled hold point before the response is sent, then have the actual client submit a test operation with a side effect over A. Verify that the operation has completed on the server and its response is still held. Inject and maintain an upstream fault on A, discard the response, and confirm that the client received no result. Let the client detect the interruption and retry naturally under its existing policy, without manually delaying or restarting it to wait for B. Record when B is selected and use the source observed by the server, or other verifiable path evidence, to confirm that the successful retry actually traveled over B. Compare operation identifiers, returned results and actual state changes. If the design uses idempotency keys or deduplication, check that their protection remains valid throughout recovery.
Pass: If the contract allows one effect per operation, there must be exactly one effective change. Several requests may be legitimate; a second debit, duplicate record or inconsistent completion result is not. An operation that cannot safely be replayed should remain explicitly unresolved until a status query or manual procedure establishes its outcome, rather than being retried automatically.
A promise of connection continuity needs a separate check. Disable automatic reconnects, verify the client socket and server connection identity, and require the same connection to complete application work within the agreed pause limit while the original path remains blocked. Success after reconnecting does not supply that evidence.
Authority: who proposes, and who can change the route?
A capability-free worker proposes a selection. The privileged writer performs it only after independently checking leases, health, authority tokens, hold/grace conditions, budget and lock state. “Choose B” is a proposal, not sufficient authority to change routing.
This limits what the proposal process can do directly. The writer, DHCP client and capture path remain trusted privileged components; process separation is not containment of a compromised root writer.
Operator actions also differ. Pause may retain a still-safe selected route while safety withdrawal continues. Stop withdraws allocations and selection while retaining guards against borrowing the main default. A crashed writer may leave old kernel state until supervision and cleanup run. Kernel failures or unknown ownership can prevent withdrawal. A status response does not guarantee every underlying action succeeded.
Evidence: what did the retained run actually observe?
These results come from retained closure run ab44c08f9940277e; no new VM experiment was run for this article. macOS and Linux each passed 295 portable tests, with matching test identities and source and no skips. Linux integration used the installed wheel, checked module and supporting-file hashes, and ran the shipped systemd units with namespace isolation.
Six active-uplink blackhole/recovery cycles produced successful fresh LAN TLS over the expected alternate path. Removing each fault did not preempt the healthy selected path. Initial selection plus six switches produced seven budget charges; intervening natural renewals added no cross-uplink charges.
The resource series retained 268 samples over 540.006 seconds, about nine minutes. It required the same writer, worker and two DHCP client identities throughout; formal stop/start was a separate operation afterward. The writer’s RSS median still rose 176 KiB in the five-minute tail. That passed a declared short-run allowance. It is not zero growth, leak freedom or evidence of a performance improvement, and supplies no throughput, latency or outage SLO.
The failed attempts matter too. Each DHCP session retains at most 64 distinct REQUEST transaction IDs; unanswered attempts count. An earlier faster-renewal run hit that cap, recreated the client session and needed fresh health. It failed the same-client resource gate. The final series used controlled T1 values of A 20 and B 15 seconds on 120-second leases, keeping this observation below the cap.
That does not fix or qualify long-term rollover. Reacquiring a session and health can interrupt traffic. Probe scheduling and renewal cadence both changed between attempts, so their RSS differences cannot establish a causal benefit from one change. Keeping the failed result is more useful than calling the final green check “long-term stability.”
Scope: how far is this from deployment?
The network namespaces share one Linux VM kernel. They do not represent two physical ISPs with independent failure domains. General DHCP interoperability, sudden power loss, boot-zero-gap protection and long-term capacity remain unqualified. Older orderly VM reboot evidence has its own source and a 25-second fixture startup timer. It is a separate historical record, not a rerun in this closure, product boot protection or a recovery-time guarantee.
This is also not a complete plug-and-play router. Forwarding, NAT, return paths, reverse-path settings and interface readiness are external deployment prerequisites. Accelerated configuration examples describe fixture conditions, not recommended production timings.
This article separates retained measurements, current implementation contracts and hypothetical management conversations. It describes a bounded systems experiment, without claiming customer deployment experience or turning a proposal or joke into a production guarantee.
Handover: what must the team decide beyond the green light?
Code can decide whether evidence is still valid. The team has to decide which work must recover, which interruptions are acceptable and who takes over. If the latch is set or the state remains unknown, “handle manually” is not a handover.
- Recovery outcome: Which new requests need to succeed first? Which LAN source, target or actual service result will confirm that? How much interruption of existing connections is acceptable?
- Switching cost: How long is worth waiting? Is remaining on a healthy backup acceptable given its cost, capacity and session impact? What would require revisiting the policy?
- Responsibility: Who can interpret lease, probe, route and budget records? Who may keep the service paused, repair it or explicitly reset the budget? When is escalation required?
- Independent access: If the main LAN cannot get out, how will that person get in? Do they have a local console or independent management link, diagnostic tools and the required authority?
Failover needs to do more than turn an indicator green. New work needs a usable path, the cost to old work needs to be understood, and automation needs to leave an executable next step when it has to stop.
Sources and reproduction
Source documents are pinned to public commit f1a0ecf. The retained receipts identify their own source fingerprints and reproduction conditions.