← Openai Interview Insights

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

SeniorPrefer not to say
Apr 2026

Summary

System design round at OpenAI for a software engineer role, focused entirely on LLM inference serving at scale. One long, dense question with a lot of moving parts. The kind of interview where you realize halfway through that you've been talking about the wrong layer.

Questions Asked (1)

Q1

Design an online inference serving system for a GPT-style large language model. The system needs to handle around 100K concurrent requests across a GPU fleet with near real-time latency constraints. Cover the API and request data flow, whether requests should be persisted, failure handling and retry logic, how to avoid duplicate inference when batches overlap, and dynamic batching on GPU. Also discuss which components are actually necessary given the latency budget versus what you'd skip.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one sprawled.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (latency SLO, throughput, model size, GPU types), then walk through the end-to-end request flow from API gateway to GPU inference, highlighting key design decisions like stateless vs stateful, batching, and failure handling. Emphasize trade-offs, especially what to skip given the tight latency budget, and justify each component's necessity.

Pro tip: Focus on the latency budget: for near real-time, avoid synchronous persistence and complex retry logic; instead, use idempotent request IDs and client-side retries with exponential backoff. Also, mention that dynamic batching must balance latency and throughput, often using a small max batch size and a short timeout (e.g., 10ms).

1. Clarify Requirements and Constraints

Ask about latency SLO (e.g., p99 < 200ms), throughput (100K concurrent), model size, GPU types, and whether requests are stateless. This sets the stage for design decisions.

2. Design API and Request Flow

Outline a stateless API gateway that authenticates, rate-limits, and routes requests to inference servers. Use a load balancer to distribute across GPU fleet, and consider a queue for buffering if needed.

3. Address Persistence and Failure Handling

Decide if requests need persistence: for real-time, skip synchronous DB writes; use in-memory queues or logs for debugging. Implement idempotency keys to avoid duplicate inference, and client-side retries with backoff for failures.

4. Implement Dynamic Batching on GPU

Describe how to batch requests on the GPU: collect requests within a short window (e.g., 10ms) up to a max batch size, then run inference. Ensure no duplicate inference by deduplicating based on request ID before batching.

5. Justify Necessary vs Skippable Components

Given latency budget, skip components like synchronous persistence, complex orchestration, or multi-region failover. Keep essential: load balancer, batching, idempotency, and monitoring.

Key Points to Mention

  • Stateless API gateway with authentication, rate limiting, and routing
  • Dynamic batching with timeout and max batch size to balance latency and throughput
  • Idempotency keys to prevent duplicate inference when retries or overlapping batches occur
  • Client-side retries with exponential backoff instead of server-side retry queues
  • Skip synchronous persistence; use in-memory logging or async writes for debugging
  • Load balancing across GPU fleet and health checks for failure detection

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