Internet Performance Delivered right to your inbox

Developers Should Think Of DNS As Code

  • To take advantage of DNS in a DevOps world, you need to start managing your DNS records inline with a DevOps approach.
  • Traditionally, DNS was seen as a very static environment that was manually managed; this needs to change.
  • Remove the fear of DNS changes by implementing the “if something is hard to do, do it often” mentality by using DNS providers and tools that remove this difficulty.
  • Choose a DNS provider that provides the level of dynamic control that will be needed.
  • Treat your DNS records as code, creating scripts that can dynamically recreate your DNS state at any point.

DNS can be an important element when managing systems within a DevOps culture. However, before this can be reliably implemented, your DNS estate should be managed in an appropriate way to allow the amount of flexibility and dynamic change that will be required.

Traditional DNS Management

Traditionally, DNS was seen as being fairly static, with changes being done only occasionally. DNS changes were done by manually editing a text file on a server, for those running their own DNS servers, or more commonly by submitting a request to the company that managed the DNS records. This change would then take time to propagate through the internet, depending on the TTL set for the record.

This approach was acceptable in a traditional environment of relatively static resources where change was to be kept to a minimum.

However, when implementing a DevOps approach, it is necessary that DNS management is approached in a much more dynamic manner, accepting that change is not only inevitable but an essential element in managing a DNS-driven DevOps implementation.

This includes a change in mindset toward DNS changes.

Remove the Fear of DNS Changes

DNS carries with it an extremely high level of risk. After all, if a mistake is made, it can wipe out connectivity to your site for an extended period, especially in the world where TTL values were typically set to 24 hours.

When combined with the traditionally quite complex or cumbersome way that DNS was managed, it ledhttps://docs.google.com/document/d/1kUvZccRkJLO7y4ba2I8vi4K85cfucSGG1EvWh2zpG7k/edit?ts=59358b64 to a fear of making DNS changes.

DNS was often seen as something that just shouldn’t be touched unless absolutely necessary.

However, this is contrary to the DevOps mentality of “if something is hard to do, do it early and do it often,” making change easy by making it automated and repeatable.

With this in mind, it is essential that when applying a DevOps mentality to your organization, you start to bring your DNS provision under control and make management of it well-practiced.

To do this, it is essential that you use a DNS provider that provides dynamic API-based control, allowing changes to be made easily as part of scripting process.

Changes to DNS can therefore be automated via the API and executed on-demand.

DNS as Code

One of the most common elements implemented in a DevOps culture is a change to viewing “infrastructure as code.” That is, not seeing infrastructure as physical devices with state that need to be built and configured, but instead seeing infrastructure as simply a set of scripts that have to be executed in order to recreate the system.

This code can then be managed, evolved, and tested in the same way as application code. Your infrastructure becomes simply an extension of your application, managed and maintained in the same manner. Therefore the integration between dev and ops becomes even closer.

If all DNS changes can be managed via a dynamic API, then it is a logical next step to start extending your infrastructure as code to include your full DNS records, tracking changes in source control.

This will easily allow the full recreation of DNS records, in the event of a loss or a migration to an alternative supplier.

For more insights on the role DNS can play for developers, watch our webinar, “Modern DNS and DevOps Methodology.”


Share Now

Phil Stanhope
Whois: Phil Stanhope

Phil Stanhope is a VP, Technology Strategy at Oracle Dyn Global Business Unit, a pioneer in managed DNS and a leader in cloud-based infrastructure that connects users with digital content and experiences across a global internet.