← Meta Interview Insights

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

Senior
Apr 2026

Summary

System design round at Meta for a software engineer role. The question was a full end-to-end design of a distributed job scheduler, cron-style but fault-tolerant and scalable. Pretty meaty for a single session.

Questions Asked (1)

Q1

Design a distributed job scheduler that supports one-time, immediate, and recurring jobs, runs them on a scalable worker fleet, and handles fault tolerance, retries, and at-least-once (or exactly-once) execution guarantees end-to-end.

System DesignTechnical Trade-offsData Modeling
Author's notes

This one sprawls in every direction.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: job types (one-time, immediate, recurring), scale, latency, and execution guarantees. Then design a high-level architecture with a job store, scheduler, message queue, and worker fleet, and dive into fault tolerance, retries, and exactly-once semantics using idempotency and deduplication.

Pro tip: Explicitly discuss the trade-off between at-least-once and exactly-once delivery, and propose a practical solution like idempotent workers with a deduplication cache to achieve effectively-once semantics. This shows you understand real-world constraints and can balance correctness with performance.

1. Clarify Requirements and Scope

Ask about job types, expected scale (jobs per second, worker count), latency requirements, and execution guarantees (at-least-once vs exactly-once). Also clarify if jobs can be canceled or updated.

2. High-Level Architecture

Propose a distributed system with a persistent job store (e.g., database or distributed log), a scheduler service that triggers jobs, a message queue (e.g., Kafka) for decoupling, and a pool of workers that execute jobs.

3. Job Scheduling and Triggering

Explain how one-time and immediate jobs are enqueued, and how recurring jobs are handled using a timing wheel or cron-like scheduler that periodically scans for due jobs and pushes them to the queue.

4. Fault Tolerance and Retries

Describe mechanisms for worker failures: job leases with timeouts, retries with exponential backoff, dead-letter queues for poison messages, and ensuring the scheduler itself is highly available (e.g., leader election).

5. Execution Guarantees and Idempotency

Discuss how to achieve at-least-once delivery with idempotent job execution, and for exactly-once, use deduplication (e.g., unique job IDs with a dedup store) and transactional writes to track job state.

Key Points to Mention

  • Use of a distributed log (e.g., Kafka) for durable job queuing and replayability.
  • Idempotency keys and deduplication to handle retries and achieve effectively-once semantics.
  • Lease-based job assignment with heartbeats to detect and recover from worker failures.
  • Scalability considerations: partitioning jobs, horizontal scaling of workers, and backpressure.
  • Monitoring and alerting for job failures, queue depth, and worker health.
  • Trade-offs between consistency, availability, and latency in the design (e.g., CAP theorem).

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