Don't route to a restarted upstream until it serves, not just accepts
Maintainers usually reply within 1 day
@kriszyp is already working on this.
Since Nov 5, 2026.
Assessment
This issue has not been assessed yet.
Description
When a local Harper restarts, symphony marks a failover route up again about 1 s before Harper serves on it. Every connection in that window is dropped.
Observed (symphony 1.6.0, two-node Fabric stage cluster, Harper 5.3.5)
The route is 443, TLS-terminating, with a uds upstream (<instance>-sockets/0-9926.sock). The local container was stopped and then started again, with a new 443 connection every 0.25 s:
After docker start |
New 443 connections |
|---|---|
| 0–3.1 s | forwarded to the peer (localUp: false) |
| 3.1 s | the probe clears the mark (localUp: true, refusingSlots: 0) |
| 3.3–4.1 s | 4 of 4 dropped, 4–7 ms each, counted as route error stream |
| 4.4 s onward | served locally |
The upstream accepted the connection and then closed it without a response. Every restart of a node with failover therefore loses about 1 s of new connections on each route, the same exposure #79 addressed for the stop side.
Cause (partly confirmed)
failover::probe (src/failover.rs) is a connect-and-close. Its own comment says it "proves the socket accepts, not that the application behind it is ready", and a successful probe clears the slot. Harper's socket accepts about 1 s before Harper serves on it.
Not yet known: what accepts during that window, and whether Harper binds its per-thread sockets before its HTTP handler is ready. The socket files' mtimes in that run were later than the first drops, which suggests an earlier bind or a rebind.
What to settle
- Where readiness belongs. If Harper binds or accepts on these sockets before it can serve, the root fix is in Harper: bind only when ready. symphony can't recover a TLS-terminated connection after its handshake, so a symphony-only fix can't be complete there. If Harper is correct and something else accepts, find it.
- What symphony should do either way. For example: require the probe to see the socket accepting continuously for a hold-down period before clearing a slot that was marked down, or have the probe wait for a protocol-level signal. Harper writes a
.yamlbeside each socket; check whether it carries a readiness signal.
Tests
- symphony: a UDS upstream that accepts and immediately closes for its first N connections after coming back must not have new connections routed to it during that period, or they must be retried at a peer.
- End to end on a two-node setup: restart one node's Harper under steady connection load, and no connection fails.
Found during Fabric stage failover testing. — Claude Opus 5.5, drafted with Kris
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HarperFast/symphony
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/symphony#91 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
HarperFast/symphony#89 ·
Maintainers usually reply within 1 day
-
Mixed-case SNI forwarded to an older peer during a rolling upgrade can reach its wildcard routeOpen
Difficulty 4/5 3-5 days Newbie friendliness 49/100
HarperFast/symphony#93 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
HarperFast/symphony#92 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
HarperFast/symphony#90 ·
Maintainers usually reply within 1 day
All issues in HarperFast/symphony
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
feature request needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
solidjs/solid-docs#1716 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
thecodacus/pithagoras#380 ·
Maintainers usually reply within 1 day