← stubhub Interview Insights

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

Senior
Jul 2026

Summary

System design round at StubHub for a software engineer role, focused entirely on designing a marketing email system. Pretty interesting problem space but there were a few areas where I felt like I was guessing more than reasoning.

Questions Asked (4)

Q1

Design a system that sends 2-3 marketing emails to users within a 15-minute delivery window.

System DesignTechnical Trade-offs
Author's notes

The time window constraint is what made this interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: what triggers the emails, expected scale, and delivery guarantees. Then design a scalable, fault-tolerant system that batches emails per user and schedules them within the 15-minute window, discussing trade-offs between latency, cost, and reliability.

Pro tip: Emphasize idempotency and exactly-once delivery to avoid duplicate emails, and discuss how to handle failures gracefully with retries and dead-letter queues.

1. Clarify Requirements

Ask about email triggers, user volume, personalization, and delivery guarantees. Confirm that emails should be sent within a 15-minute window and that order matters.

2. High-Level Architecture

Propose a system with a scheduler, message queue, and email workers. Use a database to store user email schedules and a distributed queue for scalability.

3. Scheduling and Batching

Design a scheduler that groups emails per user and enqueues them with a target delivery time. Use a priority queue or delay queue to ensure timely delivery.

4. Delivery and Reliability

Implement workers that pull from the queue and send emails via an email service. Ensure idempotency with unique message IDs and handle retries with exponential backoff.

5. Monitoring and Scaling

Discuss monitoring for delivery latency and failures, and how to scale horizontally by adding more workers and partitioning the queue.

Key Points to Mention

  • Use of message queues (e.g., Kafka, RabbitMQ) for decoupling and scalability
  • Idempotency and deduplication to prevent duplicate emails
  • Retry mechanisms with exponential backoff and dead-letter queues
  • Time synchronization across distributed nodes (e.g., NTP)
  • Trade-offs between latency, cost, and reliability
  • Monitoring and alerting for delivery success and latency

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

Q2

How would you handle scheduling and delivery across multiple time zones for a marketing email campaign?

System DesignAdaptability & Ambiguity
Author's notes

Stored all timestamps in UTC, convert at send time based on user profile timezone.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: campaign scale, target regions, and delivery constraints. Then outline a system design that handles time zone conversion, scheduling, and reliable delivery, emphasizing scalability and fault tolerance. Conclude by discussing trade-offs and how you would validate the solution.

Pro tip: Mention the importance of idempotency and exactly-once delivery semantics to avoid duplicate emails, and suggest using a distributed scheduler like Quartz or a cloud-based service (e.g., AWS EventBridge) with time zone support.

1. Clarify Requirements

Ask about the number of recipients, regions, frequency of campaigns, and any compliance requirements (e.g., GDPR). This ensures the design meets actual needs.

2. High-Level Architecture

Propose a distributed system with a scheduler, message queue, and workers. The scheduler triggers jobs based on recipient time zones, and the queue decouples processing for scalability.

3. Time Zone Handling

Store all times in UTC and convert to local time zones for scheduling. Use a library like moment-timezone or java.time to handle DST and offset changes accurately.

4. Reliability and Fault Tolerance

Implement retries with exponential backoff, dead-letter queues, and idempotent email sending to handle failures without duplicates. Use distributed locks to prevent concurrent execution of the same job.

5. Monitoring and Validation

Set up logging, metrics, and alerts for delivery success rates and latency. Test with simulated time zones and load to ensure correctness and performance.

Key Points to Mention

  • Use of UTC for storage and conversion to local time zones for scheduling.
  • Distributed scheduling with a system like Quartz, Celery Beat, or cloud schedulers (AWS EventBridge, Google Cloud Scheduler).
  • Message queues (e.g., RabbitMQ, Kafka) to decouple scheduling from delivery and handle spikes.
  • Idempotency and exactly-once delivery to prevent duplicate emails.
  • Handling daylight saving time transitions and time zone database updates.
  • Scalability considerations: partitioning by region, horizontal scaling of workers.

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

Q3

How would you design A/B testing into this email system to compare different marketing email variants?

A/B Testing & ExperimentationSystem Design
Author's notes

