Scrivio Interview library
DesignAdvanced6 min read · updated 12 November 2026

Design the configuration management approach for 200 Spring Boot services across four environments and three regions, so that configuration is reviewable, consistent and safe to change.

I would keep configuration in git next to each service's deployment manifests, as a base plus overlays for each environment and region, and review every change like code. Secrets stay in a secrets manager and are referenced by name, never stored in git. Each service binds its settings with @ConfigurationProperties and @Validated so bad values fail at startup, configuration changes roll out region by region like code, and the effective configuration, with secrets masked, is visible through a protected Actuator endpoint for troubleshooting.

Why this question is asked

With 200 services, four environments and three regions, there are up to 2,400 combinations of configuration. If each lives in a different place, managed in a different way, nobody can answer simple questions such as what timeout payments uses in the EU production region, or who changed it. Interviewers ask this design question to see whether we can make configuration reviewable, consistent and safe at that scale. In this answer, we will structure configuration in git with overlays, handle secrets, validate values, roll out changes progressively, and make the effective configuration visible.

1The Problem With Scattered Configuration

Configuration tends to spread: some in application.yml inside the jar, some in environment variables in a deployment script, some edited by hand in a console, some in a config server with its own history. When a value is wrong, nobody knows which source wins, and when it changes, there is no review and no record. At 2,400 combinations, drift between regions is guaranteed: a fix applied to two regions and forgotten in the third.

The design goal is one place per service where every value for every environment and region can be read, reviewed and traced back to a commit.

2Configuration in Git With Overlays

I would keep each service's configuration in git next to its deployment manifests, either in the service's repository or in a shared deployment repository, using a base and overlays. The base holds values that are the same everywhere. An environment overlay holds what differs per environment, and a region overlay holds what differs per region. Tools such as Kustomize or Helm values files combine them, and a GitOps controller such as Argo CD or Flux applies the result to each cluster.

Text
orders/
base/
application.yml # defaults for every environment
deployment.yaml
overlays/
prod/
application-prod.yml # prod-wide values
eu-west-1/kustomization.yaml # region-specific: endpoints, capacity
us-east-1/kustomization.yaml
ap-south-1/kustomization.yaml
staging/ ...
# rendered result for prod in eu-west-1 is a ConfigMap and a Deployment
# kustomize build overlays/prod/eu-west-1 | grep payments.timeout
# payments.timeout: 2s
Step throughHow the effective configuration is built
  1. BaseDefaults shared by every environment
  2. Environment overlayprod, staging, test, dev
  3. Region overlayeu-west-1, us-east-1, ap-south-1
  4. Secret referencesNames resolved from the secrets manager
  5. Rendered ConfigMapApplied by GitOps, validated at startup

5 layers, from the top down. Step through them one at a time.

Each layer only holds what differs from the one above it.

Notice that most values live in the base, so a typical region overlay is only a few lines. Small overlays make differences visible: a reviewer can see at a glance that only the endpoints differ between regions. Changes go through pull requests with the service owners as reviewers, and CI renders every combination so the reviewer sees the effective result, not just the diff.

3Secrets Referenced by Name

Secrets stay out of git entirely. The configuration refers to them by name, for example a path in Vault or AWS Secrets Manager, and the platform delivers the values to the pod through the External Secrets Operator or a CSI driver, or the application fetches them at startup. Access is granted to the service's workload identity per environment, so the staging service can never read a production secret. Reviewers see that orders in eu-west-1 uses the secret prod/orders/db, which is reviewable, without ever seeing the password.

4Validation So Bad Values Fail Fast

Reviews catch many mistakes but not all. So every service binds its configuration with @ConfigurationProperties and @Validated. A wrong type, a missing required value or an out-of-range number stops startup, the readiness probe never passes, and the rolling update halts on the first pod while the old pods keep serving. I would also validate earlier, in CI: render each overlay and start the application context with that configuration in a test, or check it against a JSON schema generated from Spring Boot's configuration metadata.

