← Meta Interview Insights

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

Senior
May 2026

Summary

System design round at Meta for a software engineer role. The whole thing was a deep dive into designing a food/grocery delivery marketplace, and they really pushed on the specifics rather than letting you stay high-level.

Questions Asked (5)

Q1

Design an on-demand local delivery marketplace that supports customers browsing merchants, placing orders, merchants preparing orders, couriers accepting and completing deliveries, and real-time tracking with notifications.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

Big open-ended prompt to start.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then sketch a high-level architecture with core services and data flows. Dive into key components like real-time tracking, matching, and notifications, discussing trade-offs and scaling strategies. Conclude by addressing bottlenecks and potential improvements.

Pro tip: Emphasize idempotency and exactly-once processing for order and delivery state transitions, as duplicates or lost updates can cause real-world issues like double charges or missed deliveries.

1. Clarify Requirements

Ask questions to understand scope: expected scale (users, orders per day), latency requirements, consistency needs, and whether payments are in scope. Define core entities: customers, merchants, couriers, orders, deliveries.

2. High-Level Design

Outline main services: API gateway, user/merchant/courier services, order service, matching service, tracking service, notification service. Choose a database (e.g., SQL for transactions, NoSQL for location data) and message queue for async communication.

3. Deep Dive into Critical Flows

Detail order placement (inventory check, payment), courier matching (geo-based, load balancing), real-time tracking (WebSocket, pub/sub), and notifications (push, SMS). Discuss state machines for order and delivery statuses.

4. Address Scalability and Reliability

Explain how to scale each component (e.g., sharding, caching, CDN for static assets). Discuss fault tolerance: retries, idempotency, dead-letter queues, and graceful degradation.

5. Discuss Trade-offs and Alternatives

Compare design choices: SQL vs NoSQL, polling vs WebSockets, push vs pull for notifications. Highlight trade-offs between consistency, availability, and latency.

Key Points to Mention

  • Use of geospatial indexing (e.g., geohash, Quadtree) for efficient courier matching and tracking.
  • Event-driven architecture with message queues (e.g., Kafka) for decoupling services and handling spikes.
  • Idempotent operations and exactly-once semantics for order and payment processing.
  • Real-time communication via WebSockets or Server-Sent Events for tracking updates.
  • Caching strategies (e.g., Redis) for frequently accessed data like merchant menus and courier locations.
  • Monitoring and alerting for system health, with metrics like order fulfillment time and courier utilization.

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

Q2

How would you design shopping cart persistence so that a cart survives app closes, device switches, and network outages, including handling anonymous versus logged-in users and conflict resolution?

System DesignData ModelingTechnical Trade-offs
Author's notes

This is where I spent the most time and honestly still feel shaky on the anonymous cart merging piece.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a layered persistence architecture with local storage for offline resilience and server-side storage for cross-device sync. Address anonymous vs. logged-in user flows and conflict resolution strategies, emphasizing trade-offs and eventual consistency.

Pro tip: Demonstrate awareness of real-world constraints like storage limits, sync frequency, and user experience during conflicts; propose a merge strategy that prioritizes user intent and minimizes data loss.

1. Clarify Requirements and Scale

Ask about expected user base, cart size, item types, and consistency requirements. Determine if real-time sync is needed or if eventual consistency suffices.

2. Design Data Model and Storage Layers

Define a cart schema with item IDs, quantities, timestamps, and versioning. Propose local storage (e.g., IndexedDB, SQLite) for offline access and a server-side store (e.g., DynamoDB, Cassandra) for durability and cross-device sync.

3. Handle Anonymous and Logged-in Users

For anonymous users, generate a unique device ID and store cart locally; optionally sync to server with a temporary session. On login, merge the anonymous cart with the user's server-side cart using a conflict resolution policy.

4. Implement Sync and Conflict Resolution

Use a sync protocol (e.g., last-write-wins, operational transformation, or CRDTs) to reconcile changes. For carts, a merge strategy that sums quantities or takes the latest timestamp per item often works, but consider user prompts for ambiguous conflicts.

5. Ensure Resilience and Performance

Design for network outages with retry queues and exponential backoff. Optimize for low latency by caching and batching updates. Discuss trade-offs between consistency, availability, and partition tolerance (CAP theorem).

Key Points to Mention

  • Local storage (IndexedDB, SQLite) for offline persistence and fast reads.
  • Server-side storage (NoSQL like DynamoDB) for durability and cross-device sync.
  • Anonymous user handling via device ID and temporary server-side session.
  • Merge strategy on login: combine carts, resolve conflicts by timestamp or user preference.
  • Conflict resolution techniques: last-write-wins, CRDTs, or user prompts for critical conflicts.
  • Sync protocol with retry logic and exponential backoff for network outages.

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

Q3

How would you handle continuous GPS updates from couriers, including ingestion at scale, storing location history, fanning out to customers and dispatch systems, rate limiting, and privacy considerations?

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

I went straight to a stream-based ingestion pipeline and talked about writing latest position to a low-latency store while keeping a time-series log separately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., number of couriers, update frequency, latency needs), then design a high-level architecture covering ingestion, storage, fan-out, rate limiting, and privacy. Walk through each component, discussing trade-offs and justifying your choices with respect to scalability, reliability, and cost.

Pro tip: Emphasize decoupling and backpressure: use a message queue (like Kafka) to absorb bursts and allow independent scaling of consumers. Also, proactively mention privacy-by-design principles (e.g., data minimization, encryption) to show you consider non-functional requirements early.

1. Clarify Requirements and Scale

