| Users / Services | 100 | 10,000 | 1,000,000 | 100,000,000 |
|---|---|---|---|---|
| Config Update Frequency | Low (few updates/day) | Moderate (multiple updates/hour) | High (frequent updates/minute) | Very High (continuous streaming updates) |
| Number of Microservices | 10-50 | 500-1000 | 10,000+ | 100,000+ |
| Config Store Load | Light read/write load | Moderate read-heavy load | High read/write load, possible write bursts | Extreme load, requires partitioning and caching |
| Update Propagation | Simple push or pull | Push with batching or pub/sub | Event-driven pub/sub with filtering | Hierarchical pub/sub with regional caches |
| Latency Requirements | Seconds to minutes | Seconds | Sub-second | Milliseconds |
| Monitoring & Auditing | Basic logs | Centralized logging and alerts | Real-time monitoring and anomaly detection | Automated compliance and rollback |
Dynamic configuration updates in Microservices - Scalability & System Analysis
The configuration store becomes the first bottleneck as the number of microservices and update frequency grow. It struggles to handle high read and write loads simultaneously, especially when many services request updates or when updates must propagate quickly.
- Caching: Use local caches in microservices to reduce read load on the config store.
- Publish/Subscribe Systems: Implement event-driven update propagation to push changes efficiently.
- Horizontal Scaling: Scale config store horizontally with sharding or clustering to handle load.
- Versioning and Delta Updates: Send only changes, not full configs, to reduce bandwidth and processing.
- Hierarchical Distribution: Use regional caches or proxies to distribute updates closer to services.
- Rate Limiting and Batching: Control update bursts and batch requests to smooth load.
Assuming 10,000 microservices, each checking config updates every 10 seconds:
- Requests per second: 10,000 services / 10 seconds = 1,000 QPS read load on config store.
- Update writes: If 1% of configs update per minute, 100 writes/minute (~1.7 writes/sec).
- Bandwidth: If each config update is 10 KB, 1,000 QPS reads = ~10 MB/s read bandwidth.
- Storage: Config store must keep versions and history; estimate 1 GB per month for metadata and configs.
At this scale, a single config store instance may handle load but needs caching and pub/sub to reduce pressure.
Start by defining the scale and update frequency. Identify the config store as the bottleneck early. Discuss caching and event-driven update propagation. Explain how to handle consistency and latency trade-offs. Mention monitoring and rollback strategies for safe updates.
Your database handles 1000 QPS. Traffic grows 10x. What do you do first?
Answer: Add read replicas and implement caching to reduce direct database load before scaling writes or sharding.