Auto-failover groups make good use of active geo-replication by providing group-level replication and automatic failover. Moreover, you will not have to change the SQL connection string if a failover occurs. To create an auto-failover group, follow these steps:
- Navigate to the SQL Server in which the databases exist.
- Under Settings, click on Failover groups, as shown in the following screenshot:
- Click on Add group to add an auto-failover group.
- A new blade will pop up, where you will have to specify the following:
- Failover group name: Specify a descriptive name for the failover group.
- Secondary server: Specify the secondary server that will host the replicated database.
- Read/Write failover policy: You can let this process be done automatically, which is the default, and is recommended. Otherwise, you will have to do it manually.
- Read/Write grace period (hours): Specify the time between every automatic failover.
- Database within the group: Select the databases in that Azure SQL Server that you would like to add to the auto-failover group:
- Once you are done, click on Create.