Bryan
Bryan

Reputation: 857

Is use of transient retry logic really necessary when connecting to Azure SQL Database from a VM inside the same data center?

For years there has been guidance regarding transient faults and retries with Azure SQL Database. But with .NET 4 and v12 there are more direct connections established. So is the transient handling really applicable for the case where you're connecting to Azure SQL Database from inside of the Azure data center? I think the answer may still be yes because the Azure DB management can change things around under high load and a connection in the pool may be dead, but looking for more insight and also whether the retry really is needed more around the connection opening or the execution of the query or both.

Related article about the direct connections: https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-direct-route-ports-adonet-v12/

Upvotes: 3

Views: 243

Answers (1)

Joseph Idziorek
Joseph Idziorek

Reputation: 5111

Yes, retry logic is absolutely needed for connections within the data center. Although networking effects are highly reduced with DC-to-DC traffic, there is an non-zero chance that they can still occur. Additionally, in Azure SQL Database, we are constantly improving the service and adding new features. When this happens, we will often switch a primary database to one of the two secondary databases and thus cause a momentary transient fault for a connection. For these two reasons, it is always a best practice to include transient fault handling for an application that is written for the cloud.

Upvotes: 4

Related Questions