I have an ASP.NET MVC app with a 2017 SQL Server backend setup in high availability with a primary/secondary replica. Everything is setup properly with failover and both servers can be read-intent secondaries. In my connection strings file, I have ApplicationIntent=ReadOnly
setup on an additional connection string and initiate readonly connections where necessary in my app. If the secondary server goes down, all connections are routed properly to the primary without any downtime. When the secondary comes back up, the readonly
connections are not getting routed back to this server unless I recycle the app pool. At that point, it finds the secondary server again and routes the readonly connections there. I figured the TTL settings of the listener were at play in this but it's not
the case. It's set for 20 minutes but no dice. My connection objects are wrapped in using statements so that they close and dispose of properly each time. I can't find any documentation on this scenario. Any ideas?
↧