Blog Post

Azure Database Support Blog
2 MIN READ

Lesson Learned #216: Hands-On-Labs: How redirect connection policy type works

Jose_Manuel_Jurado's avatar
Jul 04, 2022

We used to have cases where our customers asked questions about redirect connection type policy:

 

  • How works?
  • What is the configuration needed and errors message related about an incorrect setup, etc.. 

In this video below we going to provide us some insights about it. 

 

Well, basically, we are to cover How redirection works? based on this article: Azure SQL Database connectivity architecture - Azure SQL Database and Azure Synapse Analytics | Microsoft Docs

 

  • The first connection is made against 1433 and Gateway (servername.database.windows.net)
  • The second connection is made against, for example, 11019 and node (redirectedservernode.TenantRing.region.worker.database.windows.net) that is running your Azure SQL Database, everything is transparent for application.

 

Finally, we are going to produce some connectivity issues, as follows:

 

  • Network issues by DNS incorrect configuration or network issue:
    • 10060-A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
  • The redirect port is blocking by firewall:
    • The TCP/IP connection to the host redirectedservernode.tenantring.region.worker.database.windows.net (redirected from servername.database.windows.net), port 11019 has failed. Error: "Permission denied: connect
    • The TCP/IP connection to the host servername.database.windows.net, port 1433 has failed. Error “The Timeout expired before connecting to the routing destination”.
    • 10013-A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - An attempt was made to access a socket in a way forbidden by its access permissions.)
    • TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

 

Enjoy!

 

Updated Jul 04, 2022
Version 2.0
  • yongchengni's avatar
    yongchengni
    Copper Contributor

    Jose_Manuel_Jurado 

    current I am facing the weird issue about "The Timeout expired before connecting to the routing destination", do you have any guide about how to find the root cause of this issue.

    my sqlserver database framework is an always-on database, we had one AG listener in the front(name as 147), three work node in the back(name as 126[readwrite node], 127[readwrite node],128[readonly node]). it works well when we try to connect the readwrite node, but when we try to connect the readonly node(use applicationIntent=Readonly parameter in connection string), it always return this error: "The Timeout expired before connecting to the routing destination"

     

    thx