If you have worked with Active Directory for some time and you have a lot of branch sites in your organization distributed globally then one thing you probably have come across is the need to make sure that you have your Active Directory Sites and Services (ADSS) configured properly and is maintained regularly. A properly configured ADSS infrastructure provides you with a very efficient Microsoft environment within your organization. The thing with the connections to branch sites is that these connections change over time due to connection upgrades, path changes within the WAN service provider, and etc. When these changes occur the site link costs that were once configured for can be invalid and a link that was the best previously might be the worst now. Thus these costs need to be updated promptly upon these changes so that the user experience is not affected.
What we usually do is, for convenience, to configure cost values based on our “gut feeling”. For example, if we have three datacenters in Sweden, USA, and Sri Lanka, and for our branch site in Australia we would say that the site link cost for Australia-Sri Lanka is 100, Australia-Sweden is 200, and Australia-USA is 300. If you have an idea about the network then this works for the most part. This is also very easy and convenient in day to day administration but things get complicated when you have a large number of site links and many changes are occurring within the network. So you might have had this in the back of your mind now, with almost everything being automated nowadays, this is something that we can handover to a computer to do. However for a computer to do something it needs to be told how exactly to do that and for something like this to be done in a consistent way we need a – yes, an algorithm!
Designing an algorithm is the first step. Automating how to use it is a simple task when we have the algorithm. I will focus on the algorithm in this post. I haven’t had the time yet to automate this but if you get there I’d love to hear your journey!
ROUND ((1024 / LOG10 (Bandwidth)) x LOG10 (Latency))
The syntax is designed for Microsoft Excel and I will explain this so you can use and translate the logic behind it however you want in your applications.
- Bandwidth: The minimum bandwidth of the connection (between the two sites in a site link) in kilobits per second (Kbps).
- Latency: The average round trip time in the connection in milliseconds (ms).
- LOG10: Common logarithm or logarithm to the base 10.
- ROUND: The nearest whole number when rounded off.
Yeah, it’s simple as that!
In essence, this will generate low costs for high bandwidth low latency connections and generate high costs for low bandwidth high latency connections making the endpoints prefer the former over the latter for network traffic direction.
I’m writing this from Microsoft Ignite 2017, Orlando FL enjoying the beautiful climate with the sun blazing at 30 C. 🙂