← stubhub Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

System design round at StubHub for a software engineering role. The whole thing was one big design question about building a marketing email platform at scale, which sounds straightforward until you're actually in it trying to juggle time zones, A/B testing, and tracking all at once.

Questions Asked (3)

Q1

Design a large-scale marketing email system that supports per-user time zone scheduling, A/B testing, and end-to-end delivery tracking.

System DesignA/B Testing & ExperimentationData Modeling
Author's notes

This question has a lot of surface area and I didn't pace myself well.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a high-level architecture that decouples scheduling, content generation, and delivery. Focus on how to handle per-user time zones, A/B test assignment, and tracking events end-to-end, while ensuring scalability and fault tolerance.

Pro tip: Emphasize idempotency and exactly-once delivery semantics, as duplicate emails can damage user trust and skew A/B test results. Also, consider using a distributed scheduler like Quartz or a custom time-wheel for precise time zone handling.

1. Clarify Requirements and Scale

Ask about expected email volume, user base size, latency requirements, and compliance needs (e.g., GDPR, CAN-SPAM). Define what 'end-to-end tracking' means (opens, clicks, bounces, etc.).

2. High-Level Architecture

Outline components: user profile service, campaign management, scheduler, content renderer, delivery service, and tracking service. Use message queues (e.g., Kafka) to decouple and buffer.

3. Per-User Time Zone Scheduling

Store user time zone in profile. Use a distributed scheduler that triggers at the right local time, handling DST and large scale. Consider sharding by time zone or using a time-wheel approach.

4. A/B Testing Integration

Assign users to test groups deterministically (e.g., hash user ID) to ensure consistency. Track variant-specific metrics and allow dynamic allocation. Ensure test groups are mutually exclusive and statistically valid.

5. Delivery and Tracking

Use an email service provider (ESP) or build SMTP relay with retries and rate limiting. Embed tracking pixels and link redirects for opens/clicks. Ingest events into a data pipeline for real-time analytics and feedback into A/B tests.

Key Points to Mention

  • Idempotency and deduplication to prevent duplicate sends
  • Scalable scheduling with time zone awareness (e.g., using UTC offsets and DST rules)
  • Deterministic A/B test assignment and consistent user experience
  • Event tracking pipeline (opens, clicks, bounces) with at-least-once processing and dedup
  • Rate limiting and backpressure to avoid overwhelming ESPs or SMTP servers
  • Data modeling for campaigns, users, events, and experiment assignments

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

Q2

How would you handle sending 2-3 emails per user within a 15-minute window without hammering the email provider or creating huge send bursts?

System DesignTechnical Trade-offs
Author's notes

Blanked for a second on the rate-limiting angle.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: are the 2-3 emails per user triggered by user actions (e.g., order updates) or batched notifications? Then propose a queuing system with rate limiting per user and global provider limits, using a message broker and worker pool to smooth out bursts. Emphasize trade-offs between latency, throughput, and provider constraints.

Pro tip: Mention the importance of idempotency and deduplication to avoid sending duplicate emails if retries occur, and suggest using a provider like SendGrid with subuser or IP pool separation to isolate different email types.

1. Clarify Requirements and Constraints

Ask about email types (transactional vs. marketing), expected volume, provider rate limits, and latency requirements. This shows you avoid assumptions and design for the actual use case.

2. Design a Queuing and Rate-Limiting Architecture

Propose a message queue (e.g., RabbitMQ, Kafka) to buffer emails, with workers that pull messages and enforce per-user and global rate limits. Use a token bucket or leaky bucket algorithm for rate limiting.

3. Implement Batching and Throttling

For multiple emails to the same user within 15 minutes, consider batching them into a single email if appropriate, or schedule them with delays to avoid bursts. Use a scheduler like Redis with TTL or a delayed queue.

4. Handle Failures and Ensure Reliability

Implement retries with exponential backoff, dead-letter queues, and idempotency keys to prevent duplicate sends. Monitor queue depth and provider response codes to adjust rate limits dynamically.

5. Discuss Trade-offs and Scaling

Explain trade-offs: batching reduces provider load but may delay urgent emails; strict per-user limits may cause delays. Discuss horizontal scaling of workers and using multiple providers or IP pools to increase throughput.

Key Points to Mention

  • Rate limiting algorithms (token bucket, leaky bucket) and their application per user and globally.
  • Message queues (e.g., Kafka, RabbitMQ, SQS) for decoupling and smoothing bursts.
  • Idempotency and deduplication to avoid duplicate emails on retries.
  • Batching strategies (e.g., digest emails) and their impact on user experience.
  • Provider-specific limits and strategies like multiple IP pools or subaccounts.
  • Monitoring and alerting on queue depth, send rates, and provider errors.

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

Q3

How would you design the tracking pipeline to capture sent, delivered, opened, and clicked events, and then attribute them to conversions like purchases or signups?

Product Analytics & MetricsSystem DesignAPI & Integrations
Author's notes

Probably my strongest section.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the end-to-end event tracking architecture, from client-side instrumentation to server-side processing and storage. Then explain how you would link events to conversions using identifiers and attribution models, ensuring scalability and data integrity. Finally, discuss trade-offs and monitoring.

Pro tip: Emphasize the importance of a unified user identifier across devices and sessions to enable accurate attribution, and mention how you would handle edge cases like anonymous users or cross-device journeys.

1. Event Instrumentation

Define a consistent event schema for sent, delivered, opened, and clicked events, and implement tracking on both client and server sides where appropriate.

2. Data Collection & Ingestion

Set up a scalable ingestion pipeline (e.g., using Kafka or Kinesis) to collect events in real-time, ensuring reliability and fault tolerance.

3. Processing & Storage

Process events to enrich and validate them, then store in a data warehouse (e.g., Redshift, BigQuery) for analysis, with appropriate partitioning and retention policies.

4. Attribution Modeling

Link engagement events to conversions using user identifiers and session stitching, and apply an attribution model (e.g., last-touch, multi-touch) based on business requirements.

5. Monitoring & Iteration

Implement monitoring for data quality and pipeline health, and iterate on the design based on feedback and evolving business needs.

Key Points to Mention

  • Unified user identifier (e.g., user ID, email, device ID) for cross-device and cross-session tracking
  • Event schema design with required fields (timestamp, user ID, event type, metadata)
  • Scalable and reliable ingestion using message queues (Kafka, Kinesis) and stream processing (Flink, Spark Streaming)
  • Data storage options (data lake, warehouse) and partitioning for query performance
  • Attribution models (last-touch, first-touch, linear, time-decay) and their trade-offs
  • Privacy and compliance considerations (GDPR, CCPA) and data governance

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