You need to design a system that sends notifications to all parties involved in a transaction. The system must handle millions of notifications per day and ensure delivery even if some parties are temporarily offline.
Which architectural component is essential to ensure reliable delivery and scalability?
Think about how to handle temporary failures and high volume.
A message queue helps buffer notifications and retry sending if a party is offline, ensuring reliability and scalability.
Your notification system must support 10 million users, each receiving an average of 5 notifications per day. Estimate the number of notifications your system must handle per second.
Calculate total notifications per day and divide by seconds in a day.
10 million users * 5 notifications = 50 million notifications per day. 50 million / 86400 seconds ≈ 578 notifications per second, rounded to 600.
For notifying all parties, you can either push notifications immediately or let parties pull notifications when they check. What is a key tradeoff of using a push model?
Consider resource usage and immediacy of updates.
Push notifications deliver updates instantly but need servers to keep connections open, increasing resource use.
In a notification system, which component should handle retrying failed notification deliveries to ensure eventual consistency?
Think about where failed messages can be stored and retried automatically.
Message queues with dead-letter queues can hold failed messages and retry delivery, ensuring no notifications are lost.
You must guarantee that all parties receive notifications in the exact order events occurred, even under high load and failures. Which design approach best supports this requirement?
Consider how to keep order while scaling and handling retries.
Partitioned queues with ordering keys ensure messages for the same key are processed in order. Idempotent consumers prevent duplicates.