Java
@Validated
@ConfigurationProperties("orders.inventory")
record InventoryProperties(
@NotNull URI baseUrl,
@NotNull @DurationMax(seconds = 10) Duration timeout,
@Min(1) @Max(200) int maxConnections) {}
# overlay for ap-south-1 accidentally sets max-connections: 2000
# CI: rendering ap-south-1 ... context failed to start:
# orders.inventory.maxConnections must be less than or equal to 200

5Rolling Out Changes Progressively

A configuration change can break a service as surely as a code change, and it does so on every pod at once if pushed everywhere together. So configuration changes follow the same path as code: first to dev and staging, then to one production region, with a pause and an automated check of error rates and latency, then to the next region. Because each region's configuration is a separate rendered output in git, the GitOps controller can apply them in waves, and rolling back is a git revert.

Truly global settings, ones that cannot be changed region by region, are rare and get extra review, because they are exactly the changes that can cause a global outage.

6Seeing the Effective Configuration

During an incident, engineers need to know what the running service actually uses, which may differ from git if an environment variable or a command-line flag overrides it. Spring Boot Actuator's env and configprops endpoints show every property source and the bound configuration objects. Since Spring Boot 3.0 their values are masked by default, and management.endpoint.env.show-values (NEVER, ALWAYS or WHEN_AUTHORIZED) controls when they are revealed. I would expose them only on the management port, behind authentication, with values shown to authorised roles and keys that hold secrets always sanitised.

YAML
management:
server.port: 8081 # not exposed through the public ingress
endpoints.web.exposure.include: health,info,env,configprops
endpoint:
env.show-values: WHEN_AUTHORIZED
configprops.show-values: WHEN_AUTHORIZED
# GET /actuator/env/payments.timeout -> source: configtree:/etc/config/, value: 2s

7Follow-up questions

Why not use a central config server instead of git overlays?

A config server such as Spring Cloud Config can work, and it is often backed by git anyway. The advantage of keeping configuration next to the deployment manifests is that one commit describes the code version and its configuration together, one tool applies both, and progressive rollout and rollback work the same way for both. A config server adds a runtime dependency that every service needs at startup.

How do you stop drift between regions?

By keeping region overlays small and generated where possible, and by running a CI check that renders all regions and reports differences that are not on an allowed list, such as endpoints and capacity. A GitOps controller also detects and reverts manual changes in the cluster, so the cluster always matches git.

How do teams find which value is in effect for a region?

From the rendered output in CI, which shows the final configuration for every environment and region, and in a running service from the protected Actuator env endpoint, which also names the property source each value came from.

8Conclusion

In this answer, we designed configuration management for 200 Spring Boot services across four environments and three regions. Configuration lives in git next to the deployment manifests as a base plus small environment and region overlays, reviewed like code. Secrets are referenced by name from a secrets manager, services validate their settings with @ConfigurationProperties and @Validated, changes roll out region by region like code, and a protected Actuator endpoint shows the effective configuration with secrets masked.

What to say in the interviewAbout 80 seconds aloud

Open with

I would make git the single source of truth for configuration, kept next to each service's deployment manifests. Each service has a base with shared defaults, a small overlay per environment and an even smaller overlay per region, combined with Kustomize or Helm and applied by a GitOps controller like Argo CD.

Then, if they want more

Every change is a pull request reviewed by the owners, and CI renders all combinations so reviewers see the effective result. Secrets are never in git: the configuration only references them by name in Vault or the cloud secret manager, and the platform delivers them using the service's workload identity, so staging can never read production secrets.

Every service binds settings with @ConfigurationProperties and @Validated, so a missing or out-of-range value stops startup and the rolling update halts on the first pod. I would also start the context with each rendered overlay in CI to catch errors before deployment.

Configuration changes roll out like code: dev, staging, one production region, checks on error rate and latency, then the next regions, and rollback is a git revert. For troubleshooting, Actuator's env and configprops endpoints show the effective configuration and where each value came from, on the management port, behind authentication, with values masked except for authorised roles.

About this answer

Last updated
12 November 2026
Versions it names
Spring Boot 3.0
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.
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 "Design the configuration management approach for 200 Spring Boot services across four...": https://scrivio-interview-library.netlify.app/spring-boot/production-operations/6a2693063c/