Hi Jeyasingh, Vijayalingam •,
Welcome to Microsoft Q&A forum.
As I understand, you want to know DR in case of Azure Database for MySQL Primary Server is down and Read Replica is activated.
For both zone-redundant and same-zone HA:
- If there's a failure, the time needed for the standby replica to take over the role of primary depends on the time it takes to replay the binary log from the primary storage account to the standby. So we recommend that you use primary keys on all tables to reduce failover time. Failover times are typically between 60 and 120 seconds.
- The standby server isn't available for read or write operations. It's a passive standby to enable fast failover.
- Always use a fully qualified domain name (FQDN) to connect to your primary server. Avoid using an IP address to connect. If there's a failover, after the primary and standby server roles are switched, a DNS A record might change. That change would prevent the application from connecting to the new primary server if an IP address is used in the connection string.
Can I use the standby replica for read or write operations? The standby server isn't available for read or write operations. It's a passive standby to enable fast failover.
Is replication between the primary and standby replicas synchronous? The replication between the primary and the standby is similar to semisynchronous mode in MySQL. When a transaction is committed, it doesn't necessarily commit to the standby. But when the primary is unavailable, the standby does replicate all data changes from the primary to make sure there's no data loss.
You can make use of Cross region replication using Data-in replication with Azure Database for MySQL - Flexible Server described here:
https://techcommunity.microsoft.com/t5/azure-database-for-mysql-blog/cross-region-replication-using-data-in-replication-with-azure/ba-p/3563231
In above post set-up, any changes to primary instance in one region will be replicated to the server in the other region by using the native replication technique. Take advantage of this solution to scale read workloads or to address DR considerations for potential regional disasters.
Hope this helps.
Let us know if you have more queries or a different ask.
Thanks