Bird
0
0

Given a microservice that reads config from a file at startup, what happens if the config file is updated while the service is running?

medium📝 Analysis Q4 of 15
Microservices - Configuration and Secrets Management
Given a microservice that reads config from a file at startup, what happens if the config file is updated while the service is running?
AThe service continues using old config until restarted
BThe service automatically reloads new config immediately
CThe service crashes due to config change
DThe service ignores the config file completely
Step-by-Step Solution
Solution:
  1. Step 1: Understand config loading behavior

    Most services load config once at startup and keep it in memory.
  2. Step 2: Analyze effect of file update at runtime

    Updating the config file while running does not affect the service until it reloads or restarts.
  3. Final Answer:

    The service continues using old config until restarted -> Option A
  4. Quick Check:

    Config reload = Requires restart unless hot reload implemented [OK]
Quick Trick: Config file changes need restart to take effect unless hot reload [OK]
Common Mistakes:
  • Assuming config reloads automatically
  • Thinking service crashes on config change
  • Ignoring config file usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes