Bird
0
0

Which of the following is the correct way to externalize configuration in a microservice?

easy📝 Conceptual Q12 of 15
Microservices - Configuration and Secrets Management
Which of the following is the correct way to externalize configuration in a microservice?
AUse environment variables or config files outside the codebase.
BHardcode all settings inside the service code.
CStore configuration only in the database schema.
DEmbed configuration values in compiled binaries.
Step-by-Step Solution
Solution:
  1. Step 1: Identify common external config methods

    Environment variables and external config files are standard ways to keep config outside code.
  2. Step 2: Eliminate incorrect options

    Hardcoding or embedding config in binaries prevents easy updates; database schema is not typical for config files.
  3. Final Answer:

    Use environment variables or config files outside the codebase. -> Option A
  4. Quick Check:

    External config = env vars or files [OK]
Quick Trick: Env vars and files are external config basics [OK]
Common Mistakes:
  • Confusing database schema with config storage
  • Thinking config must be inside code
  • Ignoring environment variables as config

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes