DNS in Azure provides name resolution for your infrastructure. Hosted on Microsoft Azures Infrastructure, it is reliable and resilient to a fault.
Although you cannot use Azure to purchase a domain name, once you own your custom domain name, you can then host your public DNS zone in Azure and take advantage of the Azure Services.
There is a cost to hosting your DNS in Azure which we will cover in this post. This cost covers you whether you are hosting a public or private zone for your DNS in Azure.
How does DNS in Azure work?
There are 2 type of DNS in Azure which we will discuss. The first is Azure DNS, this is Azure public DNS service. There is also Azure Private DNS, which is Azure Private DNS zone hosting service.
Azure DNS
Azure DNS is Azure Public DNS hosting service, with this you can use the Azure Cloud to provide name resolution for your public services under your custom domain. It also provides name resolution for additional Azure services you have hosted in your tenant. Azure DNS uses any cast networking technology so each DNS query is answered by the closest available DNS server, providing high performance for your domain. Additional benefits for using Azure DNS is the ability to track activity logs when resources are modified and use role-based access control to govern who can perform specific actions and changes.
Azure Private DNS
Azure Private DNS provides secure domain name resolution for your private network using your own custom domain names. Azure Private DNS provides resolution for your virtual machines within the primary virtual network and any connected virtual networks. The zone can also be configure with what is called a split-horizon view, allowing you to have the same name across your public and private DNS zones.
How much does it cost?
Azure DNS pricing is based on two factors; how many zones you have and how many queries you receive. You can view and calculate the current price of Azure DNS with Azure Pricing Calculator at the following link: https://azure.microsoft.com/en-gb/pricing/calculator/?service=dns
For example, using the calculator, if I have 2 zones and roughly make 10 million DNS queries a month, my monthly cost would be £3.71 a month.
Use cases for DNS in Azure
If you are hosting your own Windows DNS server to host a DNS zone there will come a time that your operating system will become unsupported and hence, slow and insecure. Hosting a physical or virtual server can be expensive, in both infrastructure costs and licensing costs. In this scenario, it may be more cost-effective to move your DNS zones to Azure DNS. I have been in situations where clients have had both private and public DNS zones hosted on 2003 to 2008 Windows Servers and Azure DNS has been the perfect solution.
Benefits
Automation
DNS in Azure can be directly managed with PowerShell, this opens up a world of possibilities for you to manage your DNS records automatically using PowerShell.
Management
Although you cannot purchase your domain in Azure, as you are managing all the records for your domain using the Azure Portal or PowerShell, this provides you with a familiar management platform.
Cost
Azure DNS allows you to heavily save on your infrastructure costs whether you are hosting a private DNS Zone or public DNS zone.
Security
As Azure DNS is based on Azure Resource Manager you can utilise role-based access control to provide access to your DNS zone based on your staff’s existing identities. You are also able to lock resources and audit activity logs.
Additional Study Material for Azure DNS
A great book I have recently read is the Azure Networking Cookbook! it takes you through planning, implementing and securing your infrastructure as well as creating fault tolerating environments using Azure network services, such as DNS in Azure! If you or your company is looking to invest in your development, this book is a must!