← Meta Interview Insights

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

Senior
Jun 2026

Summary

Meta system design round for a software engineer role. The problem was a real-time chat system, basically a WhatsApp clone, and it covered more ground than I expected in the time given.

Questions Asked (4)

Q1

Design a chat system similar to WhatsApp or Messenger, supporting both 1:1 and group conversations.

System DesignTechnical Trade-offsData Modeling
Author's notes

I started with the connection layer and spent probably too long on WebSocket vs polling before getting nudged toward the actual storage design.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., 1B users, message delivery guarantees, group size limits), then design the core architecture focusing on message flow, storage, and real-time delivery. Walk through the design from client to backend, highlighting trade-offs in data modeling, consistency, and scalability.

Pro tip: Emphasize the separation of message persistence from real-time delivery, and discuss how to handle offline users and message ordering—these are critical for chat systems and show you understand real-world constraints.

1. Clarify Requirements and Scale

Ask about functional requirements (1:1 and group chat, message types, online/offline status) and non-functional requirements (latency, availability, consistency). Estimate scale: number of users, messages per day, group size limits.

2. High-Level Architecture

Outline the main components: clients, API gateway, chat servers (WebSocket), message queue, storage (message DB, user DB), and notification service. Explain how messages flow from sender to receiver.

3. Data Modeling and Storage

Design schemas for users, conversations, messages, and group memberships. Discuss choices like SQL vs NoSQL, sharding by conversation ID, and indexing for efficient retrieval.

4. Real-Time Delivery and Presence

Detail how to maintain WebSocket connections, route messages to online users, and handle offline users (push notifications, message queuing). Discuss presence service and heartbeat mechanisms.

5. Scalability and Trade-offs

Address scaling: partitioning, replication, load balancing, and handling failures. Discuss trade-offs like consistency vs availability, message ordering guarantees, and group message fan-out strategies.

Key Points to Mention

  • Message ordering and delivery guarantees (at-least-once, exactly-once) and how to achieve them with sequence numbers or timestamps.
  • Group chat fan-out: write to each member's inbox vs. pull model, and trade-offs in latency and storage.
  • Presence and online status: using heartbeat and pub/sub to track user connectivity.
  • Storage choices: using a NoSQL database like Cassandra for messages with time-series partitioning, and a relational DB for user data.
  • Handling offline users: message queuing, push notifications, and sync on reconnect.
  • End-to-end encryption considerations and their impact on server-side features.

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

Q2

How would you handle message delivery states like sent, delivered, and read across clients?

System DesignTechnical Trade-offs
Author's notes

This came as a follow-up and I was a bit flat on it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a state machine for message lifecycle with server as source of truth and client-side reconciliation. Discuss trade-offs between push/pull, idempotency, ordering, and offline handling, and how to scale with sharding and caching.

Pro tip: Emphasize that 'read' receipts are inherently racy and privacy-sensitive; propose per-conversation monotonic sequence numbers and explicit user consent to avoid incorrect states and regulatory issues.

1. Clarify requirements and scope

Ask about scale (DAU, messages/sec), consistency needs (per-conversation ordering vs global), client types (mobile/web), and privacy constraints for read receipts.

2. Define message lifecycle and state machine

Model states (sent, delivered, read) with transitions triggered by server events; ensure idempotency and monotonic progression using per-message versioning.

3. Design server as source of truth

Persist message state in a durable store (e.g., sharded DB) with per-conversation sequence numbers; use a message queue for async fan-out and idempotent updates.

4. Client synchronization and reconciliation

Use push (WebSocket/APNs/FCM) for real-time updates with fallback to pull on reconnect; clients reconcile via sequence numbers and handle offline queuing and deduplication.

5. Address trade-offs and scale

Discuss trade-offs: push vs pull latency/cost, strong vs eventual consistency, read receipt privacy, and scaling via sharding by conversation ID and caching hot conversations.

Key Points to Mention

  • Server as single source of truth with per-conversation monotonic sequence numbers for ordering and idempotency
  • Push notifications (WebSocket/APNs/FCM) with pull-based sync on reconnect and offline message queuing
  • Idempotent state transitions and deduplication to handle retries and out-of-order events
  • Privacy and user consent for read receipts, with per-conversation opt-in and batching to reduce noise
  • Sharding by conversation ID, caching hot conversations, and async fan-out via message queues for scale
  • Trade-offs between strong vs eventual consistency, latency vs cost, and battery impact on mobile clients

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

