0
0
HLDsystem_design~12 mins

Health checks in HLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Health checks

This system monitors the health of various services and components in a distributed application. It regularly checks if services are running properly and reports their status to ensure reliability and quick detection of failures.

Architecture Diagram
          +-------------+          +----------------+
          |             |          |                |
User --->| Load        |--------->| API Gateway    |
          | Balancer   |          |                |
          +-------------+          +----------------+
                                         |
                                         v
                                +----------------+
                                | Health Check   |
                                | Service       |
                                +----------------+
                                         |
                  +----------------------+---------------------+
                  |                                            |
          +---------------+                            +----------------+
          | Application   |                            | Monitoring     |
          | Service      |                            | Dashboard      |
          +---------------+                            +----------------+
                  |
                  v
          +---------------+
          | Database      |
          +---------------+
Components
User
user
Initiates requests to the system
Load Balancer
load_balancer
Distributes incoming requests evenly to API Gateway instances
API Gateway
api_gateway
Receives client requests and routes them to appropriate services
Health Check Service
service
Periodically checks the health status of application services
Application Service
service
Main business logic service whose health is monitored
Database
database
Stores application data and health check results
Monitoring Dashboard
monitoring
Displays health status and alerts for system operators
Request Flow - 10 Hops
UserLoad Balancer
Load BalancerAPI Gateway
API GatewayHealth Check Service
Health Check ServiceApplication Service
Application ServiceHealth Check Service
Health Check ServiceDatabase
Health Check ServiceAPI Gateway
API GatewayLoad Balancer
Load BalancerUser
Monitoring DashboardDatabase
Failure Scenario
Component Fails:Health Check Service
Impact:Health status updates stop; monitoring dashboard shows stale or no data; system operators unaware of service failures
Mitigation:Use redundant health check service instances with failover; alert operators on health check service failure; fallback to cached health data
Architecture Quiz - 3 Questions
Test your understanding
Which component is responsible for distributing incoming user requests?
AAPI Gateway
BLoad Balancer
CHealth Check Service
DDatabase
Design Principle
This architecture uses a dedicated Health Check Service to monitor application health, separating monitoring logic from business logic. It ensures reliability by storing health data in a database and providing a monitoring dashboard for operators. Load balancers and API gateways manage traffic flow and isolate components, improving scalability and fault tolerance.