Design a scalable messenger
Company: Meta
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design a real-time messenger supporting 1:1 and group chats. Clarify functional and nonfunctional requirements; design APIs and data models; choose storage and messaging protocols; ensure message ordering, delivery guarantees, and read receipts; handle user presence, push notifications, media attachments, and search; address scalability (sharding, caching, queues), consistency across devices, multi-region deployment, failover, and offline/slow network scenarios; discuss security (authentication, encryption, abuse/spam controls), observability, and cost trade-offs.
Quick Answer: This question evaluates system design and architectural competencies for building scalable, low-latency real-time messaging platforms, testing knowledge of distributed systems, data consistency and ordering, messaging protocols, storage choices, security, and operational concerns at both conceptual and practical application levels.