← Airbnb Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at Airbnb for a software engineer role. The whole thing was one long deep-dive into building a job scheduling platform from scratch, and they kept pushing on the failure handling angle harder than I expected.

Questions Asked (7)

Q1

Design an internal job scheduling platform that supports one-time and recurring jobs, scales to roughly 10 million scheduled jobs, and provides visibility to both job owners and on-call engineers.

System DesignData ModelingTechnical Trade-offs
Author's notes

This was the main question and it ate the whole session.

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 distributed scheduler, job store, and execution workers. Dive into data modeling for one-time and recurring jobs, and discuss trade-offs around consistency, fault tolerance, and observability. Emphasize how you'd provide visibility to both job owners and on-call engineers.

Pro tip: Show maturity by discussing how you'd handle missed or delayed jobs due to failures, and how you'd prevent duplicate executions. Also, mention the importance of idempotency and dead-letter queues for reliability.

1. Clarify Requirements and Scale

Ask questions to understand job types, frequency, SLAs, and visibility needs. Confirm scale: 10M jobs, expected QPS, and growth.

2. High-Level Architecture

Propose components: API for job submission, distributed scheduler (e.g., using a queue or database), job store, execution workers, and monitoring. Discuss partitioning and sharding for scale.

3. Data Modeling and Scheduling

Design schemas for one-time and recurring jobs. For recurring, discuss cron expressions or interval-based scheduling. Address how to efficiently query due jobs at scale.

4. Reliability and Fault Tolerance

Explain how to ensure jobs are executed exactly once or at least once with idempotency. Cover handling failures, retries, and dead-letter queues.

5. Visibility and Monitoring

Describe dashboards for job owners (status, history) and on-call engineers (alerts, health metrics). Include logging, tracing, and alerting.

Key Points to Mention

  • Use of a distributed scheduler like Quartz, Airflow, or custom solution with leader election.
  • Sharding the job store by time or job ID to handle 10M jobs.
  • Efficient polling or push-based scheduling using a priority queue or time-wheel.
  • Idempotency keys and exactly-once semantics for job execution.
  • Observability: metrics (success/failure rates, latency), logging, and alerting.
  • Trade-offs: consistency vs. availability, polling vs. push, and cost of storage.

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

Q2

How do you make the due-job lookup cheap at scale, and what happens when a single minute has an unusually large number of jobs scheduled?

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

The hot-minute problem is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and requirements (e.g., number of jobs, acceptable latency, consistency needs). Then propose a bucketed time-wheel or priority queue with sharding, and discuss how to handle hot minutes via load shedding, dynamic scaling, or pre-fetching.

Pro tip: Mention that you would monitor the distribution of jobs per minute and use adaptive techniques like dynamic shard splitting or rate limiting to prevent overload, showing you think about real-world operational concerns.

1. Clarify Requirements and Scale

Ask about the number of jobs, expected QPS, latency requirements, and consistency guarantees to tailor the solution.

2. Design Efficient Lookup Structure

Propose a bucketed time-wheel or priority queue with sharding to make due-job lookup O(1) or O(log n) and distribute load.

3. Handle Hot Minutes

Discuss strategies like dynamic shard splitting, caching, rate limiting, or pre-fetching to manage minutes with unusually high job counts.

4. Ensure Scalability and Fault Tolerance

Explain how to scale horizontally, replicate data, and handle failures without affecting lookup performance.

5. Discuss Trade-offs and Alternatives

Compare with other approaches (e.g., database polling, distributed queues) and justify your choices based on trade-offs.

Key Points to Mention

  • Time-wheel or bucketed data structure for O(1) due-job lookup
  • Sharding by time bucket or job ID to distribute load
  • Dynamic scaling and load shedding for hot minutes
  • Caching and pre-fetching to reduce latency
  • Monitoring and adaptive strategies for skewed distributions
  • Trade-offs between consistency, latency, and cost

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

Q3

How do you ensure exactly one scheduler claims a given job run, and how does the system recover if the claiming scheduler crashes before the job reaches the queue?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This was the crux question and honestly the most interesting part of the interview.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a distributed locking or lease-based mechanism to ensure exactly-once claiming. Explain the crash recovery process using lease expiration and a reconciliation loop, and discuss trade-offs between consistency and availability.

Pro tip: Emphasize idempotency and at-least-once delivery with deduplication, as exactly-once is often a theoretical ideal; showing awareness of practical limitations demonstrates maturity.

1. Clarify Requirements and Constraints

Ask about scale, latency requirements, and consistency needs to tailor the solution. This shows you consider context before diving into design.

2. Design Claiming Mechanism

Propose a distributed lock or lease using a system like ZooKeeper, etcd, or a database with conditional writes. Explain how a scheduler acquires the lock atomically.

3. Handle Scheduler Crash

