You need to design a system that allows microservices to update their configuration dynamically without restarting. Which architectural component is essential to achieve this?
Think about a component that can serve updated settings to many services without restarting them.
A centralized configuration service allows microservices to fetch updated configurations dynamically. Polling or push mechanisms enable updates without restarts. Embedding configs or hardcoding them prevents dynamic updates.
You have 1000 microservice instances needing configuration updates simultaneously. What is the best approach to efficiently propagate updates?
Consider a method that avoids thousands of independent requests at once.
A publish-subscribe system efficiently pushes updates to all instances simultaneously, reducing load and latency. Polling causes heavy load, restarts cause downtime, and manual updates are not scalable.
Which statement best describes a tradeoff between push and pull models for dynamic configuration updates in microservices?
Think about how updates reach clients and the connection types involved.
Push models send updates immediately but need persistent connections like websockets. Pull models have clients ask periodically, increasing latency but simplifying client logic. Bandwidth and consistency depend on implementation.
Which component is critical to ensure all microservices see a consistent configuration version during dynamic updates?
Think about how to prevent microservices from using mixed or partial configurations.
Versioning and atomic updates ensure microservices switch to a new configuration simultaneously, avoiding inconsistency. Load balancers, caches, and logs do not guarantee configuration consistency.
You have 10,000 microservice instances. Each configuration update is 50 KB. Updates occur once every 10 minutes. Estimate the minimum network bandwidth needed to propagate updates to all instances within 1 minute.
Calculate total data size and divide by propagation time, then convert to Mbps.
Total data = 10,000 instances * 50 KB = 500,000 KB = 500 MB. To send in 1 minute (60 seconds): 500 MB / 60 s ≈ 8.33 MB/s. Convert to Mbps: 8.33 MB/s * 8 = 66.64 Mbps. Considering overhead and safety margin, ~83 Mbps is reasonable.