- **Epistemic status:** #seedlings
Applications often rely on certain values that can change depending on the environment or customers. Creating parameter values that are outside the application itself allows the code to adapt with minimal effort. There are a few common things that set as configuration data:
- Credentials for external services such as a database or third party [[Application Programming Interface (API)]]
- Logging levels and destinations
- Port, IP address, machine, and cluster names the app uses
- Environment-specific validation parameters
- Externally set parameters such as tax rates
- Site-specific formatting details
- License keys
- Etc
You can keep these configurations in two ways:
## Static Configuration
When the data is stored in the application as a flat file such as JSON or YAML and read when the application starts. The benefits of this is that it can speed up development since you don't have to have a separate environment to worry about. The downside is that you can't change these settings on the fly, but need to reboot the server to catch them.
## Configuration-As-A-Service
When the data is stored behind a service, database or [[Application Programming Interface (API)]]. The benefits are that configurations can be shared for multiple applications, changes can be made globally, and the configuration is dynamic. The downside is that it requires upfront cost and maintenance to make this happen.
---
## References
- Thomas, David, and Andrew Hunt. _The Pragmatic Programmer, 20th Anniversary Edition: Journey to Mastery_. Second edition. Boston: Addison-Wesley, 2019.