This was the part I felt most comfortable with.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the goal of A/B testing in the email system—optimizing open rates, click-through rates, or conversions—and then outline a scalable architecture that includes variant assignment, tracking, and analysis. Focus on how you would integrate experimentation into the existing email pipeline without disrupting delivery, and discuss trade-offs between simplicity and statistical rigor.

Pro tip: Emphasize the importance of avoiding common pitfalls like sample ratio mismatch and novelty effects, and suggest starting with a simple hash-based assignment before moving to more complex systems. Also, mention the need for a holdout group to measure long-term impact.

1. Define Experiment Goals and Metrics

Clarify what you're optimizing (e.g., open rate, CTR, conversion) and define primary and secondary metrics. Ensure metrics are measurable and aligned with business objectives.

2. Design Variant Assignment and Delivery

Decide how users will be assigned to variants (e.g., random, hash-based) and ensure consistent assignment across emails. Integrate with the email sending service to deliver the correct variant.

3. Implement Tracking and Data Collection

Instrument the system to log events (opens, clicks, conversions) with variant identifiers. Ensure data is captured reliably and can be joined with user attributes for analysis.

4. Analyze Results and Determine Significance

Use statistical methods to compare variants, check for significance, and guard against pitfalls like multiple comparisons. Consider sequential testing or Bayesian methods for early stopping.

5. Scale and Automate

Build a framework that allows easy setup of future experiments, including automated reporting and integration with the marketing dashboard. Consider a self-serve tool for marketers.

Key Points to Mention

  • Randomization unit (user-level vs. email-level) and its impact on experiment validity
  • Avoiding sample ratio mismatch (SRM) by ensuring equal distribution
  • Tracking mechanisms: unique links, pixels, and UTM parameters
  • Statistical power and sample size calculation
  • Handling multiple variants and multiple comparisons
  • Integration with existing email infrastructure and scalability

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

Q4

How would you track whether emails were successfully delivered, and measure conversion effectiveness from those emails?

Product Analytics & MetricsSystem Design
Author's notes

Tracking delivery is straightforward enough, webhook callbacks from the email provider, store status events.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the end-to-end email pipeline: sending, delivery tracking, and conversion measurement. Then describe the technical implementation for tracking delivery status (e.g., SMTP responses, webhooks) and conversion attribution (e.g., UTM parameters, unique links). Finally, discuss how to analyze and act on the data to improve email effectiveness.

Pro tip: Emphasize the importance of distinguishing between delivery metrics (e.g., bounce rates) and engagement metrics (e.g., open rates, click-through rates) and how they inform different optimization strategies. Also, mention the need for a feedback loop to continuously improve email deliverability and conversion.

1. Map the email sending and tracking architecture

Describe the components involved: email service provider (ESP), SMTP servers, tracking domains, and how they integrate with your application. Explain how you would instrument the system to capture delivery events.

2. Implement delivery tracking

Detail methods to track successful delivery: SMTP response codes, ESP webhooks for bounces/complaints, and custom tracking pixels for opens. Discuss how to handle asynchronous events and store delivery status in a database.

3. Measure conversion effectiveness

Explain how to attribute conversions to emails: use unique links with UTM parameters, track clicks and subsequent actions (e.g., purchases) via cookies or user IDs, and calculate conversion rates. Mention the importance of defining conversion events clearly.

4. Analyze and optimize

Describe how to analyze the collected data to compute metrics like delivery rate, open rate, click-through rate, and conversion rate. Discuss A/B testing and segmentation to improve future campaigns.

5. Ensure data reliability and privacy

Address challenges like email clients blocking pixels, GDPR compliance, and data retention. Explain how to ensure accurate tracking while respecting user privacy.

Key Points to Mention

  • SMTP response codes and ESP webhooks for delivery status
  • Tracking pixels for open rates and their limitations
  • Unique links with UTM parameters for click and conversion tracking
  • Conversion attribution models (last-click, multi-touch)
  • Metrics: delivery rate, bounce rate, open rate, CTR, conversion rate
  • A/B testing and segmentation for optimization
  • Privacy regulations (GDPR, CCPA) and data handling

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