PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/System Design/Optiver

Design a subscription push service

Last updated: Apr 19, 2026

Quick Overview

Design a subscription push service evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  • hard
  • Optiver
  • System Design
  • Software Engineer

Design a subscription push service

Company: Optiver

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design an object-oriented publish/subscribe notification service for user–topic subscriptions. Implement APIs: addSubscription(userId, topicId), unsubscribe(userId, topicId), publishNews(topicId, newsId, payload), and onNewsReceived(userId, newsId) to acknowledge delivery. Ensure each published item is delivered at most once to currently subscribed users, that unsubscribes prevent future deliveries, and provide per-topic per-user ordering guarantees. Describe class/interface design, in-memory and persistence data models, concurrency control, failure handling, and how you would scale to millions of users. Analyze the time and space complexity of core operations.

Quick Answer: Design a subscription push service evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

Related Interview Questions

  • Design low-latency trading infrastructure - Optiver (hard)
  • Design a topic-based news subscription system - Optiver (hard)
  • Design a satellite propagation simulator - Optiver (hard)
|Home/System Design/Optiver

Design a subscription push service

Optiver logo
Optiver
Jul 17, 2025, 12:00 AM
hardSoftware EngineerTechnical ScreenSystem Design
54
0

Design a subscription push service

Object-Oriented Design: Publish/Subscribe Notification Service

Design an object-oriented publish/subscribe notification service for user–topic subscriptions.

Provide the following APIs:

  • addSubscription(userId, topicId)
  • unsubscribe(userId, topicId)
  • publishNews(topicId, newsId, payload)
  • onNewsReceived(userId, newsId) // client acknowledgement

Requirements:

  1. Delivery semantics
    • Each published item is delivered at most once to users who are subscribed at the time of delivery.
    • Unsubscribes prevent any future deliveries for that user–topic pair, including items published earlier but not yet delivered.
    • Per-topic per-user ordering: for a given user and topic, deliver items in the order they were published to that topic.
  2. Design deliverables
    • Class/interface design for the service and its components.
    • In-memory and persistence data models.
    • Concurrency control (ordering, idempotency, race handling).
    • Failure handling (restarts, partial failures, retries policy).
    • Scalability plan to millions of users.
    • Time and space complexity analysis of core operations.

Assume:

  • newsId is unique per topic (idempotency key).
  • Per-topic ordering is defined by a monotonically increasing sequence (offset) assigned at publish time.
  • If a user unsubscribes after a publish but before delivery, do not deliver that item.
  • New subscriptions start from the current end of the topic (no historical replay).

Constraints & Assumptions

  • Preserve the scope, facts, inputs, and requested outputs from the prompt above.
  • If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
  • Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.

Clarifying Questions to Ask

  • Clarify users, core use cases, read/write patterns, scale, latency, availability, and data retention.
  • State explicit assumptions before making sizing or architecture decisions.
  • Prioritize the functional path first, then address reliability, security, observability, and rollout.

What a Strong Answer Covers

  • A scoped requirements summary with concrete non-goals and success metrics.
  • API, data model, architecture, consistency, capacity, and operations.
  • Reasoned trade-offs among simple and scalable designs, including bottlenecks and failure modes.
  • A validation, monitoring, migration, and launch plan appropriate for the risk level.

Follow-up Questions

  • What breaks first at 10x traffic or data volume?
  • How would you degrade gracefully during dependency failures?
  • What metrics and alerts would prove the design is healthy after launch?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Optiver•More Software Engineer•Optiver Software Engineer•Optiver System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.