Config files vs. flags: story of pain
summary
Argues that preferencing command-line flags and environment variables over static files eliminates indirection and improves observability because the full runtime config is visible in the process command line; notes ARG_MAX on Unix is around 2 megabytes ARG_MAX so long flags are feasible, while Kubernetes ConfigMaps are size-limited to 1 megabyte and are independent resources that break coordinated rollouts. Recommends flags-by-default, standardizing flag libraries, using files only for very large or nested configs (Nginx, OpenTelemetry), and storing structured configs as proto text when possible, plus sensible defaults and no programming inside configs.
AI-written summary · about
chapters (10)
- 0:00Introduction and Speaker Background
- 0:20The Problem with Application Configurations
- 1:49Understanding Config Files
- 3:03Issues with Config Files
- 5:07Improving Configurations
- 7:42Using Flags for Configuration
- 10:15Arguments Against Flags
- 12:56Config Files in Kubernetes
- 17:06Best Practices for Configurations
- 21:02Conclusion
related talks
32mConfiguration Is (riskier than?) Code
37mConfiguring Your Kubernetes Cluster on the Next Level
07mKeep Calm and Deploy On: Creating Safer Releases with Feature Flags
44mQ&A
30mA Tale of Two Feature Flags
12mLightning Talk: Feature Flagging at Scale: Problems with Flag Cleanup
18mEverything-as-Code: It's time to fix configurations
53mDr Sheldon Cooper Presents: Fun with Flags
