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

runtimeidiomwatch out for
Spring Bootapplication.yml + profiles, @ConfigurationProperties, relaxed binding from env (SPRING_DATASOURCE_URL), Spring Cloud Config serverprofile mix-ups; refresh scope surprises
Djangosettings.py reading env (django-environ), per-environment modulessettings imported at module load; DEBUG=True in production
Railsconfig/credentials.yml.enc + master key, config_for YAML, ENVthe master key handled like any secret
Goflags + env (envconfig, viper), a typed structviper's global state
Nodeenv parsed with zod or envalid into a typed objectreading 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).