Architecture
This document describes the architecture of the Timer service.
Goals
- Precise scheduling with low drift
- Scalable timers for millions of users
- Fault-tolerant execution
High-Level Diagram
Components
Scheduler: manages timer creation, updates, cancellationsQueue: durable timer events (e.g., RabbitMQ/Kafka)Workers: consume due timers and execute callbacks/webhooksDB: persistence, deduplication, idempotency keysAPI: create/list/cancel timers, WebSocket for real-time status
Non-Functional
- At-least-once execution with idempotent callbacks
- Dead-letter queue for failures
- Observability with metrics on due vs executed