Announcing GA of Read Replica for Azure PostgreSQL Flexible Server

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

We are excited to announce that our read replica feature for Azure Database for PostgreSQL - Flexible Server is now generally available (GA) in all public regions and this feature has several new enhancements over the read replica feature in Azure Database for PostgreSQL – Single Server.

 

This feature allows you to replicate data physically to one or more read-only replica(s) within and across regions to provide enhanced scalability for your read workloads. It is also a recommended option for Geo disaster recovery (DR) resiliency for workloads that must come online within few minutes if the primary region becomes unavailable. Read Replica leverages the PostgreSQL engine's native physical replication feature, updating replicas asynchronously via replication slots as the default operation mode and enabled log shipping when required.

 

Read replicas serve two main use cases: read scalability and disaster recovery. With read replicas, you can scale out read-heavy workloads by offloading read requests from the primary server to the replicas, reducing the load on the primary server and improving performance for your applications. Additionally, read replicas can also serve as a disaster recovery solution by promoting them to the read-write server in case of primary region failure. 

 

Customers can replicate data from their primary server to up to five replicas in the same or any other public region. Users can easily monitor replication with two metrics Max Physical Replication Lag and Read Replica Lag. The Max Physical Replication Lag metric shows the lag in bytes between the primary server and the most-lagging replica, allowing you to monitor the replication lag in near real-time. The Read Replica Lag metric shows the time since the last replayed transaction, providing you with visibility into the read replica's lag from the primary server.

 

Now you can achieve both: resiliency across availability zones and regions

With the general availability of the read replicas in Azure Database for PostgreSQL - Flexible Server, your database instance reliability in this feature is actually better than what was offered with Azure Database for PostgreSQL – Single Server.

 

With Azure Database for PostgreSQL – Flexible Server, you can attain resiliency across both availability zones and regions. The zone-redundant high availability safeguards your database instance from zone-wide outages within the region, while the read replica feature offers protection against region-wide outages.

 

The configuration of Geo Read Replica with high availability set up in the primary region is depicted in the image below.

 

AlicjaKucharczyk_0-1679884571497.png

Both the read replica and high availability features utilize the native PostgreSQL physical replication, ensuring that a failover to the standby node within the region will not result in the loss of the Geo Read replica (DR side). Please note that this failover scenario is not guaranteed with logical replication. To learn more about zone-redundant high availability, please refer to the documentation.  

 

Single Server vs Flexible Server

The table below highlights the differences between the read replica feature in Single Server and Flexible Server in Azure Database for PostgreSQL:

 

Feature Single Server Flexible Server
Replication type Physical Replication Physical Replication
Replication mode Asynchronous Asynchronous
Failover impact Potential data loss Potential data loss
Cross-region replication Supported Supported
Cross-region replication creation mechanism Size of data operation Size of data operation
In-region replication Supported Supported
In-region replication creation mechanism Size of data operation Snapshot, independent of data size
Max replica count 5 5
Metrics (monitoring)

Max Lag Across Replicas (Bytes),

Replica Lag (Seconds)

Max Physical Replication Lag (Bytes),

Read Replica Lag (Seconds)

Region-level resiliency Supported Supported
Region-level and zone-level resiliency Not Supported Supported, with high availability feature

 

Create in-region and cross region replicas

 

When you start the create replica workflow, a blank Azure Database for PostgreSQL server is created and your new server is filled with the data that was on the primary server. When creating replicas in the same region, the snapshot approach is used, so the time of creation doesn't depend on the size of your data. Geo-replicas are created using a base backup of the primary instance, which is then transmitted over the network. Depending on the primary size of your data, the time of creation might range from minutes to several hours.

 

Conclusion

We invite you to learn more about read replicas in Azure Database for PostgreSQL - Flexible Server by reading the following resources:

These resources provide detailed information about how to use read replicas in Azure Database for PostgreSQL - Flexible Server, including step-by-step guides on how to set up and manage your read replicas. 

 

We look forward to hearing about your’ experience with this new read replica feature in Azure Database for PostgreSQL - Flexible Server. We’re always eager to hear your feedback, so please reach out to us at Ask Azure DB for PostgreSQL.

 

To learn more about our Flexible Server managed service, see the Azure Database for PostgreSQL service page.

.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.