Configuration drift is a common occurrence on mutable servers and is easily solved by the use of immutable servers. Here’s how configuration drift happens:
A developer programs an application and configures a server according to its needs. They then change or update the code and decide to reconfigure the same server to synchronize with the new code. This synchronization process is prone to error and will eventually lead to mismatches over time, especially if the same server is continuously reconfigured. The buildup of these minute differences over time is known as configuration drift.
Configuration drift can cause a lot of headaches. Eventually, if those minute mismatches stack up enough, the server will no longer run the application as intended, causing downtime, crashes, or security vulnerabilities associated with misconfigured applications. The root of these crashes is not always obvious, and it can take significant resources to identify and remedy the issue and its source.
With the advent of cloud computing and the use of infrastructure as code practices, solutions to configuration drift have become much simpler. Cloud computing's main advantage is the ability to dynamically provision servers through cloud service providers, making creating and destroying servers cheap and easy. This dynamic provisioning practice is coupled with Infrastructure as code practices that outline how code can be used to configure new servers exactly the same way every time.
These two facets of cloud-based development have given rise to the use of immutable servers, or servers that are not changed when the code is changed. Instead, every time code is changed and its corresponding server configuration needs to be updated, the entire server is destroyed and recreated, removing the process of synchronization and any of its associated risk of drift. This process would be costly and inefficient with in-house infrastructure, but is made astoundingly easy with modern cloud computing, as well as services like Terraform, that help handle your configuration needs for you.
Trusted by the world’s best DevOps and security teams. Doppler is the secrets manager developers love.