Describe lease expiration and a recovery process where another scheduler can claim the job after the lease times out. Mention heartbeat renewal to detect liveness.

4. Ensure Idempotency and Deduplication

Discuss how to make job execution idempotent and use deduplication keys to avoid duplicate processing if a crash occurs after enqueueing.

5. Discuss Trade-offs and Alternatives

Compare approaches (e.g., centralized vs. decentralized) and highlight trade-offs between consistency, availability, and complexity.

Key Points to Mention

  • Distributed locking with lease-based mechanisms (e.g., ZooKeeper, etcd, Redis RedLock)
  • Lease expiration and heartbeat renewal for crash detection
  • Idempotent job execution and deduplication strategies
  • Reconciliation loop or watchdog for orphaned jobs
  • Trade-offs between strong consistency and high availability (CAP theorem)
  • Exactly-once semantics vs. at-least-once with deduplication

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

Q4

There's a window between recording a claim in the database and actually publishing the job to the queue. Walk through what can go wrong in each ordering and how you'd make it safe.

System DesignTechnical Trade-offs
Author's notes

Did not have a crisp answer here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by identifying the two operations (DB write and queue publish) and the failure modes for each ordering. Then propose a solution that ensures atomicity or idempotency, such as transactional outbox or two-phase commit, and discuss trade-offs.

Pro tip: Emphasize that the core issue is the dual-write problem, and that the transactional outbox pattern is often the most practical solution. Mention that you'd also consider idempotency keys and monitoring to handle edge cases.

1. Clarify the system and requirements

Confirm the components involved: a database for claims and a message queue for job publishing. Ask about consistency requirements (e.g., at-least-once, exactly-once) and failure tolerance.

2. Analyze failure modes for each ordering

For DB-first: if the queue publish fails, the job is never published (lost job). For queue-first: if the DB write fails, a job is published for a non-existent claim (phantom job). Also consider partial failures and retries.

3. Propose a safe solution

Introduce the transactional outbox pattern: write the claim and an outbox event in the same DB transaction, then a separate process publishes from the outbox. Alternatively, use two-phase commit if the queue supports it, or idempotent consumers with retries.

4. Discuss trade-offs and edge cases

Compare outbox (eventual consistency, added complexity) vs. two-phase commit (blocking, not always supported). Address idempotency, deduplication, and monitoring for stuck outbox entries.

5. Summarize and conclude

Reiterate that the outbox pattern ensures atomicity and reliability, and mention that you'd also implement retries, dead-letter queues, and alerts for failures.

Key Points to Mention

  • Dual-write problem: the fundamental issue of coordinating two separate systems.
  • Transactional outbox pattern: write to DB and outbox in one transaction, then publish asynchronously.
  • Idempotency: ensure that duplicate publishes don't cause duplicate jobs (e.g., using a unique job ID).
  • Two-phase commit (2PC): possible but often impractical due to blocking and lack of support in message queues.
  • At-least-once vs. exactly-once delivery semantics and their implications.
  • Monitoring and alerting: detect and recover from stuck or failed outbox entries.

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

Q5

A worker is mid-execution on a long-running job when its lease expires and the run gets reclaimed. How do you prevent two concurrent executions of the same job?

System DesignTechnical Trade-offs
Author's notes

Talked about heartbeats extending the lease and idempotency keys so that even if a second worker picks it up, the side effect only happens once.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the core problem: lease expiration doesn't guarantee the original worker has stopped, so you need a mechanism to ensure only one execution is active. Then discuss solutions like fencing tokens, idempotency, and distributed locks, emphasizing trade-offs between correctness and complexity.

Pro tip: Mention that even with perfect locking, you should design jobs to be idempotent and use fencing tokens to guard against stale writes, as this is what production systems at scale actually do.

1. Clarify the problem and constraints

Restate the scenario: a lease-based system where a worker may still be running after lease expiration, leading to potential concurrent executions. Ask about requirements: is exactly-once execution needed, or is at-least-once with idempotency acceptable?

2. Discuss locking mechanisms

Explain that distributed locks alone are insufficient because of lease expiration and network partitions. Mention that locks must be renewed and that a lock service like Chubby or ZooKeeper can help, but still has failure modes.

3. Introduce fencing tokens

Describe how a fencing token (a monotonically increasing number) can be issued with each lease. The worker includes the token in all downstream requests, and the storage system rejects requests with stale tokens, preventing the old worker from causing harm.

4. Emphasize idempotency and compensation

Explain that even with fencing, jobs should be idempotent or use compensating transactions to handle partial work. This ensures that if two executions occur, the effects are safe.

5. Summarize trade-offs and recommendations

Conclude that the best approach depends on the system: for many cases, a combination of lease renewal, fencing tokens, and idempotent job design is robust. Mention that simpler systems might use a database row lock with optimistic concurrency control.

