Skip to content

Instantly share code, notes, and snippets.

View epignosisx's full-sized avatar
😀

Alejandro H epignosisx

😀
View GitHub Profile
@epignosisx
epignosisx / how.md
Last active February 8, 2021 19:10
How do you manage application configuration?

In any decent size project I quickly find myself needing multiple strategies for different kinds of settings. I can group them into:

  1. Dynamic. These are settings that I need to change at runtime, without having to restart or redeploy the app. Ex: Minimum Log Level, when there is an issue I would like to turn on debug logging without having to restart the process since many times it could make the problem go away.

  2. Static. These are settings that require a process restart. Ex: the port number the app is listening on. Also settings that don’t change often enough to fall in the dynamic category. Ex: file share location.

  3. Secrets. These are sensitive settings like database connection strings or API keys that we would like to limit its access and visibility.

  4. Features. These need to be changed at runtime (similar to Dynamic settings), but different in the sense that they are conditional based on user attributes, time of date, percentage of users, etc. Ex: roll out of a new feature.