← StubHub Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at StubHub for a software engineering role. The main question was a full chat system design with a pretty specific twist around emailing inactive users, which made it more interesting than the usual messaging app prompt.

Questions Asked (1)

Q1

Design an internal chat system for StubHub that supports real-time messaging and sends email notifications to users who haven't logged in for 10 or more days but have unread messages.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This question has two distinct parts and I spent way too long on the WebSocket layer before the interviewer nudged me toward the email pipeline.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design the core real-time messaging architecture using WebSockets and a pub/sub system. Next, design the email notification service that tracks user activity and unread messages, ensuring it scales and avoids spamming users. Finally, discuss trade-offs and potential optimizations.

Pro tip: Emphasize idempotency and rate limiting in the email notification service to prevent duplicate emails and respect user preferences, showing you consider real-world operational concerns.

1. Clarify Requirements and Scale

Ask about expected number of users, messages per second, and whether chat is 1:1 or group. Also confirm email notification specifics: frequency, opt-out, and definition of 'logged in'.

2. High-Level Architecture

Outline components: WebSocket servers for real-time messaging, a message queue (e.g., Kafka) for asynchronous processing, a database for message storage, and a separate service for email notifications.

3. Real-Time Messaging Design

Detail how messages are sent and received: clients connect via WebSockets, messages are published to a channel, and delivered to recipients. Discuss message ordering, delivery guarantees, and offline handling.

4. Email Notification Service

Design a scheduled job that queries for users inactive for 10+ days with unread messages, then sends emails via an email service (e.g., SES). Ensure idempotency and rate limiting.

5. Trade-offs and Scalability

Discuss trade-offs: push vs. pull for notifications, database choices (SQL vs. NoSQL), and how to scale WebSocket servers horizontally. Mention monitoring and failure handling.

Key Points to Mention

  • Use WebSockets for real-time bidirectional communication and a pub/sub system like Redis or Kafka for message distribution.
  • Store messages in a database with appropriate indexing for efficient retrieval of unread messages per user.
  • Track user last login timestamp and unread message count, possibly in a separate service or cache for quick access.
  • Implement a scheduled job (e.g., cron) that runs periodically to identify eligible users and trigger email notifications.
  • Ensure idempotency in email sending to avoid duplicates, and respect user notification preferences.
  • Consider scalability: partition WebSocket connections, use message queues to decouple services, and handle failures gracefully.

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