← Meta Interview Insights

Meta·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026

Summary

Meta system design round focused entirely on one big question about live comments at massive scale. The depth they expected was pretty intense, covering everything from connection protocols to back-pressure handling.

Questions Asked (1)

Q1

Design a live comments system for a high-traffic post (think a celebrity's page) where new comments need to appear in near-real-time for millions of concurrent viewers. Walk through the client connection model, pub/sub fan-out, comment ordering and deduplication, the write and read paths, back-pressure handling, and how you'd scale to millions of simultaneous viewers on a single post.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This is basically one giant question with like seven sub-questions baked in.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a hybrid push-pull architecture using WebSockets for real-time delivery and a pub/sub system for fan-out. Walk through the write path (comment ingestion, ordering, deduplication) and read path (client connection, message delivery, back-pressure), emphasizing trade-offs and scalability to millions of viewers.

Pro tip: Demonstrate awareness of the 'thundering herd' problem and propose solutions like sharded pub/sub channels or edge caching to avoid overwhelming the origin. Also, mention the importance of idempotency and client-side deduplication to handle at-least-once delivery.

1. Clarify Requirements and Scale

Ask questions to understand expected read/write ratio, latency requirements, ordering guarantees, and scale (e.g., millions of concurrent viewers, thousands of comments per second).

2. Design Client Connection Model

Choose WebSockets for bidirectional real-time communication, with fallback to long-polling. Discuss connection management, heartbeats, and reconnection strategies.

3. Design Pub/Sub Fan-out and Ordering

Use a distributed pub/sub system (e.g., Kafka, Redis Pub/Sub) to fan out comments to all subscribers. Ensure ordering via per-post sequence numbers and deduplication using unique comment IDs.

4. Define Write and Read Paths

Write path: ingest comments via API, validate, assign sequence numbers, persist to database, and publish to pub/sub. Read path: clients subscribe to post-specific channels, receive comments via WebSocket, and apply back-pressure if needed.

5. Address Scalability and Back-pressure

Scale horizontally with sharded pub/sub channels, use edge servers/CDNs for fan-out, implement back-pressure by dropping or batching messages, and monitor system health.

Key Points to Mention

  • WebSocket vs. long-polling trade-offs for real-time delivery
  • Pub/sub fan-out using Kafka or Redis with sharding to handle high throughput
  • Ordering via per-post sequence numbers and deduplication using comment IDs
  • Back-pressure handling: client-side buffering, server-side rate limiting, and message dropping
  • Scalability techniques: edge computing, CDN integration, and horizontal scaling of WebSocket servers
  • Idempotency and at-least-once delivery semantics to ensure reliability

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.