← 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 engineer role. The main problem was designing a chat system from scratch, and it had more moving parts than I expected going in.

Questions Asked (1)

Q1

Design an internal chat system for StubHub that supports real-time 1:1 messaging, optional group chat, message history, and an email notification pipeline for users who haven't logged in for 10 or more days but have unread messages.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one sprawled fast.

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 with WebSockets and a persistent message store. Next, address group chat and message history retrieval, and finally design the email notification pipeline with a scheduled job that checks for inactive users with unread messages.

Pro tip: Emphasize trade-offs between consistency and availability for message delivery, and discuss how to avoid duplicate email notifications using idempotent processing and a last_notified_at timestamp.

1. Clarify Requirements and Scale

Ask about expected user count, concurrent connections, message volume, and latency requirements. Confirm whether group chat is truly optional and how history should be stored/retrieved.

2. Design Real-Time Messaging Core

Propose a WebSocket-based service for 1:1 and group messaging, with a message queue (e.g., Kafka) for reliable delivery and a database (e.g., Cassandra) for message persistence.

3. Handle Group Chat and History

Extend the design to support group chats by using a fan-out approach or a shared group message stream. For history, discuss pagination, indexing by conversation and timestamp, and caching recent messages.

4. Design Email Notification Pipeline

Create a scheduled service that periodically queries for users inactive for 10+ days with unread messages, then sends email notifications via a queue to avoid duplicates and ensure scalability.

5. Address Trade-offs and Failure Modes

Discuss trade-offs like consistency vs. latency, handling offline users, message ordering, and failure recovery. Mention monitoring and alerting for the notification pipeline.

Key Points to Mention

  • WebSocket for real-time bidirectional communication, with fallback to long polling
  • Message persistence using a distributed database like Cassandra or DynamoDB, with appropriate partitioning
  • Message queue (e.g., Kafka) for decoupling and reliable delivery
  • Group chat implementation via fan-out on write or read, and associated trade-offs
  • Scheduled job (e.g., cron) with idempotent processing to avoid duplicate emails
  • Tracking user activity and unread counts efficiently, possibly using Redis for quick lookups

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