PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Citadel

Design alerting for application-to-exchange mappings

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of real-time stream processing, alerting policy design, and distributed state coordination for application-to-exchange mappings, testing competencies in scalability, correctness under partitioning and duplication, and efficient aggregation of high-volume event streams.

  • medium
  • Citadel
  • System Design
  • Software Engineer

Design alerting for application-to-exchange mappings

Company: Citadel

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

## Problem: Alerting design for application→exchange mappings You are building a service that receives an ordered stream of mapping events: - `register(applicationId, exchangeId, timestamp)` Each **application** can map to multiple **exchanges**. ### Core requirement If an **exchange** is associated with “too many” applications (or too many new associations) you must **raise an alert**. ### What to design 1. **Define when to alert** - Pick a concrete policy, e.g.: - alert when the number of *distinct applications* mapped to an exchange exceeds a threshold `T`, OR - alert when the number of *new registrations* for an exchange within a sliding window `W` exceeds a rate threshold `R`. - Specify whether you want **one-time** alerts, **repeated** alerts, or alerts with **cooldown**. 2. **Implement the detection logic** - Explain data structures/algorithms to support the policy efficiently. - A common follow-up is to use a **sliding window**. 3. **Distributed / parallel follow-up** - Assume events are processed in parallel across multiple workers. - Describe how to keep alert decisions correct when events may be partitioned, arrive slightly out of order, or be duplicated. ### Constraints (you may assume) - High event rate (e.g., tens of thousands/sec). - Many exchanges. - You need near-real-time alerting (seconds).

Quick Answer: This question evaluates understanding of real-time stream processing, alerting policy design, and distributed state coordination for application-to-exchange mappings, testing competencies in scalability, correctness under partitioning and duplication, and efficient aggregation of high-volume event streams.

Related Interview Questions

  • Design a low-latency trading platform - Citadel (hard)
  • Design stock price time-series store and query - Citadel (easy)
  • Discuss queues, NoSQL, and concurrency - Citadel (hard)
  • Design a low-latency trading system - Citadel (hard)
Citadel logo
Citadel
Feb 11, 2026, 12:00 AM
Software Engineer
Onsite
System Design
9
0

Problem: Alerting design for application→exchange mappings

You are building a service that receives an ordered stream of mapping events:

  • register(applicationId, exchangeId, timestamp)

Each application can map to multiple exchanges.

Core requirement

If an exchange is associated with “too many” applications (or too many new associations) you must raise an alert.

What to design

  1. Define when to alert
    • Pick a concrete policy, e.g.:
      • alert when the number of distinct applications mapped to an exchange exceeds a threshold T , OR
      • alert when the number of new registrations for an exchange within a sliding window W exceeds a rate threshold R .
    • Specify whether you want one-time alerts, repeated alerts, or alerts with cooldown .
  2. Implement the detection logic
    • Explain data structures/algorithms to support the policy efficiently.
    • A common follow-up is to use a sliding window .
  3. Distributed / parallel follow-up
    • Assume events are processed in parallel across multiple workers.
    • Describe how to keep alert decisions correct when events may be partitioned, arrive slightly out of order, or be duplicated.

Constraints (you may assume)

  • High event rate (e.g., tens of thousands/sec).
  • Many exchanges.
  • You need near-real-time alerting (seconds).

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Citadel•More Software Engineer•Citadel Software Engineer•Citadel System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.