← Nextdoor Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at Nextdoor for a software engineer role. The whole thing was one big question about building a job scheduler, starting simple and then scaling it up 100x. Felt like a fair problem but there were a few corners I didn't handle as cleanly as I'd have liked.

Questions Asked (4)

Q1

Design a job scheduler for a small startup that supports one-time and recurring jobs, retries, cancellation, state tracking, and basic observability. Then walk through how you'd evolve it to handle roughly 100x the load.

System DesignTechnical Trade-offsData Modeling
Author's notes

I started with a simple postgres table for job storage and a polling loop to pick up pending jobs, which felt fine for the startup phase.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a minimal viable scheduler using a relational database for persistence and a polling worker for execution. After covering core features (one-time/recurring jobs, retries, cancellation, state tracking, observability), discuss scaling to 100x load by introducing partitioning, sharding, and a distributed queue.

Pro tip: Emphasize trade-offs: for a startup, simplicity and speed of iteration matter more than premature optimization. When scaling, focus on bottlenecks (e.g., database contention) and propose incremental improvements rather than a full rewrite.

1. Clarify Requirements and Constraints

Ask about scale (jobs per second, latency requirements), durability, and whether the scheduler is for internal or external use. Confirm the need for exactly-once vs at-least-once execution.

2. Design the Minimal Viable Scheduler

Propose a simple architecture: a database table for jobs (with fields like id, type, schedule, next_run, status, retry_count), a worker process that polls for due jobs, and a mechanism for recurring jobs (e.g., cron expressions). Include APIs for job submission, cancellation, and status query.

3. Address Core Features

Explain how to handle retries (exponential backoff, max attempts), cancellation (soft delete or status update), state tracking (job states: pending, running, succeeded, failed, cancelled), and observability (logging, metrics, and a simple dashboard).

4. Scale to 100x Load

Identify bottlenecks: database polling, worker contention, and single points of failure. Propose solutions: sharding by job type or time, using a distributed queue (e.g., Redis, RabbitMQ), horizontal scaling of workers, and partitioning the job table. Consider moving to a dedicated scheduling service like Quartz or building on top of Kubernetes CronJobs.

5. Discuss Trade-offs and Evolution

Compare the initial simple design with the scaled version, highlighting trade-offs in complexity, cost, and reliability. Suggest a phased approach: start simple, monitor, and scale components as needed.

Key Points to Mention

  • Use a relational database (e.g., PostgreSQL) for job persistence with proper indexing on next_run and status.
  • Implement idempotent job execution to handle retries safely.
  • For recurring jobs, store a cron expression or next_run timestamp and compute the next occurrence after each run.
  • Use a distributed lock or leader election to prevent duplicate job execution in a multi-worker setup.
  • For scaling, consider sharding the job table by time or job type, and using a message queue to decouple scheduling from execution.
  • Observability: track metrics like job success rate, latency, and queue depth; use structured logging and alerting.

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

Q2

How would you handle duplicate job execution and ensure idempotency across workers?

System DesignTechnical Trade-offs
Author's notes

Blanked for a second here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's requirements and constraints, then propose a layered strategy combining idempotent design, deduplication mechanisms, and distributed coordination. Discuss trade-offs between consistency, availability, and complexity, and tie your answer back to Nextdoor's scale and reliability needs.

Pro tip: Emphasize that idempotency should be designed at the business logic level (e.g., using idempotency keys) rather than relying solely on infrastructure, and mention how you'd monitor and alert on duplicate execution attempts to catch issues early.

1. Clarify requirements and constraints

Ask about the job's criticality, expected throughput, tolerance for duplicates, and existing infrastructure. This shows you understand that solutions vary based on context.

2. Design for idempotency at the application level

Explain how to make operations idempotent using unique idempotency keys, conditional writes, or state machines. Ensure that even if a job runs twice, the outcome is the same.

3. Implement deduplication and coordination

Describe mechanisms like distributed locks (e.g., Redis, ZooKeeper), database unique constraints, or message deduplication in queues to prevent concurrent duplicate execution.

4. Handle failures and retries gracefully

Discuss how to manage retries with exponential backoff and dead-letter queues, ensuring that retries don't cause duplicate side effects.

5. Monitor, test, and iterate

Propose monitoring for duplicate execution attempts, chaos testing, and metrics to validate the solution. Mention the importance of logging and tracing for debugging.

