Skip to content

Conversation

srkaj
Copy link

@srkaj srkaj commented Apr 11, 2025

This builds on PR #357 to fix #337.

  • MultiSubnetFailover is a recongnized configuration flag.
  • ... with a public getter in Config.
  • The SqlBrowser implementations (tokio, smol, and async-std) handles multi-subnet failover correctly.
  • Note: When the actual network connection is done by some other crate, that crate must handle multi-subnet failover when creating the socket. See Implement multi-subnet-failover. kardeiz/bb8-tiberius#27 .

@srkaj srkaj changed the title Multi subnet failover Implement MultiSubnetFailover Apr 11, 2025
tylerclendenin and others added 3 commits April 11, 2025 15:04
When the MultiSubnetFailover=Yes property is added to the connection string, the TCP connection should be attempted for each resolved IP address in parallel rather than in sequence. This creates a race where the first connection to be established wins and becomes the target server.

https://learn.microsoft.com/en-us/sql/relational-databases/native-client/features/sql-server-native-client-support-for-high-availability-disaster-recovery?view=sql-server-ver15#connecting-with-multisubnetfailover
@srkaj srkaj force-pushed the multi-subnet-failover branch from 36c051a to 2732e81 Compare April 11, 2025 13:05
Now better implemented in sql_brower with tokio, async_std and smol.
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.

Add Support for MultiSubnetFailover when using a High Availability Group

2 participants