Azure SQL Database and Azure Synapse Analytics connectivity architecture
Applies to: Azure SQL Database Azure Synapse Analytics (dedicated SQL pools only)
This article explains architecture of various components that direct network traffic to a server in Azure SQL Database or dedicated SQL pools in Azure Synapse Analytics. It also explains different connection policies and how it impacts clients connecting from within Azure and clients connecting from outside of Azure.
- For connection strings to Azure SQL Database, see Connect and query to Azure SQL Database.
- For connection strings to Azure Synapse Analytics pools, see Connect to Synapse SQL.
- For settings that control connectivity to the logical server for Azure SQL Database and dedicated SQL pools in Azure Synapse Analytics, see connectivity settings.
- This article does not apply to Azure SQL Managed Instance. Refer to Connectivity architecture for Azure SQL Managed Instance.
Connectivity architecture
The following diagram provides a high-level overview of the connectivity architecture.
The following steps describe how a connection is established to Azure SQL Database:
- Clients connect to the gateway that has a public IP address and listens on port 1433.
- Depending on the effective connection policy, the gateway redirects or proxies the traffic to the correct database cluster.
- Inside the database cluster, traffic is forwarded to the appropriate database.
Connection policy
Servers in SQL Database and dedicated SQL pools (formerly SQL DW) in Azure Synapse support the following three options for the server's connection policy setting.
Note
The connection policy for dedicated SQL pools (formerly SQL DW) in Azure Synapse Analytics is set to Default. You cannot change this for dedicated SQL pools in Synapse workspaces.
- Redirect (recommended): Clients establish connections directly to the node hosting the database, leading to reduced latency and improved throughput. For connections to use this mode, clients need to:
- Allow outbound communication from the client to all Azure SQL IP addresses in the region on ports in the range of 11000 to 11999. Use the Service Tags for SQL to make this easier to manage. If you are using Private Link, see Use Redirect connection policy with private endpoints for the port ranges to allow.
- Allow outbound communication from the client to Azure SQL Database gateway IP addresses on port 1433.
- When using the Redirect connection policy, refer to the Azure IP Ranges and Service Tags - China Cloud for a list of your region's IP addresses to allow.
- Proxy: In this mode, all connections are proxied via the Azure SQL Database gateways, leading to increased latency and reduced throughput. For connections to use this mode, clients need to allow outbound communication from the client to Azure SQL Database gateway IP addresses on port 1433.
- When using the Proxy connection policy, refer to the Gateway IP addresses list later in this article for your region's IP addresses to allow.
- Default: This is the connection policy in effect on all servers after creation unless you explicitly alter the connection policy to either
Proxy
orRedirect
. The default policy isRedirect
for all client connections originating inside of Azure (for example, from an Azure Virtual Machine) andProxy
for all client connections originating outside (for example, connections from your local workstation).
We highly recommend the Redirect
connection policy over the Proxy
connection policy for the lowest latency and highest throughput. However, you need to meet the extra requirements for allowing network traffic for outbound communication:
- If the client is an Azure Virtual Machine, you can accomplish this using Network Security Groups (NSG) with service tags.
- If the client is connecting from a workstation on-premises, you might need to work with your network admin to allow network traffic through your corporate firewall.
To change the connection policy, see Change the connection policy.
Connectivity from within Azure
If you're connecting from within Azure your connections have a connection policy of Redirect
by default. A policy of Redirect
means that after the TCP session is established to Azure SQL Database, the client session is then redirected to the right database cluster with a change to the destination virtual IP from that of the Azure SQL Database gateway to that of the cluster. Thereafter, all subsequent packets flow directly to the cluster, bypassing the Azure SQL Database gateway. The following diagram illustrates this traffic flow.
Connectivity from outside of Azure
If you're connecting from outside Azure, your connections have a connection policy of Proxy
by default. A policy of Proxy
means that the TCP session is established via the Azure SQL Database gateway and all subsequent packets flow via the gateway. The following diagram illustrates this traffic flow.
Important
Open TCP ports 1434 and 14000-14999 to enable Connecting with DAC
Gateway IP addresses
The table below lists the individual Gateway IP addresses and Gateway IP address subnets per region.
Periodically, we retire individual Gateway IP addresses and migrate the traffic to Gateway IP address subnets.
We strongly encourage customers to move away from relying on any individual Gateway IP address (since these will be retired in the future). Instead allow network traffic to reach both the individual Gateway IP addresses and Gateway IP address subnets in a region.
Important
Logins for SQL Database or dedicated SQL pools (formerly SQL DW) in Azure Synapse can land on any of the individual Gateway IP addresses or Gateway IP address subnets in a region. For consistent connectivity to SQL Database or dedicated SQL pools (formerly SQL DW) in Azure Synapse, allow network traffic to and from all the individual Gateway IP addresses and Gateway IP address subnets in a region.
Use the individual Gateway IP addresses and Gateway IP address subnets in this section if you're using a Proxy connection policy to connect to Azure SQL Database. If you're using the Redirect connection policy, refer to the Azure IP Ranges and Service Tags - China Cloud for a list of your region's IP addresses to allow.
Region name | Gateway IP addresses | Gateway IP address subnets |
---|---|---|
China East | 139.219.130.35 | 52.130.112.136/29 |
China East 2 | 40.73.82.1 | 52.130.120.88/29 |
China North | 52.130.128.88/29 | |
China North 2 | 40.73.50.0 | 52.130.40.64/29 |
Related content
- For information on how to change the Azure SQL Database connection policy for a server, see conn-policy.
- For information about Azure SQL Database connection behavior for clients that use ADO.NET 4.5 or a later version, see Ports beyond 1433 for ADO.NET 4.5.
- For general application development overview information, see SQL Database Application Development Overview.
- Refer to Azure IP Ranges and Service Tags - China Cloud
- What is a logical SQL server in Azure SQL Database and Azure Synapse?