Affinity Group – Locate your cloud services as nearly as possible

Server rack
Microsoft Azure provides the services to customers to consume. The obvious question is where does these services exist? Technically these services are deployed in the Microsoft data centers across the world. At the time of writing this article, there are 11 Microsoft data centers around the globe

  • US East – Virginia
  • US West – California
  • US North Central – Illinois
  • US South Central – Texas
  • Europe North – Ireland
  • Europe West – Netherlands
  • Asia Pacific Southeast – Singapore
  • Asia Pacific East – Hong Kong
  • Japan East – Saitama Prefecture
  • Japan West – Osaka Prefecture
  • Brazil South – Sao Paulo

The size of each datacenters is as comparable as size of 7 soccer fields. Isn’t that huge? There are containers which hold hundreds of thousands of servers running 365 days in a year, 7 days in a week, 24 hours in a day. The fabric controller maintains them all. When you create a service on the cloud, the service is being created in these servers. At the same time, you have the autonomy to create the services in a specific region based on your choice. If you specify a data center, that doesn’t mean all of your services will be going to create on the same container. It could be two servers located at the two different containers at two extreme ends of the data center(remember the size of the data center is as large as 7 soccer fields).

Here comes the concept of affinity group. When you create multiple services in an affinity group, it would effectively ensure that all services will be created in the servers located in the same cluster and same rack(as nearly as possible). The main advantage of the affinity group is to reduce network latency and cost because data transfer between the same data center is free. You can create multiple affinity groups in a subscription but you can use these affinity groups only in the subscription that they were created under.

Following services would provide affinity group support

  • Cloud Services
  • Storage Services
  • Virtual Machines
  • Virtual Network