Bird
Raised Fist0
HLDsystem_design~12 mins

Alerting thresholds in HLD - Architecture Diagram

Choose your learning style10 modes available
System Overview - Alerting thresholds

This system monitors application and infrastructure metrics to detect issues early. It uses alerting thresholds to trigger notifications when metrics cross defined limits, helping teams respond quickly to problems.

Architecture Diagram
User
  |
  v
Load Balancer
  |
  v
API Gateway
  |
  v
Metrics Collector ---> Cache
  |                    |
  v                    v
Alerting Engine <---- Database
  |
  v
Notification Service
  |
  v
User
Components
User
user
Receives alerts and configures thresholds
Load Balancer
load_balancer
Distributes incoming API requests evenly
API Gateway
api_gateway
Routes requests to Metrics Collector and Alerting Engine
Metrics Collector
service
Collects real-time metrics from monitored systems
Cache
cache
Stores recent metrics for fast access
Database
database
Stores historical metrics and alert configurations
Alerting Engine
service
Evaluates metrics against alerting thresholds
Notification Service
service
Sends alerts to users via email, SMS, or other channels
Request Flow - 9 Hops
User → Load Balancer
Load Balancer → API Gateway
API Gateway → Database
Metrics Collector → Cache
Metrics Collector → Database
Alerting Engine → Cache
Alerting Engine → Database
Alerting Engine → Notification Service
Notification Service → User
Failure Scenario
Component Fails:Database
Impact:New threshold configurations cannot be saved or read; historical metrics unavailable; alerting engine may use stale data
Mitigation:Use database replication and failover; alerting engine relies on cache for recent metrics and thresholds temporarily
Architecture Quiz - 3 Questions
Test your understanding
Which component stores recent metrics for fast access?
ADatabase
BAPI Gateway
CCache
DNotification Service
Design Principle
This architecture uses caching to reduce latency for metric reads and alert evaluation. It separates concerns by using dedicated services for metrics collection, alert evaluation, and notifications. Load balancing and API gateway ensure scalability and routing. The system handles failures by relying on cache and replication to maintain availability.

Practice

(1/5)
1. What is the primary purpose of setting alerting thresholds in system design?
easy
A. To delay notifications until issues become critical
B. To increase system resource usage
C. To reduce the number of system logs generated
D. To detect problems early before they impact users

Solution

  1. Step 1: Understand alerting thresholds role

    Alerting thresholds are set to monitor system metrics and detect anomalies early.
  2. Step 2: Identify the main goal

    The main goal is to catch issues before they affect users or cause downtime.
  3. Final Answer:

    To detect problems early before they impact users -> Option D
  4. Quick Check:

    Alerting thresholds = Early problem detection [OK]
Hint: Alerting thresholds catch issues early to protect users [OK]
Common Mistakes:
  • Thinking thresholds increase resource use
  • Believing thresholds delay notifications
  • Confusing thresholds with log management
2. Which of the following is a valid component of an alerting threshold configuration?
easy
A. User interface color scheme
B. Metric name to monitor
C. Database schema version
D. Network cable length

Solution

  1. Step 1: Identify components of alerting thresholds

    Alerting thresholds include metric names, threshold values, comparison operators, duration, severity, and notification methods.
  2. Step 2: Match valid component

    Metric name is essential to specify what to monitor.
  3. Final Answer:

    Metric name to monitor -> Option B
  4. Quick Check:

    Alert config includes metric name [OK]
Hint: Alert configs always include metric names [OK]
Common Mistakes:
  • Confusing UI settings with alert configs
  • Including unrelated hardware details
  • Mixing database schema with alert thresholds
3. Consider this alert rule: CPU usage > 80% for 5 minutes triggers WARNING. If CPU usage spikes to 85% for 3 minutes, then drops to 75%, what happens?
medium
A. WARNING alert triggers immediately at 85%
B. Alert triggers after CPU usage drops below 80%
C. No alert is triggered because duration is less than 5 minutes
D. System shuts down due to high CPU

Solution

  1. Step 1: Analyze alert condition

    The alert triggers only if CPU usage stays above 80% continuously for 5 minutes.
  2. Step 2: Evaluate given scenario

    CPU usage was above 80% for only 3 minutes, which is less than required 5 minutes, so no alert triggers.
  3. Final Answer:

    No alert is triggered because duration is less than 5 minutes -> Option C
  4. Quick Check:

    Duration condition not met = No alert [OK]
Hint: Duration must be met before alert triggers [OK]
Common Mistakes:
  • Ignoring duration and alerting immediately
  • Assuming alert triggers after usage drops
  • Confusing alert severity with system shutdown
4. You have an alert threshold: Memory usage >= 90% for 10 minutes triggers CRITICAL. The alert never fires even when memory usage is 95% for 15 minutes. What is the most likely issue?
medium
A. The monitoring system is not collecting memory metrics correctly
B. The comparison operator should be > instead of >=
C. The alert duration is set too low
D. The notification channel is misconfigured

Solution

  1. Step 1: Check alert condition correctness

    The condition uses >= 90% for 10 minutes, which is valid and should trigger if memory usage is 95% for 15 minutes.
  2. Step 2: Identify why alert doesn't fire

    If alert doesn't fire despite condition met, likely the monitoring system is not reporting memory usage correctly.
  3. Final Answer:

    The monitoring system is not collecting memory metrics correctly -> Option A
  4. Quick Check:

    Metrics missing = Alert won't trigger [OK]
Hint: Check metric collection if alerts don't trigger [OK]
Common Mistakes:
  • Changing valid comparison operators unnecessarily
  • Assuming duration is too low when it's sufficient
  • Blaming notification without checking metrics
5. You design an alerting system with thresholds for CPU, memory, and disk usage. To avoid alert fatigue, which strategy is best?
hard
A. Use multi-level severity with increasing thresholds and durations
B. Disable alerts during business hours
C. Send alerts for every metric spike immediately
D. Set thresholds too low to catch all minor issues

Solution

  1. Step 1: Understand alert fatigue

    Alert fatigue happens when too many alerts overwhelm responders, causing important alerts to be missed.
  2. Step 2: Choose strategy to reduce noise

    Using multi-level severity with increasing thresholds and durations helps prioritize critical alerts and reduce noise from minor fluctuations.
  3. Final Answer:

    Use multi-level severity with increasing thresholds and durations -> Option A
  4. Quick Check:

    Multi-level severity reduces alert fatigue [OK]
Hint: Use severity levels and durations to reduce alert noise [OK]
Common Mistakes:
  • Setting thresholds too low causing many false alerts
  • Alerting on every spike without filtering
  • Disabling alerts during critical times
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard