← Stripe Interview Insights

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

Senior
May 2026

Summary

Stripe system design round for a software engineer role. The whole session was basically one big question about building an email scheduling service, which sounds straightforward but kept expanding the more we talked.

Questions Asked (3)

Q1

Design an email scheduler service that supports one-shot and recurring sends, cancellation, listing pending emails per user, and a dispatcher that fires emails when they come due.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

I started with a min-heap keyed on send_at and they seemed fine with that, but I fumbled a bit when they pushed on cancellation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a data model that supports one-shot and recurring emails with cancellation and per-user listing. Propose a dispatcher architecture that efficiently finds due emails, handles failures, and scales horizontally, discussing trade-offs at each step.

Pro tip: Emphasize idempotency and exactly-once semantics for email sends, as duplicate or missed emails are critical issues in production. Also, discuss how to handle time zones and daylight saving for recurring schedules.

1. Clarify Requirements and Scale

Ask about expected volume (emails per second), latency requirements, and whether recurring emails need complex rules (e.g., cron expressions). Confirm if cancellation should be immediate and if listing pending emails needs pagination.

2. Design Data Model

Propose a schema for emails: id, user_id, recipient, subject, body, send_time, recurrence_rule (nullable), status (pending/sent/cancelled), and next_send_time for recurring. Consider indexing on (status, next_send_time) and (user_id, status) for efficient queries.

3. Architect Dispatcher and Scheduling

Describe a dispatcher service that polls a queue or database for due emails. Use a priority queue or time-based partitioning to efficiently find due emails. For recurring emails, after sending, compute the next occurrence and update next_send_time.

4. Handle Cancellation and Listing

For cancellation, update status to cancelled and remove from scheduling structures. For listing pending emails per user, query by user_id and status=pending, with pagination. Ensure consistency between database and any in-memory queues.

5. Address Reliability and Scaling

Discuss idempotency (e.g., using a unique email id to prevent duplicates), retries with exponential backoff, dead-letter queues, and horizontal scaling of dispatchers. Consider using a distributed lock or leader election for scheduling.

Key Points to Mention

  • Data model with indexes for efficient due-email lookup and per-user listing
  • Dispatcher design: polling vs. event-driven, use of priority queues or time-wheel
  • Recurring email handling: storing recurrence rules and computing next send time
  • Idempotency and exactly-once delivery to avoid duplicate or missed emails
  • Cancellation semantics: soft delete vs. hard delete, and impact on scheduling
  • Scalability: sharding by user_id or time, and handling time zones/DST

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

Q2

How would you handle clock skew and retries in the dispatcher so emails aren't sent twice or dropped entirely?

System DesignTechnical Trade-offs
Author's notes

This is where I felt most shaky.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: exactly-once semantics for email dispatch, tolerance for clock skew, and failure handling. Then propose a design that combines idempotency keys, a distributed lock or lease, and a deduplication store with TTL, while addressing retries via exponential backoff and dead-letter queues. Finally, discuss trade-offs between consistency, latency, and complexity, and how to monitor and reconcile discrepancies.

Pro tip: Emphasize that true exactly-once delivery is impossible in distributed systems; instead, aim for effectively-once by making the consumer idempotent and using a deduplication window. Mention that Stripe often values pragmatic solutions that balance correctness and operational simplicity.

1. Clarify requirements and constraints

Ask about the expected scale, acceptable latency, and whether duplicate emails are worse than dropped emails. Confirm if the system must guarantee exactly-once or if at-least-once with idempotency is acceptable.

2. Design idempotent dispatch

Assign a unique idempotency key to each email request (e.g., based on user ID, email type, and timestamp). Before sending, check a deduplication store (e.g., Redis with TTL) to see if the key was already processed; if so, skip sending.

3. Handle clock skew and ordering

Use a logical clock or a centralized timestamp service (e.g., Google TrueTime) to avoid relying on local clocks. For retries, include the original timestamp and use a monotonic sequence number to detect out-of-order or stale requests.

4. Implement retries with backoff and dead-letter queue

On failure, retry with exponential backoff and jitter, up to a max attempts. If still failing, move the message to a dead-letter queue for manual inspection. Ensure retries are idempotent by reusing the same idempotency key.

5. Monitor, reconcile, and iterate

Set up metrics for duplicate sends, dropped emails, and retry counts. Periodically reconcile the deduplication store with the email provider's logs to detect and fix inconsistencies. Discuss trade-offs and potential improvements.

Key Points to Mention

  • Idempotency keys and deduplication store with TTL
  • Distributed locks or leases to prevent concurrent sends
  • Logical clocks or centralized timestamp service to handle clock skew
  • Exponential backoff with jitter for retries
  • Dead-letter queue for failed messages
  • Monitoring and reconciliation to ensure no duplicates or drops

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

Q3

How does this design change when you need to run the scheduler across multiple distributed nodes?

System DesignTechnical Trade-offs
Author's notes

Felt more comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of the distributed setup, such as scale, consistency needs, and failure tolerance. Then, systematically address the key challenges: partitioning work, coordination, fault tolerance, and consistency. Finally, discuss trade-offs of different approaches and how they impact the overall design.

Pro tip: Emphasize idempotency and exactly-once semantics for critical operations like payments, and discuss how you would handle partial failures without disrupting the system. This shows you understand Stripe's domain and the importance of reliability.

1. Clarify Requirements and Constraints

Ask questions to understand the scale, latency, consistency, and availability requirements. Determine if the scheduler needs to be highly available, partition-tolerant, and what consistency model is acceptable.

2. Identify Distributed Challenges

Enumerate the key challenges: coordination, leader election, work distribution, fault tolerance, and consistency. Explain how these differ from a single-node scheduler.

3. Propose a High-Level Architecture

Outline a distributed architecture, such as a leader-based scheduler with worker nodes, or a decentralized approach using consistent hashing. Discuss how tasks are assigned and monitored.

4. Address Fault Tolerance and Consistency

Describe mechanisms for handling node failures, such as replication, heartbeats, and failover. Discuss how to achieve exactly-once semantics and idempotency for critical tasks.

5. Discuss Trade-offs and Alternatives

Compare different approaches (e.g., centralized vs. decentralized, strong vs. eventual consistency) and explain the trade-offs in terms of complexity, performance, and reliability.

Key Points to Mention

  • Partitioning and sharding strategies for distributing tasks across nodes
  • Leader election and coordination services (e.g., ZooKeeper, etcd) for managing state
  • Idempotency and exactly-once processing to handle retries and failures
  • Fault tolerance mechanisms: replication, heartbeats, and automatic failover
  • Consistency models: strong vs. eventual consistency and their implications
  • Monitoring, logging, and observability for debugging distributed issues

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