Part 1 · 1 chapters · ~8 min
Configuration Layers
Defaults, files, environment, remote configuration, per-tenant configuration and flags as layers with precedence, typed config with schemas, hot reload versus restart, and how each runtime loads configuration (Spring profiles, Django settings, Rails credentials, Go envconfig, Node with zod).
3
How each runtime loads configuration
| runtime | idiom | watch out for |
|---|---|---|
| Spring Boot | application.yml + profiles, @ConfigurationProperties, relaxed binding from env (SPRING_DATASOURCE_URL), Spring Cloud Config server | profile mix-ups; refresh scope surprises |
| Django | settings.py reading env (django-environ), per-environment modules | settings imported at module load; DEBUG=True in production |
| Rails | config/credentials.yml.enc + master key, config_for YAML, ENV | the master key handled like any secret |
| Go | flags + env (envconfig, viper), a typed struct | viper's global state |
| Node | env parsed with zod or envalid into a typed object | reading process.env all over the codebase |
Hot reload or restart? Restarts are simple and safe (rolling, health-checked). Hot reload is needed for remote config and flags; it must be atomic (swap the whole config object), validated before swapping, and observable (log the version applied).