Connectivity architecture in Azure Database for PostgreSQL
This article explains the Azure Database for PostgreSQL connectivity architecture as well as how the traffic is directed to your Azure Database for PostgreSQL database instance from clients both within and outside Azure.
Connection to your Azure Database for PostgreSQL is established through a gateway that is responsible for routing incoming connections to the physical location of your server in our clusters. The following diagram illustrates the traffic flow.
As client connects to the database, the connection string to the server resolves to the gateway IP address. The gateway listens on the IP address on port 5432. Inside the database cluster, traffic is forwarded to appropriate Azure Database for PostgreSQL. Therefore, in order to connect to your server, such as from corporate networks, it is necessary to open up the client-side firewall to allow outbound traffic to be able to reach our gateways. Below you can find a complete list of the IP addresses used by our gateways per region.
Azure Database for PostgreSQL gateway IP addresses
The gateway service is hosted on group of stateless compute nodes sitting behind an IP address, which your client would reach first when trying to connect to an Azure Database for PostgreSQL server.
As part of ongoing service maintenance, we will periodically refresh compute hardware hosting the gateways to ensure we provide the most secure and performant experience. When the gateway hardware is refreshed, a new ring of the compute nodes is built out first. This new ring serves the traffic for all the newly created Azure Database for PostgreSQL servers and it will have a different IP address from older gateway rings in the same region to differentiate the traffic. Once the new ring is fully functional, the older gateway hardware serving existing servers are planned for decommissioning. Before decommissioning a gateway hardware, customers running their servers and connecting to older gateway rings will be notified via email and in the Azure portal, three months in advance before decommissioning. The decommissioning of gateways can impact the connectivity to your servers if
- You hard code the gateway IP addresses in the connection string of your application. It is not recommended.You should use fully qualified domain name (FQDN) of your server in the format
.postgres.database.azure.com, in the connection string for your application.
- You do not update the newer gateway IP addresses in the client-side firewall to allow outbound traffic to be able to reach our new gateway rings.
The following table lists the gateway IP addresses of the Azure Database for PostgreSQL gateway for all data regions. The most up-to-date information of the gateway IP addresses for each region is maintained in the table below. In the table below, the columns represent following:
- Gateway IP addresses: This column lists the current IP addresses of the gateways hosted on the latest generation of hardware. If you are provisioning a new server, we recommend that you open the client-side firewall to allow outbound traffic for the IP addresses listed in this column.
- Gateway IP addresses (decommissioning): This column lists the IP addresses of the gateways hosted on an older generation of hardware that is being decommissioned right now. If you are provisioning a new server, you can ignore these IP addresses. If you have an existing server, continue to retain the outbound rule for the firewall for these IP addresses as we have not decommissioned it yet. If you drop the firewall rules for these IP addresses, you may get connectivity errors. Instead, you are expected to proactively add the new IP addresses listed in Gateway IP addresses column to the outbound firewall rule as soon as you receive the notification for decommissioning. This will ensure when your server is migrated to latest gateway hardware, there is no interruptions in connectivity to your server.
- Gateway IP addresses (decommissioned): This columns lists the IP addresses of the gateway rings, which are decommissioned and are no longer in operations. You can safely remove these IP addresses from your outbound firewall rule.
|Region name||Gateway IP addresses||Gateway IP addresses (decommissioning)||Gateway IP addresses (decommissioned)|
|Australia East||184.108.40.206, 220.127.116.11|
|Australia South East||18.104.22.168, 22.214.171.124|
|Brazil South||126.96.36.199, 188.8.131.52||184.108.40.206|
|Central US||220.127.116.11, 18.104.22.168, 22.214.171.124, 126.96.36.199|
|China East 2||188.8.131.52|
|China North 2||184.108.40.206|
|East Asia||220.127.116.11, 18.104.22.168, 22.214.171.124, 126.96.36.199|
|East US||188.8.131.52, 184.108.40.206||220.127.116.11||18.104.22.168|
|East US 2||22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11|
|France Central||18.104.22.168, 22.214.171.124|
|Germany North East||126.96.36.199|
|Japan East||188.8.131.52, 184.108.40.206, 220.127.116.11|
|Japan West||18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52|
|North Central US||184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124|
|North Europe||126.96.36.199, 188.8.131.52||184.108.40.206||220.127.116.11|
|South Africa North||18.104.22.168|
|South Africa West||22.214.171.124|
|South Central US||126.96.36.199, 188.8.131.52||184.108.40.206||220.127.116.11|
|South East Asia||18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52|
|West Central US||184.108.40.206|
|West US||220.127.116.11, 18.104.22.168||22.214.171.124||126.96.36.199|
|West US 2||188.8.131.52|