借助仅阅读路由,我们可以让一个故障转移组侦听器将连接直接直接读取到只读的辅助工具,从而可以提供额外的容量。
我已经设置了此设置,但我对FG为连接提供了两种不同的FQDN感到困惑,一个是 servername.database.windows.net.net
and other servername.seconverame.database .windows.net 。当系统启动和运行时,这些工作是按预期的,但是尚不清楚的是,如果主脱机并发生故障转移,则次要连接会发生什么。辅助连接是否会自动路由到新的主服务器/唯一的服务器,或者因为没有可用的辅助服务而停止工作?
我会测试它,但是我找不到一种方法来模拟次级离线的方法。
或者。当我尝试使用 applicationintent = ReadOnly
使用主连接时,似乎将所有流量发送到主服务器,以免工作。
With read-only routing, we can have a Failover Group listener direct the connection to a read-only secondary automatically, which can provide additional capacity.
I have set this up but I am confused about the fact that the FG provides two different FQDNs for the connection, one is servername.database.windows.net
and the other servername.secondary.database.windows.net
. These work as expected when the system is up and running but what is not clear is what happens to the secondary connection if the primary goes offline and a failover takes place. Would the secondary connection automatically route to the new primary/only server or would it simply stop working because there would be no secondaries available?
I would test it but I can't find a way to take the secondary offline to simulate it being unavailable.
Alternatively. when I tried using the primary connection with ApplicationIntent=ReadOnly
, it seems it sends all traffic to the primary server so that doesn't work either.
发布评论
评论(1)
自动防止小组提供读写和仅阅读的听众终点,这些端点在地理上不变的过程中保持不变。这意味着您不必在地理失效之后更改应用程序的连接字符串,因为连接会自动路由到当前主要主管。无论您是使用手册还是自动故障转移激活,地理上禁止将组中的所有次要数据库切换为主要角色。
请参阅: auto-failover组概述&最佳实践
Auto-failover groups provide read-write and read-only listener end-points that remain unchanged during geo-failovers. This means you do not have to change the connection string for your application after a geo-failover, because connections are automatically routed to the current primary. Whether you use manual or automatic failover activation, a geo-failover switches all secondary databases in the group to the primary role.
Refer: Auto-failover groups overview & best practices