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.
You are building a service that receives an ordered stream of mapping events:
register(applicationId, exchangeId, timestamp)
Each application can map to multiple exchanges.
If an exchange is associated with “too many” applications (or too many new associations) you must raise an alert.
T
, OR
W
exceeds a rate threshold
R
.