In Exchange Server 2016 Cumulative Update 2 (CU2), Microsoft is changing the behavior of database availability groups.
Starting with CU2 (which will be releasing soon), the Primary Active Manager in the DAG performs periodic discretionary moves to activate the copy that the administrator has defined as most preferred is now built into the product. A new DAG property called PreferenceMoveFrequency has been added that defines the frequency (measured in time) when the Microsoft Exchange Replication service will rebalance the database copies by performing a lossless switchover that activates the copy with an ActivationPreference of 1 (assuming the target server and database copy are healthy).
Two things spring to mind when I read that:
- The effectiveness of the new behavior will depend on how well balanced your activation preferences are
- The fact that the new behaviour is enabled by default to run hourly will upset some folks
This really comes down to how you view database switchovers today. For some customers, a database switchover is a normal operational event that can occur any time of day or night. For change-controlled environments it’s likely to be a pre-approved change. Those customers probably already have scheduled tasks in place that rebalance the DAG on a nightly basis, perhaps right before the backups are due to start. The good news is they can get rid of those scheduled tasks now, but perhaps will modify the DAG to attempt rebalancing less frequently.
For customers that strictly control when database switchovers can occur, this new behavior requires some action. I’m talking about the type of environment where if a database fails over to another DAG member, they wait until outside of business hours to manually switch the database back to their preferred copy. Some customers even require full change management processes for this. For those customers, after upgrading to CU2 they should disable the automatic balancing (if they don’t want it to run).
[PS] C:\> Set-DatabaseAvailabilityGroup -Identity DAG01 -PreferenceMoveFrequency ([System.Threading.Timeout]::InfiniteTimeSpan)
The above command can be run after at least one DAG member has been updated to CU2, although it will only take effect once the Primary Active Manager (PAM) is running CU2, and requires that the Microsoft Exchange Replication service be restarted. So you can fit it into your maintenance window for CU2 deployment.