PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/ML System Design/OpenAI

Design ChatGPT homepage with streaming choices

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system-design competency for real-time LLM-backed web applications, focusing on streaming architectures, frontend-backend integration, authentication and secret management, rate limiting, conversation state persistence, and observability.

  • hard
  • OpenAI
  • ML System Design
  • Software Engineer

Design ChatGPT homepage with streaming choices

Company: OpenAI

Role: Software Engineer

Category: ML System Design

Difficulty: hard

Interview Round: Technical Screen

Design the ChatGPT-style homepage end to end. Describe the frontend and backend architecture required to stream model outputs to the browser. Compare Server-Sent Events (SSE) and WebSockets for streaming tokens: when to use each, trade-offs in latency, reliability, backpressure, reconnection, and browser support. Show how you would integrate a Chat Completions API, including authentication, rate limiting, conversation state storage, streaming tokenization, error handling and retries, observability (logs/metrics/traces), and scalability/cost considerations.

Quick Answer: This question evaluates system-design competency for real-time LLM-backed web applications, focusing on streaming architectures, frontend-backend integration, authentication and secret management, rate limiting, conversation state persistence, and observability.

Related Interview Questions

  • Design a Text-to-Video Generation Service - OpenAI (medium)
  • Design a Text-to-Video Generation System - OpenAI (hard)
  • Design a Real-Time Sensor Intelligence System - OpenAI (medium)
  • Mine Novel Images from Unlabeled Data - OpenAI (medium)
  • Design a GPU-Efficient Video Service - OpenAI (medium)
OpenAI logo
OpenAI
Jul 27, 2025, 12:00 AM
Software Engineer
Technical Screen
ML System Design
5
0

System Design: ChatGPT‑Style Homepage with Streaming

Goal

Design a ChatGPT‑style web homepage end to end. Users should type a prompt and see the model’s response stream token‑by‑token in the browser.

Requirements

  • Frontend
    1. Render a chat UI (messages, input box, streaming cursor, retry/stop, multi‑tab resilience).
    2. Stream tokens to the UI with low latency and graceful reconnection.
    3. Persist conversations and support pagination/search.
  • Backend
    1. Provide a server endpoint that calls a Chat Completions API with streaming.
    2. Authenticate users and protect provider credentials.
    3. Rate limit users and enforce token/concurrency budgets.
    4. Store conversation state (messages, metadata, token counts).
    5. Stream tokens to the browser (SSE or WebSockets) with backpressure, retries, and timeouts.
    6. Log, metric, and trace requests end‑to‑end; scale under load with cost controls.

Streaming Transport Comparison

Describe when to use SSE vs WebSockets for streaming tokens, including trade‑offs in:

  • Latency
  • Reliability and ordering
  • Backpressure handling
  • Reconnection semantics
  • Browser/proxy support and operational complexity

Integration Details

Show how you would integrate a Chat Completions API, including:

  • Authentication (user identity and server‑to‑provider secrets)
  • Rate limiting (per user/IP, concurrency, token budgets)
  • Conversation state storage (schema, summarization, limits)
  • Streaming tokenization path (upstream to backend to browser)
  • Error handling and retries (transient vs permanent)
  • Observability (logs, metrics, traces)
  • Scalability and cost considerations

Provide concrete architectural choices, sequence of events, and concise code snippets or pseudocode to illustrate the streaming path for both SSE and WebSockets.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More OpenAI•More Software Engineer•OpenAI Software Engineer•OpenAI ML System Design•Software Engineer ML System Design
PracHub

Master your tech interviews with 8,500+ 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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.