Skip to interview prep
Apexed

58. Why validate configuration when a service starts rather than when a request first needs it?

EasyTesting & engineering practice

Technical
Show model answer

Startup validation catches missing, malformed or incompatible configuration before traffic reaches a partly working service. Validate required values and relationships, such as a maximum that must exceed a minimum.

Report the setting name and a useful correction without printing secrets. Optional features can remain explicitly unavailable when configuration is absent, provided the rest of the service has a clear, tested operating mode.

What interviewers listen for

  • Fail early for required configuration
  • Redact sensitive values
  • Explicit optional-feature state
Why validate configuration when a service starts rather than when a request first needs it — Software engineering interview question — Apexed