In the Transport High Availability in Exchange 2013 article we discussed, amongst other topics, Exchange’s Shadow Redundancy feature and how it generates redundant copies of e-mails before these being delivered to mailboxes and before Exchange acknowledging to the sending server successfully receiving them.
We also saw that in DAG environments, Exchange gives preference to creating a shadow copy of an email on a DAG member that is located in a different Active Directory (AD) site, if any. But what if we have a DAG that extends one or more AD sites but we want shadow copies to be created only within the same site? If we look at our Transport Config, we will see a ShadowMessagePreferenceSetting parameter (the following output has been truncated):
[PS] C:\> Get-TransportConfig | FL MaxRetriesForLocalSiteShadow : 2 MaxRetriesForRemoteSiteShadow : 4 ShadowHeartbeatFrequency : 00:02:00 ShadowMessageAutoDiscardInterval : 2.00:00:00 ShadowMessagePreferenceSetting : PreferRemote ShadowRedundancyEnabled : True ShadowResubmitTimeSpan : 03:00:00
The ShadowMessagePreferenceSetting parameters has three possible settings:
- PreferRemote: Exchange tries to make a shadow copy of the message on a server in a different AD site. If the operation fails, it tries a server in the local AD site;
- LocalOnly: a shadow copy of the message should only be made on a server in the local AD site;
- RemoteOnly: a shadow copy of the message should only be made on a server in a different AD site.
Please have in mind that this parameter is only meaningful when the primary server that is trying to make a shadow copy of the message is a Mailbox server that is a member of a DAG that spans multiple AD sites.
As such, if we want our shadow copies to be created within the same site, all we have to do is update the parameter to LocalOnly. However, when we try to do so we might get the following error depending if the other parameters still have their default values:
[PS] C:\> Set-TransportConfig -ShadowMessagePreferenceSetting LocalOnly The value for MaxRetriesForRemoteSiteShadow must be set to zero for the LocalOnly shadow redundancy preference setting.
So what we need to do is to also update the MaxRetriesForRemoteSiteShadow parameter:
[PS] C:\> Set-TransportConfig -ShadowMessagePreferenceSetting LocalOnly -MaxRetriesForRemoteSiteShadow 0