Q3

How do you ensure messages within a conversation are ordered correctly, especially when clients send messages at nearly the same time?

System DesignAlgorithms & Data Structures
Author's notes

Honestly the question I felt best about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what level of ordering is needed (per-conversation vs global), and what consistency guarantees are acceptable. Then propose a solution using a sequencer service or logical clocks to assign order, and discuss trade-offs like latency, scalability, and fault tolerance.

Pro tip: Mention that perfect global ordering is often unnecessary; per-conversation ordering with idempotency and conflict resolution is usually sufficient and more scalable. This shows you understand real-world constraints at Meta's scale.

1. Clarify requirements and constraints

Ask about the expected scale, latency requirements, and whether ordering is needed per conversation or globally. Confirm if clients can tolerate slight delays or reordering.

2. Choose an ordering mechanism

Propose using a centralized sequencer (e.g., a service that assigns monotonically increasing sequence numbers per conversation) or a distributed approach like logical clocks (Lamport timestamps) with tie-breaking.

3. Handle concurrent messages and idempotency

Discuss how to detect and resolve conflicts when messages arrive nearly simultaneously, using client-generated unique IDs and server-side deduplication. Ensure messages are idempotent to avoid duplicates.

4. Address scalability and fault tolerance

Explain how to partition conversations across sequencers (e.g., by conversation ID) to scale horizontally, and how to handle sequencer failures with replication and failover.

5. Discuss trade-offs and alternatives

Compare centralized sequencing (strong ordering, higher latency) vs. distributed logical clocks (lower latency, potential conflicts). Mention that eventual consistency with client-side ordering may suffice for some use cases.

Key Points to Mention

  • Per-conversation ordering vs global ordering and why per-conversation is often sufficient
  • Use of sequence numbers assigned by a centralized service or logical clocks (Lamport/vector clocks)
  • Idempotency and deduplication using client-generated message IDs
  • Partitioning by conversation ID for scalability
  • Trade-offs between strong consistency and latency/availability
  • Fault tolerance via replication and consensus (e.g., Raft) for the sequencer

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

Q4

How would you sync message history across multiple devices for the same user?

System DesignData Modeling
Author's notes

Blanked for a second here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: what devices, sync latency expectations, message types, and consistency needs. Then propose a design using a central message store with per-device cursors and a sync protocol that handles incremental updates, conflicts, and offline scenarios.

Pro tip: Emphasize idempotency and monotonic versioning (e.g., per-conversation sequence numbers) to make sync robust and avoid duplicates; also discuss how to handle device-specific state like read receipts without overcomplicating the core message sync.

1. Clarify requirements and scope

Ask about number of devices, expected sync latency, message types (text, media), offline support, and consistency guarantees (e.g., eventual vs strong). This shows you avoid assumptions and tailor the design.

2. Define data model and storage

Propose a central message store (e.g., per-conversation log with sequence numbers) and per-device sync state (last synced sequence). Discuss how to handle message ordering and deduplication.

3. Design sync protocol

Outline a pull-based or push-based sync mechanism: devices request messages after their last cursor, server returns incremental updates. Include handling of offline devices, retries, and idempotent writes.

4. Address conflicts and consistency

Explain how to resolve conflicts (e.g., server-authoritative ordering, client-generated IDs for dedup) and how to handle read state, deletions, and edits across devices.

5. Discuss scalability and trade-offs

Mention partitioning by user/conversation, caching, and trade-offs between latency and consistency. Also touch on security (auth per device) and monitoring.

Key Points to Mention

  • Per-device sync cursor (e.g., last seen sequence number) to enable incremental sync
  • Idempotent message writes with client-generated IDs to avoid duplicates
  • Server-authoritative ordering with per-conversation sequence numbers
  • Handling offline devices: queue updates and sync on reconnect
  • Conflict resolution for edits/deletes and read receipts across devices
  • Scalability considerations: partitioning, caching, and push notifications for low latency

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