Ask questions to understand the expected number of couriers, update frequency, latency requirements, and privacy regulations. This will guide your design decisions.

2. Design Ingestion Pipeline

Propose a scalable ingestion layer (e.g., API gateway + Kafka) that can handle high throughput and provide backpressure. Discuss partitioning by courier ID for ordered processing.

3. Storage for Location History

Choose a storage solution (e.g., time-series DB or wide-column store) for efficient writes and queries. Consider retention policies and archival to cold storage.

4. Fan-out to Consumers

Design a pub/sub system to push updates to customers and dispatch. Use WebSockets or push notifications for real-time, and consider caching for recent locations.

5. Rate Limiting and Privacy

Implement rate limiting per courier and per consumer to prevent abuse. Apply privacy measures: anonymize data, encrypt in transit and at rest, and enforce access controls.

Key Points to Mention

  • Use of Kafka or similar for ingestion to handle high throughput and enable decoupling.
  • Partitioning strategy (e.g., by courier ID) to ensure ordered processing and scalability.
  • Storage choice: time-series database (e.g., Cassandra, InfluxDB) for efficient writes and time-range queries.
  • Fan-out mechanisms: WebSockets for real-time customer updates, message queues for dispatch systems.
  • Rate limiting: token bucket or sliding window per courier and per consumer to prevent overload.
  • Privacy: data minimization, encryption, access control, and compliance with regulations like GDPR.

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

Q4

Walk through the full order lifecycle state machine, including how services communicate across state transitions and how you prevent invalid or out-of-order state changes.

System DesignData ModelingTechnical Trade-offs
Author's notes

Drew out the states on the whiteboard and that helped.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the order states and the events that trigger transitions, then explain how services communicate (e.g., via events or synchronous calls) to enact those transitions. Emphasize how you enforce valid state changes using techniques like optimistic locking, idempotency, and state machine validation. Conclude with trade-offs and how you handle failures and out-of-order events.

Pro tip: Show you understand that state machines are not just about states but about the invariants and side effects; mention how you'd audit and monitor transitions to catch anomalies in production.

1. Define states and transitions

List the core order states (e.g., Created, Paid, Shipped, Delivered, Cancelled) and the allowed transitions between them, including triggers (user actions, system events).

2. Design service communication

Explain how services (e.g., Order, Payment, Inventory) communicate to enact transitions—using synchronous calls for immediate consistency or asynchronous events for scalability and decoupling.

3. Enforce valid transitions

Describe mechanisms to prevent invalid or out-of-order changes: state validation, optimistic concurrency control, idempotent operations, and event ordering (e.g., via sequence numbers or versioning).

4. Handle failures and compensation

Discuss how to handle failures (e.g., payment failure after order creation) using sagas, compensating transactions, or retries with idempotency.

5. Discuss trade-offs and monitoring

Compare approaches (e.g., orchestration vs. choreography, strong vs. eventual consistency) and mention monitoring/auditing of state transitions for observability.

Key Points to Mention

  • State machine definition and allowed transitions
  • Synchronous vs. asynchronous communication patterns (e.g., REST, gRPC, message queues)
  • Optimistic locking and versioning to prevent concurrent invalid updates
  • Idempotency keys to handle duplicate requests and out-of-order events
  • Saga pattern for distributed transactions and compensation
  • Monitoring and auditing of state transitions for debugging and compliance

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

Q5

How would you design the system to handle traffic spikes during peak meal times, covering APIs, caching, queuing, failure handling, and observability?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

Felt more comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., peak QPS, latency SLOs, consistency needs) to frame the design. Then walk through the system layer by layer: API design, caching, queuing, failure handling, and observability, explaining how each handles spikes. Emphasize trade-offs and justify choices based on the specific constraints of meal-time traffic.

Pro tip: Proactively discuss how you would validate the design under load (e.g., load testing, chaos engineering) and how you would iterate based on observability data—this shows you think beyond the whiteboard and consider real-world operation.

1. Clarify Requirements and Scale

Ask about expected peak traffic (e.g., 10x normal), latency SLOs, data consistency requirements, and budget constraints. This ensures your design targets the right problems.

2. Design APIs for Scalability

Propose stateless APIs, rate limiting, and idempotent endpoints. Consider using GraphQL or gRPC for efficiency, and discuss how to handle read vs. write heavy operations.

3. Implement Caching and Queuing

Describe multi-layer caching (CDN, Redis) with appropriate TTLs and invalidation strategies. For writes, use message queues (e.g., Kafka) to decouple services and smooth spikes.

4. Plan for Failure Handling

Outline strategies like circuit breakers, retries with exponential backoff, graceful degradation, and fallbacks. Discuss how to prioritize critical functionality during overload.

5. Ensure Observability

Specify metrics (latency, error rates, queue depths), logging, and tracing. Explain how you would use dashboards and alerts to detect and diagnose issues during spikes.

Key Points to Mention

  • Horizontal scaling with auto-scaling groups and load balancers to handle increased traffic.
  • Caching strategies: CDN for static content, Redis for session and hot data, with cache-aside or write-through patterns.
  • Asynchronous processing via queues (e.g., Kafka, SQS) to decouple services and absorb bursts.
  • Failure handling: circuit breakers, retries with jitter, bulkheads, and fallback responses.
  • Observability: monitoring with Prometheus/Grafana, distributed tracing (e.g., Jaeger), and centralized logging (e.g., ELK).
  • Trade-offs: consistency vs. availability, cost vs. performance, and complexity vs. maintainability.

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