0
0
Microservicessystem_design~12 mins

Config server pattern in Microservices - Architecture Diagram

Choose your learning style9 modes available
System Overview - Config server pattern

The Config Server Pattern centralizes configuration management for multiple microservices. It provides a single source of truth for configuration data, enabling dynamic updates and consistent settings across services.

Key requirements include scalability to support many services, secure access to configurations, and the ability to update configurations without restarting services.

Architecture Diagram
          +------------+
          |   Client   |
          +-----+------+ 
                |
                v
       +-----------------+
       | Load Balancer   |
       +--------+--------+
                |
                v
       +-----------------+
       | Config Server   |
       +--------+--------+
                |
       +--------+--------+
       |                 |
+------+-----+     +-----+-------+
| Config DB  |     | Cache Layer |
+------------+     +-------------+
Components
Client
service
Microservice requesting configuration data
Load Balancer
load_balancer
Distributes client requests to Config Server instances
Config Server
service
Central service providing configuration data to clients
Config DB
database
Stores all configuration data centrally
Cache Layer
cache
Speeds up configuration retrieval by caching frequent requests
Request Flow - 8 Hops
ClientLoad Balancer
Load BalancerConfig Server
Config ServerCache Layer
Cache LayerConfig Server
Config ServerConfig DB
Config DBConfig Server
Config ServerCache Layer
Config ServerClient
Failure Scenario
Component Fails:Config DB
Impact:New configuration updates cannot be retrieved; cache serves stale data; writes to config fail
Mitigation:Use database replication for high availability; rely on cache for read requests; alert admins for DB recovery
Architecture Quiz - 3 Questions
Test your understanding
Which component handles distributing client requests to multiple Config Server instances?
AConfig DB
BCache Layer
CLoad Balancer
DClient
Design Principle
This architecture centralizes configuration management to ensure consistency and ease of updates across microservices. Using a cache layer reduces latency and database load, while a load balancer ensures scalability and availability of the Config Server.