Skip to content

Add failover example#180

Merged
SeanTAllen merged 1 commit intomainfrom
failover-example
Mar 22, 2026
Merged

Add failover example#180
SeanTAllen merged 1 commit intomainfrom
failover-example

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

Demonstrates multi-host connection failover as a user-space pattern. The driver's Session manages a single connection, so failover orchestration sits above it: create N sessions to different hosts, use the first to authenticate, close the rest.

The example creates three sessions (two to intentionally unreachable hosts, one to the real server) and races them. Late arrivals — sessions that authenticate after a winner is already chosen — are handled gracefully.

Design: #72

…ace pattern

The driver's Session manages a single connection. Multi-host failover
is orchestration that sits above the driver: create N sessions, use the
first to authenticate, close the rest. This example demonstrates the
pattern rather than building it into the driver.

Design: #72
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2026
@SeanTAllen SeanTAllen merged commit fca9d51 into main Mar 22, 2026
10 checks passed
@SeanTAllen SeanTAllen deleted the failover-example branch March 22, 2026 22:55
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants