← Meta Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at Meta for a software engineering role. One question, but it had a lot of surface area and I felt like I kept getting pulled in different directions trying to cover everything.

Questions Asked (1)

Q1

Design a ticket-booking system where a reserved ticket automatically returns to the available pool if payment isn't completed within 30 minutes. Walk through the data model, reservation flow, concurrency handling, timeout mechanism, and consistency guarantees.

System DesignData ModelingTechnical Trade-offs
Author's notes

This question has way more moving parts than it looks.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a high-level architecture with a relational database for strong consistency and a distributed timeout mechanism. Walk through the reservation flow, emphasizing concurrency control (e.g., optimistic locking) and idempotent operations. Finally, discuss trade-offs between consistency and availability, and how to handle failures in the timeout system.

Pro tip: Emphasize idempotency and exactly-once semantics for timeout-triggered releases to avoid double-releasing tickets, and discuss how to handle clock skew and failures in the timeout service.

1. Clarify Requirements and Scale

Ask about expected traffic, read/write ratio, consistency requirements, and whether the system is global. Define functional and non-functional requirements.

2. Design Data Model and Storage

Propose tables for events, tickets, reservations, and payments. Choose a database (e.g., relational for ACID) and discuss indexing for efficient lookups.

3. Outline Reservation Flow

Describe the steps: user selects ticket, system creates a reservation with status 'pending' and expiration timestamp, user pays, system confirms or expires. Ensure idempotency for payment and expiration.

4. Address Concurrency and Timeout Mechanism

Explain how to prevent double-booking using transactions or optimistic locking. Detail the timeout mechanism: a distributed scheduler (e.g., Redis keyspace notifications, delayed queues) that triggers release after 30 minutes.

5. Discuss Consistency and Trade-offs

Cover consistency guarantees (e.g., strong consistency for reservations), failure handling (e.g., timeout service down), and trade-offs between consistency and availability. Mention monitoring and reconciliation.

Key Points to Mention

  • Use of database transactions with SELECT FOR UPDATE or optimistic concurrency control to prevent race conditions.
  • Idempotent operations for payment confirmation and timeout release to handle retries safely.
  • Distributed timeout mechanism using Redis TTL, delayed message queues (e.g., RabbitMQ), or a scheduled job with a database index on expiration time.
  • Handling of clock skew and failure recovery for the timeout service (e.g., fallback sweeper job).
  • Consistency model: strong consistency for reservation state, eventual consistency for auxiliary services like notifications.
  • Monitoring and reconciliation: periodic job to detect and fix inconsistencies (e.g., expired reservations not released).

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