Is it just me, or do others feel distributed configuration is a highly underrated practice that gained popularity with the container revolution? 🤔
I have embraced and advocated for distributed configuration across all of my platforms.
It can be complex at scale, and managing variations across multiple environments can be challenging.
But applying a configuration change in an instant is a production manageability superpower! 🦸♂️
What is distributed configuration?
When we talk about application configuration, many folks think about configuration files: JSON, YAML, TOML, or 🤢 Java properties files.
We used to manage these configuration files on our applications’ server’s filesystem, using fancy configuration management tools to make changes. But containerized applications changed all of that.
With containers, many moved their configurations to environment variables or baked their configuration files into the containers.
Baking the configuration files into containers is problematic for many reasons, but the biggest is that you must repackage and redeploy your containers to change a configuration. 📦🚛
Adjusting something simple, like a timeout value, can be a lot of work.
If you need to fix production, this time-consuming process is a problem, but there is a better way.
Distributed Configuration Services, such as etcd, Consul, and others, allow you to store your configuration in an external service.
When your application boots up, it only needs configuration details to connect to your external configuration provider.
Once the connection is made, all other application configurations should be pulled from the provider.
The best part is that you can change these configurations live; if implemented correctly, they can be applied live without restarting the application.
Log levels are probably one of the things that I adjust most. Adjusting log levels live without restarting an application is a requirement for any of my applications.
If you have to restart an application to change log levels, the thing you are debugging may disappear.
Having a live configuration update makes this a non-issue.
But even if you don’t implement live configuration reload, which can be complicated from an application internals perspective, quickly changing the configuration across many instances of an application without rebuilding or redeploying those containers is an exceptional operational capability. 💪

Top comments (0)