Design a Notification System
Design a scalable notification system that supports both individual and bulk notifications to multiple users. The system should handle different types of notifications including critical time-sensitive messages (like 1:1 chat) and promotional content (like system-generated recommendations) with appropriate delivery mechanisms. Consider scalability requirements (up to 1M notifications/second), expiration logic for different notification types, and the typical 80/20 distribution between critical and promotional notifications where promotional messages can target thousands of users simultaneously.
Treine requisitos, arquitetura e decisões de escala.