In previous of Windows Server DNS round robin has been the method of choice for application load balancing in situations where your needed a single record to point to any of a series of servers.
Round robin is simple to implement but has a number of drawbacks. Since Windows Server 2016 Microsoft wants us to move away from the old practice of using round robin for application load balancing and change to utilising DNS policies.
To use the Microsoft example, if you’re wishing to utilising to prioritise one server or location more than others in the load balancing scenario as shown in the diagram below
You would need to setup the follow scopes on yours DNS server
Add-DnsServerZoneScope -ZoneName "contosogiftservices.com" -Name "SeattleZoneScope"
Add-DnsServerZoneScope -ZoneName "contosogiftservices.com" -Name "DallasZoneScope"
Add-DnsServerZoneScope -ZoneName "contosogiftservices.com" -Name "ChicagoZoneScope"
After you have created the partitions (zone scopes) and you have added records, you must create DNS policies that distribute the incoming queries across these scopes so that 50% of queries for contosogiftservices.com are responded to with the IP address for the Web server in the Seattle datacenter and the rest are equally distributed between the Chicago and Dallas datacenters. You can use the following Windows PowerShell commands to create a DNS policy that balances application traffic across these three datacenters.
Add-DnsServerQueryResolutionPolicy -Name "AmericaPolicy" -Action ALLOW -ZoneScope "SeattleZoneScope,2;ChicagoZoneScope,1;DallasZoneScope,1" -ZoneName "contosogiftservices.com"
Now for every four queries the DNS server receives, it responds with two responses for Seattle and one each for Dallas and Chicago.
You have now successfully created a DNS policy that provides application load balancing across Web servers in three different datacenters.
You can create thousands of DNS policies according to your traffic management requirements, and all new policies are applied dynamically – without restarting the DNS server – on incoming queries.
The policy weight can always be changed to meet your needs, and the Get-DnsServerQueryResolutionPolicy command can come in handy to see what’s happening in your environment. Example below
Get-DnsServerQueryResolutionPolicy -ZoneName "contosogiftservices.com" | Format-List *