← Meta Interview Insights

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

Senior
Apr 2026

Summary

Meta system design round with two back-to-back prompts, both pretty meaty. No fluff questions, just two hours of whiteboarding distributed systems under pressure.

Questions Asked (2)

Q1

Design a distributed, durable queue or event-streaming service that supports high-throughput publishing, consumer groups with offset tracking, message replay within a retention window, partition-level ordering, replication, and failure recovery.

System DesignTechnical Trade-offsData Modeling
Author's notes

This one I felt okay about until the backpressure piece came up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (throughput, retention, ordering, consumer semantics), then sketch a high-level architecture with partitions, replication, and consumer groups. Dive into data models for offsets and storage, and discuss trade-offs around consistency, durability, and failure recovery.

Pro tip: Emphasize how you would handle partition rebalancing and consumer group coordination without downtime, as this is a common pain point in production systems. Also, mention how you would monitor lag and ensure exactly-once semantics if needed.

1. Clarify Requirements and Scale

Ask about expected throughput, message size, retention period, ordering guarantees, and consumer semantics (at-least-once, exactly-once). Establish non-functional requirements like latency, durability, and availability.

2. High-Level Architecture

Propose a partitioned log-based system with brokers, producers, and consumers. Explain how partitions enable parallelism and ordering, and how replication ensures durability.

3. Data Model and Storage

Detail how messages are stored (e.g., append-only log segments), how offsets are tracked per consumer group, and how retention is enforced (time or size-based). Discuss indexing for efficient replay.

4. Consumer Groups and Offset Management

Describe how consumers coordinate within a group (e.g., via a coordinator), how offsets are committed, and how rebalancing works. Mention strategies for avoiding duplicate processing.

5. Failure Recovery and Trade-offs

Explain replication (leader-follower), handling broker failures, and ensuring data durability. Discuss trade-offs between consistency, availability, and latency (e.g., acks=all vs acks=1).

Key Points to Mention

  • Partitioning strategy for scalability and ordering guarantees
  • Replication factor and ISR (in-sync replicas) for durability
  • Offset tracking and commit strategies (auto vs manual)
  • Consumer group rebalancing and coordination
  • Retention policies and log compaction for replay
  • Trade-offs: latency vs durability, exactly-once semantics, and backpressure

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

Q2

Design the request and matching flow for a ride-hailing service where a rider sees multiple interested drivers, picks one themselves, and the chosen driver must then confirm before the trip is assigned. Handle cancellations, timeouts, race conditions, and duplicate requests.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

The rider-selects-driver twist genuinely surprised me.

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 the trip lifecycle with explicit states (e.g., REQUESTED, DRIVERS_NOTIFIED, RIDER_SELECTED, DRIVER_CONFIRMING, ASSIGNED, CANCELLED, TIMED_OUT). Propose a distributed architecture using a matching service, notification service, and a strongly consistent datastore with optimistic concurrency control to handle race conditions and duplicate requests.

Pro tip: Emphasize idempotency and exactly-once semantics for critical operations (e.g., driver confirmation) using idempotency keys and conditional writes, and discuss how to handle partial failures with compensating actions or retries.

1. Clarify Requirements and Scale

Ask about expected QPS, number of drivers/rider, geographic distribution, and consistency requirements. Define functional requirements: rider sees multiple drivers, picks one, driver confirms, trip assigned; handle cancellations, timeouts, race conditions, duplicates.

2. Design Trip State Machine and Data Model

Define states and transitions for a trip request (e.g., REQUESTED, DRIVERS_NOTIFIED, RIDER_SELECTED, DRIVER_CONFIRMING, ASSIGNED, CANCELLED, TIMED_OUT). Specify a data model with trip ID, rider ID, selected driver ID, status, timestamps, and version for optimistic locking.

3. Architect the Matching and Notification Flow

Design services: Matching Service to find drivers and notify them, Rider Service to present options and accept selection, Driver Service to handle confirmation. Use a message queue for asynchronous notifications and a consistent datastore for trip state.

4. Handle Concurrency, Timeouts, and Cancellations

Use optimistic concurrency control (version checks) or distributed locks to prevent race conditions. Implement timeouts with TTLs or scheduled jobs to expire requests. Handle cancellations by allowing state transitions only from valid states and notifying all parties.

5. Ensure Idempotency and Duplicate Handling

Assign idempotency keys to rider selection and driver confirmation requests. Use conditional writes (e.g., 'update if status = X') to ensure duplicate requests don't cause multiple assignments. Log and deduplicate events.

Key Points to Mention

  • State machine with explicit states and valid transitions to avoid invalid assignments.
  • Optimistic concurrency control (versioning) or distributed locks to handle race conditions between rider selection and driver confirmation.
  • Idempotency keys and conditional writes to handle duplicate requests and ensure exactly-once semantics.
  • Timeout mechanisms (TTL, scheduled jobs) to expire unconfirmed selections and free up drivers.
  • Cancellation handling: allow cancellation from certain states, notify all parties, and update driver availability.
  • Scalability considerations: sharding by geographic region, using a message queue for notifications, and caching driver availability.

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