Design an Alarm Evaluation Service With Composite Alarms

Last updated: November 29, 2026

Quick Overview

Design a CloudWatch-style alarm service that evaluates millions of metric alarms every minute, supports composite alarms built from other alarms, and triggers notifications and automated actions on state changes.

Amazon
System Design
Software Engineer
Amazon
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design a CloudWatch-style alarm service that evaluates millions of metric alarms every minute, supports composite alarms built from other alarms, and triggers notifications and automated actions on state changes.

An AWS monitoring style question that focuses on the evaluation engine rather than metric ingestion. The interviewer checks scheduling of evaluations, the alarm state machine, handling missing data, and how composite alarms avoid evaluation storms.

What the Interviewer Expects
  • Define the alarm model: metric, statistic, period, threshold, N of M datapoints
  • Schedule evaluations efficiently and partition alarms across workers
  • Maintain a state machine (OK, ALARM, INSUFFICIENT_DATA) with transition events
  • Handle missing or late datapoints with explicit policies
  • Evaluate composite alarms from dependency changes, not polling
Key Topics to Cover
Alarm state machine
Evaluation scheduling
Missing data policy
Composite alarms
Partitioning
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you handle a metric whose datapoints arrive two minutes late?
  • How would you prevent a flapping alarm from paging every minute?
  • How do you detect a cycle in composite alarm definitions?
  • What happens if the metrics store is slow and evaluations fall behind?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: alarms on a metric with statistic (average, p99, sum), period (1 minute or more), threshold and "N out of M datapoints breaching." Composite alarms combine other alarms with AND, OR, N...

High-Level Design
  1. Alarm config store: alarm definitions, partitioned by alarm ID.
  2. Scheduler: assigns alarms to evaluator shards via consistent hashing; each shard owns a set of alarms and a timing wheel k...

Submit Your Answer
Markdown supported