Connectivity architecture in Azure Database for PostgreSQL
APPLIES TO: Azure Database for PostgreSQL - Single Server
This article explains the Azure Database for PostgreSQL connectivity architecture and 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's 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 located behind an IP address. This is an address your client would reach first when trying to connect to an Azure Database for PostgreSQL server.
As part of ongoing service maintenance, we'll periodically refresh compute hardware hosting the gateways to ensure we provide the most secure and performant connectivity 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 has a different IP address from older gateway rings in the same region to differentiate the traffic. The older gateway hardware continues serving existing servers but are planned for decommissioning in future. Before decommissioning a gateway hardware, customers running their servers and connecting to older gateway rings are 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
<servername>.postgres.database.azure.com, in the connection string for your application.
- You don't update the newer gateway IP addresses in the client-side firewall to allow outbound traffic to be able to reach our new gateway rings.
We strongly encourage customers to use the Gateway IP address subnets in order to not be impacted by this activity in a region.
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. As hardware is refreshed we'll remove these and recommend that you open the client-side firewall to allow outbound traffic for the IP address subnets listed in the next column.
- Gateway IP address subnets: This column lists the IP address subnets of the gateway rings located in the particular region. As we retire older gateway hardware, we recommend that you open the client-side firewall to allow outbound traffic for the IP address subnets in the region you are operating.
|Region name||Gateway IP addresses||Gateway IP address subnets|
|Australia East||188.8.131.52, 184.108.40.206||220.127.116.11/29, 18.104.22.168/29, 22.214.171.124/29|
|Australia South East||126.96.36.199, 188.8.131.52, 184.108.40.206||220.127.116.11/29|
|Brazil South||18.104.22.168, 22.214.171.124||126.96.36.199/29, 188.8.131.52/29|
|Canada Central||184.108.40.206, 220.127.116.11||18.104.22.168/29, 22.214.171.124/29, 126.96.36.199/29|
|Canada East||188.8.131.52, 184.108.40.206||220.127.116.11/29|
|Central US||18.104.22.168, 22.214.171.124, 126.96.36.199||188.8.131.52/29, 184.108.40.206/29, 220.127.116.11/29|
|China East 2||18.104.22.168, 22.214.171.124||126.96.36.199/29|
|China East 3||188.8.131.52||184.108.40.206/29|
|China North 2||220.127.116.11||18.104.22.168/29|
|China North 3||22.214.171.124||126.96.36.199/29, 188.8.131.52/29|
|East Asia||184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124||126.96.36.199/29, 188.8.131.52/29|
|East US||184.108.40.206, 220.127.116.11||18.104.22.168/29, 22.214.171.124/29, 126.96.36.199/29|
|East US 2||188.8.131.52, 184.108.40.206||220.127.116.11/29, 18.104.22.168/29, 22.214.171.124/29|
|France Central||126.96.36.199, 188.8.131.52||184.108.40.206/29, 220.127.116.11/29|
|France South||18.104.22.168||22.214.171.124/29, 126.96.36.199/29|
|Germany West Central||188.8.131.52||184.108.40.206/29, 220.127.116.11/29, 18.104.22.168/29|
|India Central||22.214.171.124||126.96.36.199/29, 188.8.131.52/29|
|India South||184.108.40.206||220.127.116.11/29, 18.104.22.168/29|
|India West||22.214.171.124||126.96.36.199/29, 188.8.131.52/29|
|Japan East||184.108.40.206, 220.127.116.11||18.104.22.168/29, 22.214.171.124/29, 126.96.36.199/29|
|Japan West||188.8.131.52, 184.108.40.206, 220.127.116.11||18.104.22.168/29|
|Korea Central||22.214.171.124||126.96.36.199/29,188.8.131.52/29, 184.108.40.206/29|
|North Central US||220.127.116.11, 18.104.22.168||22.214.171.124/29|
|North Europe||126.96.36.199, 188.8.131.52||184.108.40.206/29, 220.127.116.11/29, 18.104.22.168/29|
|South Africa North||22.214.171.124||126.96.36.199/29, 188.8.131.52/29, 184.108.40.206/29|
|South Africa West||220.127.116.11||18.104.22.168/29|
|South Central US||22.214.171.124, 126.96.36.199||188.8.131.52/29, 184.108.40.206/29, 220.127.116.11/29, 18.104.22.168/29|
|South East Asia||22.214.171.124, 126.96.36.199||188.8.131.52/29, 184.108.40.206/29, 220.127.116.11/29|
|Switzerland North||18.104.22.168||22.214.171.124/29, 126.96.36.199/29, 188.8.131.52/29, 184.108.40.206/27|
|UAE Central||220.127.116.11||18.104.22.168/29, 22.214.171.124/29|
|UAE North||126.96.36.199||188.8.131.52/29, 184.108.40.206/29|
|UK South||220.127.116.11, 18.104.22.168, 22.214.171.124||126.96.36.199/29, 188.8.131.52/29, 184.108.40.206/29|
|UK West||220.127.116.11||18.104.22.168/29, 22.214.171.124/29|
|West Central US||126.96.36.199, 188.8.131.52||184.108.40.206/29|
|West Europe||220.127.116.11, 18.104.22.168||22.214.171.124/29, 126.96.36.199/29, 188.8.131.52/29|
|West US||184.108.40.206, 220.127.116.11||18.104.22.168/29|
|West US 2||22.214.171.124, 126.96.36.199,188.8.131.52||184.108.40.206/29, 220.127.116.11/29, 18.104.22.168/29|
|West US 3||22.214.171.124||126.96.36.199/29, 188.8.131.52/29, 184.108.40.206/29|
Frequently asked questions
What you need to know about this planned maintenance?
This is a DNS change only, which makes it transparent to clients. While the IP address for FQDN is changed in the DNS server, the local DNS cache is refreshed within 5 minutes, and it is automatically done by the operating systems. After the local DNS refresh, all the new connections will connect to the new IP address, all existing connections will remain connected to the old IP address with no interruption until the old IP addresses are fully decommissioned. The old IP address takes roughly three to four weeks before getting decommissioned; therefore, it should have no effect on the client applications.
What are we decommissioning?
Only Gateway nodes are decommissioned. When users connect to their servers, the first stop of the connection is to gateway node, before connection is forwarded to server. We are decommissioning old gateway rings (not tenant rings where the server is running) refer to the connectivity architecture for more clarification.
How can you validate if your connections are going to old gateway nodes or new gateway nodes?
Ping your server's FQDN, for example
ping xxx.postgres.database.azure.com. If the returned IP address is one of the IPs listed under Gateway IP addresses (decommissioning) in the document above, it means your connection is going through the old gateway. On the contrary, if the returned Ip-address is one of the IPs listed under Gateway IP addresses, it means your connection is going through the new gateway.
You may also test by PSPing or TCPPing the database server from your client application with port 5432 and ensure that return IP address isn't one of the decommissioning IP addresses
How do I know when the maintenance is over and will I get another notification when old IP addresses are decommissioned?
You receive an email to inform you when we start the maintenance work. The maintenance can take up to one month depending on the number of servers we need to migrate in al regions. Please prepare your client to connect to the database server using the FQDN or using the new IP address from the table above.
What do I do if my client applications are still connecting to old gateway server?
This indicates that your applications connect to server using static IP address instead of FQDN. Review connection strings and connection pooling setting, AKS setting, or even in the source code.
Is there any impact for my application connections?
This maintenance is just a DNS change, so it is transparent to the client. Once the DNS cache is refreshed in the client (automatically done by operation system), all the new connections connect to the new IP address and all the existing connections will still be working fine until the old IP address gets fully decommissioned, which is several weeks later. And the retry logic is not required for this case, but it is good to see the application have retry logic configured. Either use FQDN to connect to the database server in your application connection string. This maintenance operation will not drop the existing connections. It only makes the new connection requests go to new gateway ring.
Can I request for a specific time window for the maintenance?
As the migration should be transparent and no impact to customer's connectivity, we expect there will be no issue for majority of users. Review your application proactively and ensure that you either use FQDN to connect to the database server or enable list the new 'Gateway IP addresses' in your application connection string.
I'm using private link, will my connections get affected?
No, this is a gateway hardware decommission and have no relation to private link or private IP addresses, it will only affect public IP addresses mentioned under the decommissioning IP addresses.
Submit and view feedback for