In a notification system, users can choose how they want to receive notifications (email, SMS, push). Which component is best suited to manage these preferences?
Think about where user choices are stored and accessed before sending notifications.
The User Preference Service stores and manages user notification settings, ensuring notifications are sent according to user choices.
You need to design a notification system that can send push notifications to 10 million users simultaneously. Which approach best supports this scale?
Consider how to handle large volumes efficiently and avoid bottlenecks.
A distributed message queue with multiple workers allows parallel processing and scales horizontally to handle millions of notifications efficiently.
Which is a key tradeoff when choosing between push and pull notification delivery models?
Think about who initiates the communication and resource usage on client and server.
Push notifications are sent by the server, which can reduce server polling but may increase client battery use. Pull requires clients to poll, increasing server load but saving client battery.
In a distributed notification system, what is the best way to ensure notifications are delivered to a user in the order they were generated?
Think about how message queues can preserve order per user.
Using a single partitioned queue per user ensures messages are processed in the order they arrive, preserving notification order.
Your notification system logs every notification sent. Each log entry is 1 KB. If you send 1 million notifications per day and keep logs for 90 days, how much storage do you need?
Calculate total entries times size per entry.
1 million notifications/day * 90 days = 90 million entries. 90 million * 1 KB = 90 million KB = 90 GB.
