← StubHub Interview Insights

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

Senior
Apr 2026

Summary

System design round at StubHub for a software engineer role. The whole thing revolved around designing a marketing email system, which sounds straightforward until you actually have to think through the edge cases around time zones, A/B testing, and tracking.

Questions Asked (3)

Q1

Design a system that sends 2-3 marketing emails within a 15-minute window. How would you handle scheduling across different time zones?

System DesignTechnical Trade-offs
Author's notes

This is where I spent most of my time and still felt shaky at the end.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: what triggers the emails, expected volume, and whether 'within a 15-minute window' means all 2-3 emails must be sent within 15 minutes of each other or within 15 minutes of a scheduled time. Then propose a timezone-aware scheduling architecture using UTC internally, with per-user local time preferences and a distributed scheduler that handles daylight saving and timezone changes.

Pro tip: Mention the importance of idempotency and deduplication to avoid sending duplicate emails if a scheduling job retries, and discuss how to handle users who change time zones after scheduling.

1. Clarify Requirements

Ask about the trigger (e.g., user action, campaign schedule), expected email volume, and the exact meaning of the 15-minute window. Confirm whether emails should be sent at a specific local time or relative to an event.

2. Design Timezone Handling

Store all timestamps in UTC and user time zones separately. Use a timezone database (e.g., IANA) to convert local times to UTC, accounting for daylight saving transitions. Consider using a library like Joda-Time or java.time.

3. Architecture for Scheduling

Propose a distributed scheduler (e.g., Quartz, Celery Beat, or cloud-based like AWS EventBridge) that polls for due jobs. Use a message queue to decouple scheduling from sending, and ensure horizontal scalability.

4. Ensure Reliability and Idempotency

Implement idempotent email sending with unique job IDs and deduplication logic. Use retries with exponential backoff and dead-letter queues for failures. Monitor for missed or duplicate sends.

5. Handle Edge Cases

Address timezone changes (e.g., user travels), daylight saving time, and users with no timezone data. Discuss fallback strategies and how to reschedule if needed.

Key Points to Mention

  • Use UTC for storage and convert to local time only for display or scheduling decisions.
  • Leverage a timezone database (IANA) to handle DST and historical changes.
  • Design for scalability with a distributed job scheduler and message queue.
  • Implement idempotency and deduplication to prevent duplicate emails.
  • Consider user preferences and consent for marketing emails (e.g., opt-in, unsubscribe).
  • Monitor and alert on scheduling delays or failures.

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

Q2

How would you design the A/B testing component of this email system so different users receive different marketing variants?

A/B Testing & ExperimentationSystem Design
Author's notes

Felt more comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: scale, types of experiments, and success metrics. Then propose a high-level architecture that separates experiment assignment from email sending, using a deterministic hashing service and a variant store. Finally, discuss trade-offs, edge cases, and how to measure results.

Pro tip: Emphasize deterministic assignment based on user ID to ensure consistent experience across emails and sessions, and mention the importance of logging exposures for accurate analysis.

1. Clarify Requirements

Ask about scale (users, emails per day), experiment types (subject lines, content, send time), and success metrics (open rate, click-through).

2. Design Assignment Service

Propose a service that deterministically assigns users to variants using a hash of user ID and experiment ID, ensuring consistency and even distribution.

3. Integrate with Email Pipeline

Explain how the email sending component queries the assignment service to fetch the variant and renders the appropriate content before sending.

4. Handle Data Collection and Analysis

Describe logging exposures and outcomes (opens, clicks) to a data warehouse, and how to compute statistical significance.

5. Discuss Trade-offs and Edge Cases

Address concerns like user consistency across devices, experiment ramp-up, and handling of new users or unsubscribes.

Key Points to Mention

  • Deterministic hashing for consistent user experience
  • Separation of concerns: assignment service vs. email sender
  • Scalability and low latency for high-volume email sends
  • Logging exposures for accurate experiment analysis
  • Statistical significance and avoiding peeking
  • Handling of edge cases: new users, unsubscribes, and cross-device consistency

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

Q3

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

Product Analytics & MetricsSystem Design
Author's notes

Jumped straight to open rates and click tracking pixels, which felt a bit surface level in retrospect.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the technical mechanisms for tracking email delivery, such as SMTP response codes, webhooks, and tracking pixels. Then, shift to measuring conversion effectiveness by defining clear metrics, implementing attribution, and analyzing the data to optimize campaigns. Emphasize scalability, reliability, and data-driven decision-making.

Pro tip: Demonstrate awareness of email deliverability best practices (e.g., SPF, DKIM, DMARC) and privacy regulations (e.g., GDPR, CAN-SPAM) to show you understand the broader ecosystem beyond just code.

1. Implement Delivery Tracking

Use SMTP response codes for immediate feedback, webhooks for asynchronous events (bounces, complaints), and tracking pixels for opens. Ensure you capture and store these events reliably.

2. Define Conversion Metrics

Identify key conversion actions (e.g., clicks, purchases) and set up tracking via unique links, UTM parameters, or event tracking. Align metrics with business goals.

3. Attribute Conversions

Implement attribution models (e.g., last-click, multi-touch) to link conversions to email campaigns. Consider using a data warehouse or analytics platform to join email events with conversion data.

4. Analyze and Optimize

Calculate delivery rates, open rates, click-through rates, and conversion rates. Use A/B testing and cohort analysis to improve future campaigns.

5. Ensure Scalability and Reliability

Design the system to handle high volume, with retries, idempotency, and monitoring. Use message queues and distributed processing for real-time tracking.

Key Points to Mention

  • SMTP response codes and webhooks for delivery status (e.g., 250 OK, 550 bounce)
  • Tracking pixels for open rates and unique links for click tracking
  • Conversion metrics: open rate, click-through rate (CTR), conversion rate, ROI
  • Attribution models and UTM parameters for campaign tracking
  • Data pipeline: collecting events, storing in a database or data warehouse, and analyzing with SQL/BI tools
  • Scalability considerations: message queues (e.g., Kafka, RabbitMQ), idempotent processing, and monitoring

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