Bird
0
0

A microservice uses environment variables for config but still reads old values after update. What should be checked?

medium📝 Analysis Q7 of 15
Microservices - Configuration and Secrets Management
A microservice uses environment variables for config but still reads old values after update. What should be checked?
AIf the config file exists on disk
BWhether the service was restarted after env var change
CIf config is hardcoded inside the service
DIf the service uses a config server
Step-by-Step Solution
Solution:
  1. Step 1: Understand env var update behavior

    Environment variables are read at process start; changes require restart to take effect.
  2. Step 2: Identify likely cause

    If service not restarted, it keeps old env var values in memory.
  3. Final Answer:

    Whether the service was restarted after env var change -> Option B
  4. Quick Check:

    Env var changes need restart to apply [OK]
Quick Trick: Restart service after env var changes [OK]
Common Mistakes:
  • Assuming env vars update live without restart
  • Confusing config file presence with env vars
  • Ignoring service restart requirement

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes