Quick revision
The short answer
I would give configuration the same path to production as code: it lives in version control and is reviewed, it is validated at build or deploy time and again when the service starts, and it is rolled out progressively with the same canary and rollback steps as a code release. Only a small, tested set of values, such as feature flags, may change at runtime, and configuration-caused incidents are tracked as a metric and reviewed like any other cause.
What to remember
In this answer, we saw that configuration causes many incidents because it usually skips the safety steps we built for code. The long-term answer is to give it the same path: version control and review with owners for critical keys, validation with @Validated @ConfigurationProperties and a CI context start per environment, progressive rollout with automatic rollback, a small and tested set of runtime-mutable values such as feature flags, and a metric of configuration-caused incidents reviewed every quarter.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would give configuration the same path to production as code: it lives in version control and is reviewed, it is validated at build or deploy time and again when the service starts, and it is rolled out progressively with the same canary and rollback steps as a code release. Only a small, tested set of values, such as feature flags, may change at runtime, and configuration-caused incidents are tracked as a metric and reviewed like any other cause.
Why this question is asked
In many companies, code changes go through review, tests, a build, a canary and an automatic rollback, while a configuration change goes straight to every instance at once through a console or a shared file. So it is no surprise that configuration causes a large share of outages: a wrong timeout, a pool size typed with an extra zero, a feature switched on everywhere at the same time. Interviewers ask this of senior leaders because the fix is mostly about process and platform, not about a clever library, and because it needs a long-term plan rather than one rule. In this answer, we will look at why configuration is risky, then go through version control and review, validation, progressive rollout, runtime-mutable configuration, and how we measure whether the programme works.
1Why Configuration Changes Are So Risky
A configuration change is a change to the behaviour of a running system, exactly like a code change. The difference is that it usually skips the safety steps we built for code. It is often applied to every instance at the same moment, so there is no small group of instances to show the problem first. It is rarely tested, because nobody writes a unit test for a YAML file. And it is often not recorded in the same history as code, so during an incident nobody can answer the first question: what changed?
The idea behind the whole programme is simple. If configuration can break production just like code, it should travel through the same pipeline as code. Each step below closes one of the gaps.
- Change proposed as a pull requestsame repository or a config repository
- Reviewed by an ownerCODEOWNERS for critical keys
- Validated in CIschema, types, and a context start per environment
- Rolled out to a canarya few instances or one region first
- Metrics healthy?errors, latency, saturationYesContinue to all instancesNoRoll back automatically
5 steps in order. Play them, or step through them one at a time.
Configuration follows the same path as code, including rollback.
2Version Control and Review
The first rule is that every non-secret configuration value lives in Git: in the service repository, or in a configuration repository that a GitOps tool such as Argo CD or Flux applies to the cluster. A change is a pull request with a description, a reviewer and a history. During an incident, git log answers what changed and who changed it, and git revert undoes it.
Review should match the risk. We can mark critical keys, such as pool sizes, timeouts and anything affecting payments, with CODEOWNERS rules so the owning team must approve. Values that differ between environments should be visible side by side, so a reviewer sees that prod has a timeout of 300s while every other environment has 3s, and asks why.
3Validation Before and at Startup
Review catches intent; validation catches typos. In Spring Boot, every group of properties is bound to a @ConfigurationProperties class with @Validated and Bean Validation constraints, so a value that is missing, out of range or of the wrong type stops the service at startup with a clear message instead of failing on the first real request.
We move the same check earlier too. A CI job starts the application context with each environment's configuration, without connecting to real databases where possible, and fails the build if binding or validation fails. That way a broken prod value is found when the pull request is opened, not when the deployment reaches production.
Notice that the constraint encodes knowledge that used to live only in someone's head: a pool larger than 200 overwhelms the database. Turning those facts into constraints is one of the most valuable things senior engineers can do for configuration safety.
4Progressive Rollout and Rollback
The step that prevents the biggest outages is progressive rollout. When configuration is part of the deployment, for example a ConfigMap rendered by the same Helm chart, a change creates a new release that goes through the same canary as a code change: a few instances first, metrics compared with the old version, then the rest. If error rates rise, the rollout stops and rolls back automatically.
This needs one technical detail to work: a configuration change must actually trigger a new rollout. In Kubernetes, a ConfigMap that changes without changing the pod template does not restart anything, and pods pick up the new value whenever they happen to restart, which is the opposite of a controlled rollout. Putting a hash of the configuration into a pod annotation, which many Helm charts do, makes every change a proper versioned release.
5Keep Runtime-Mutable Configuration Small
Some values must change without a deployment, such as feature flags, a kill switch for a failing integration, or a rate limit during an attack. Those are legitimate, but each runtime-mutable value is a path to production that skips the pipeline. So we keep that set small and explicit: a feature flag service with targeting, so a flag can be turned on for 1 percent of users before 100 percent, audit logs of every change, and tests that cover both states of each flag.
Everything else is static configuration, fixed for the life of a release. A rule I find useful is that anything not on the approved runtime list needs a deployment, even if the technology could change it live.
6Measuring the Programme
Leadership is also about knowing whether it works. We tag every incident with its cause during the post-incident review, so we can track the share caused by configuration each quarter. If it was 35 percent and falls to 10 percent, the programme is working; if it does not move, the reviews show which gap remains, perhaps a team still editing values in a console.
We review configuration incidents in the same forum as code incidents and ask the same question: which step of the pipeline should have caught this, and why did it not? Each answer becomes a new constraint, a new CI check or a new owner rule.
7Follow-up questions
How do you handle emergency configuration changes during an incident?
The pipeline needs a fast lane, not an exception. An emergency change is still a pull request, approved by the incident lead and rolled out with a shorter canary. If we allow console edits during incidents, they become the normal path, and the history we need for the next incident is lost.
Should secrets go through the same pipeline?
Their references should, their values should not. The configuration in Git names which secret a service uses, for example a path in Vault, and that reference is reviewed like any other value. The secret value itself lives in a dedicated secret store with its own access control and audit.
What would you do first in a company with no configuration discipline?
Measure and get the history. I would tag recent incidents to find how many came from configuration, and move the most incident-prone configuration into Git with review. Validation and canaries come next, starting with the services that caused the most configuration incidents.
8Conclusion
In this answer, we saw that configuration causes many incidents because it usually skips the safety steps we built for code. The long-term answer is to give it the same path: version control and review with owners for critical keys, validation with @Validated @ConfigurationProperties and a CI context start per environment, progressive rollout with automatic rollback, a small and tested set of runtime-mutable values such as feature flags, and a metric of configuration-caused incidents reviewed every quarter.
Open with
My principle would be that configuration is code and travels the same path to production. First, all non-secret configuration lives in Git, either in the service repository or in a config repository applied through GitOps, so every change is a reviewed pull request with a history.
Then, if they want more
Critical keys like pool sizes and timeouts get code owners. Second, validation. Every property group is bound with @ConfigurationProperties and @Validated, with constraints that capture what we know, like a pool size limit, so bad values stop the service at startup.
CI also starts the application context with each environment's configuration, so a bad production value fails the pull request instead of the deployment. Third, progressive rollout. A configuration change must create a new release, for example by putting a config hash in the pod annotations, and it goes through the same canary and automatic rollback as code.
Fourth, I keep runtime-mutable configuration to a small, explicit set, mainly feature flags and kill switches in a flag service with gradual targeting, audit and tests for both states. Everything else needs a deployment. Finally, I measure it.
We tag incidents by cause, track the share caused by configuration each quarter, and for each one ask which pipeline step should have caught it, then add that check.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Boot reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Configuration changes cause a large share of production incidents in your company. As...": https://scrivio-interview-library.netlify.app/spring-boot/externalized-configuration/9ba710accb/