Key Points to Mention

  • Lease expiration does not mean the worker has stopped; it may be paused or partitioned.
  • Distributed locks with timeouts can lead to split-brain if not carefully designed.
  • Fencing tokens: a token that increases with each lease, used to reject stale writes.
  • Idempotency: design jobs so that repeated execution has the same effect as a single execution.
  • At-least-once vs exactly-once semantics: exactly-once is often impractical; aim for effectively-once with idempotency.
  • Real-world examples: Google Chubby, Apache ZooKeeper, etcd, and how they handle leases and fencing.

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

Q6

How would you let a team safely cancel a recurring job that already has a run in progress, making sure no already-claimed run still fires after cancellation?

System DesignAPI & Integrations
Author's notes

I said mark the job as cancelled in the DB first, then have workers check job status before executing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: cancellation should be safe, meaning no new runs start after cancellation, and any in-progress run should be allowed to finish or be gracefully stopped. Then propose a design that uses a cancellation flag checked at claim time and a cooperative cancellation mechanism for in-progress runs, ensuring atomicity and idempotency.

Pro tip: Emphasize that cancellation is a state transition, not an immediate kill; use a two-phase approach: mark the job as cancelled, then prevent new claims while allowing in-progress runs to complete or abort gracefully. This shows you understand distributed systems trade-offs.

1. Clarify requirements and constraints

Ask whether in-progress runs should be allowed to finish or must be stopped immediately, and whether cancellation is permanent or temporary. This determines the design.

2. Design cancellation state and atomic claim

Introduce a 'cancelled' flag on the job definition. When a worker claims a run, it atomically checks the flag and only proceeds if not cancelled, using a transaction or conditional update.

3. Handle in-progress runs

For runs already claimed, implement cooperative cancellation: the worker periodically checks a cancellation token and aborts gracefully if set. Alternatively, allow the run to complete but prevent future runs.

4. Ensure no post-cancellation fires

Use a distributed lock or lease when claiming runs, and include the cancellation check in the claim operation. Also, ensure that any scheduled triggers check the cancellation flag before enqueuing.

5. Discuss edge cases and monitoring

Cover race conditions (e.g., cancellation during claim), idempotency, and how to monitor for stuck runs. Mention that cancellation should be auditable and reversible if needed.

Key Points to Mention

  • Atomic check-and-claim using database transactions or conditional writes
  • Cooperative cancellation via cancellation tokens or flags checked by workers
  • Idempotent cancellation API to handle retries
  • Distributed locking or leases to prevent duplicate claims
  • Graceful shutdown vs. immediate termination trade-offs
  • Monitoring and alerting for runs that ignore cancellation

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

Q7

What clarifying questions would you ask before designing this system, for example around scheduling granularity, overlap policy for recurring jobs, and missed-run behavior after an outage?

System DesignAdaptability & Ambiguity
Author's notes

They asked me to call out the most important unknowns before diving in.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that clarifying questions are critical to avoid building the wrong system, then systematically cover the key dimensions: scheduling granularity, overlap policy, missed-run behavior, and other ambiguities like time zones and failure handling. Frame your questions to show you understand the trade-offs and can adapt to evolving requirements.

Pro tip: Ask about the business impact of missed runs and overlaps—this shows you prioritize user experience and system reliability over technical perfection. Also, mention that you'd document assumptions and confirm them with stakeholders before proceeding.

1. Clarify Scheduling Granularity and Precision

Ask about the required time resolution (e.g., seconds, minutes, hours) and whether jobs can be scheduled with cron-like expressions or fixed intervals. Also, inquire about time zone handling and daylight saving time adjustments.

2. Define Overlap Policy for Recurring Jobs

Determine what should happen if a job is still running when the next scheduled run begins: should it skip, queue, run concurrently, or kill the previous run? Ask if this policy can vary per job or must be global.

3. Establish Missed-Run Behavior After Outages

Ask whether missed runs should be executed immediately upon recovery (catch-up), skipped, or only the most recent run should be executed. Clarify if there are limits on catch-up attempts and how to handle long outages.

4. Explore Additional Ambiguities

Inquire about job dependencies, retry policies, failure notifications, and priority levels. Also, ask about scalability requirements, expected job volume, and whether jobs can be paused or modified dynamically.

5. Summarize and Confirm Assumptions

Restate the key clarifications and assumptions to ensure alignment with the interviewer. Mention that you would document these and validate with stakeholders before designing.

Key Points to Mention

  • Scheduling granularity: cron vs. fixed intervals, time zone and DST handling
  • Overlap policy: skip, queue, concurrent, or kill previous run; per-job configurability
  • Missed-run behavior: catch-up, skip, or latest-only; limits and backoff strategies
  • Job dependencies and ordering guarantees
  • Retry policies and failure handling (e.g., exponential backoff, dead-letter queues)
  • Scalability and performance requirements: number of jobs, frequency, and resource constraints

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