Route Monitoring Alerts to Pluggable Channels With the Observer Pattern

Last updated: November 29, 2026

Quick Overview

Design an alert router where email, pager, and chat channels can subscribe with a minimum severity, new channel types can be added without changing the router, and one failing channel does not block delivery to the others.

Google
Software Engineering Fundamentals
Software Engineer
Google
November 29, 2026
Software Engineer
Technical Screen
Software Engineering Fundamentals
Easy

0

0

0 solved


Design an alert router where email, pager, and chat channels can subscribe with a minimum severity, new channel types can be added without changing the router, and one failing channel does not block delivery to the others.

Google SRE culture centers on paging the right people for the right severity, so a monitoring flavored OOD question fits naturally in a technical screen. The interviewer checks interface design, open-closed extension, and failure isolation between observers.

What the Interviewer Expects
  • Defines a small channel interface that new channels implement
  • Keeps the router unaware of concrete channel classes
  • Filters by severity per subscription
  • Isolates exceptions from one channel
  • Iterates over a copy so unsubscribe during publish is safe
Key Topics to Cover
observer pattern
open-closed principle
interfaces
failure isolation
severity filtering
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How would you make delivery asynchronous with retries per channel?
  • How would you deduplicate a flapping alert that fires every second?
  • How would you add routing by service or team, not just severity?
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
  • Channels implement send(alert).
  • subscribe(channel, min_severity) and unsubscribe(channel).
  • publish(msg, severity) delivers to every channel whose threshold is met.
  • Adding a Chat channe...
High-Level Design

The router is the subject and channels are observers. Subscriptions store (min_level, channel). Severities map to integers so comparisons are simple. publish builds one alert object and loops over...


Submit Your Answer
Markdown supported