Key Points to Mention

  • Idempotency keys and conditional writes (e.g., INSERT ... ON CONFLICT DO NOTHING)
  • Distributed locking with TTL to avoid deadlocks and ensure liveness
  • Exactly-once semantics vs at-least-once with idempotency (trade-offs)
  • Database transactions and unique constraints for deduplication
  • Message queue deduplication (e.g., Kafka idempotent producer, SQS FIFO)
  • Monitoring and alerting for duplicate execution attempts

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

Q3

What happens to scheduled jobs if the scheduler node itself crashes? How do you recover?

System DesignTechnical Trade-offs
Author's notes

This one I actually felt okay about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scheduler architecture (single node vs. distributed) and the job types (cron, one-off, etc.). Then explain the failure modes: missed jobs, duplicate runs, and state loss. Finally, outline recovery strategies like leader election, persistent job stores, and idempotent job design.

Pro tip: Emphasize that the real challenge isn't the crash itself but ensuring exactly-once semantics and avoiding duplicate executions during failover. Mention that idempotency and distributed locks are your best friends here.

1. Clarify assumptions

Ask about the scheduler setup: is it a single point of failure or a distributed system? What kind of jobs (cron, delayed, recurring)? This shows you think before answering.

2. Describe immediate impact

Explain what happens when the scheduler crashes: jobs stop being triggered, in-flight jobs may be orphaned, and state (like next run times) could be lost if not persisted.

3. Explain recovery mechanisms

Discuss how to recover: use a highly available scheduler (e.g., leader election with ZooKeeper/etcd), persist job state in a database, and have workers pick up missed jobs via a queue.

4. Address trade-offs

Cover trade-offs: at-least-once vs. exactly-once delivery, latency vs. consistency, and complexity of distributed coordination. Mention idempotency to handle duplicates.

5. Summarize best practices

Conclude with best practices: design jobs to be idempotent, use a distributed lock, monitor scheduler health, and have a failover plan with automated recovery.

Key Points to Mention

  • Single point of failure and need for high availability (e.g., active-passive or active-active clusters)
  • Persistent storage of job metadata and schedules (e.g., database, etcd) to survive crashes
  • Leader election and distributed coordination (e.g., ZooKeeper, etcd, Consul) for failover
  • Idempotent job design to handle duplicate executions during recovery
  • Monitoring and alerting for scheduler health and missed jobs
  • Trade-offs between consistency, availability, and complexity (CAP theorem)

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

Q4

Walk me through your API design and core data model for this scheduler.

API & IntegrationsData ModelingSystem Design
Author's notes

Started with a jobs table with fields like job_id, type, payload, status, scheduled_at, attempts, max_attempts, and a separate recurrence config column.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scheduler's requirements and constraints, then present a high-level API design with key endpoints and data models, and finally dive into the core entities and their relationships. Emphasize trade-offs and how your design supports scalability, reliability, and maintainability.

Pro tip: Show that you consider idempotency and concurrency control in your API and data model, as scheduling systems often face duplicate requests and race conditions. Also, mention how you would version the API to allow future changes without breaking clients.

1. Clarify Requirements

Ask questions to understand the scheduler's scope, such as whether it's for one-time or recurring events, expected scale, and integration needs. This ensures your design addresses the right problems.

2. Define API Endpoints

Outline the main RESTful endpoints for creating, reading, updating, and deleting schedules, and for querying upcoming events. Mention HTTP methods, status codes, and request/response formats.

3. Design Core Data Model

Describe the primary entities like Schedule, Event, and User, and their attributes and relationships. Explain how you would model recurrence (e.g., RRULE) and handle time zones.

4. Address Scalability and Reliability

Discuss how the design supports horizontal scaling, efficient querying (e.g., indexing on time ranges), and fault tolerance. Mention strategies like sharding or caching if relevant.

5. Discuss Trade-offs and Extensions

Highlight key decisions, such as SQL vs. NoSQL, and how you would evolve the API (e.g., versioning). Mention potential extensions like notifications or analytics.

Key Points to Mention

  • RESTful API design with clear resource naming and standard HTTP methods
  • Data model for schedules and events, including recurrence rules (e.g., iCalendar RRULE)
  • Handling time zones and daylight saving time correctly
  • Idempotency and concurrency control for create/update operations
  • Indexing and query patterns for efficient retrieval of upcoming events
  • API versioning and backward compatibility strategies

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