Loading video player...
Neon: https://get.neon.com/AcyDooF Article version https://tinyurl.com/ykrbxan2 Become a senior software engineer with a job guarantee: https://tinyurl.com/cyk6umb6 Learn how ChatGPT's architecture handles 200 million daily users with streaming responses, a single PostgreSQL primary, and $59 million/month infrastructure. ⏱️ Timestamps: 0:00 Intro: Scale and scope of ChatGPT 2:26 Clarifying Requirements 7:18 Front-end Design 11:13 WebSockets vs. Server-Sent Events (SSE) 15:25 Functional and Non-Functional Requirements 19:47 Capacity Planning 26:40 High-Level System Architecture 32:40 Database Scaling: Why OpenAI doesn't shard 37:54 Database Schema and Indexing Strategy 42:44 Database Choice: PostgreSQL, MongoDB, or Neon 54:16 Scaling Stages: From 0 to 800M+ Users 58:22 API Design and Endpoint Structure 1:03:34 Messaging Flow and SSE Implementation 1:06:21 Rate Limiting: Tokens vs. Requests 1:10:36 Infrastructure Cost Estimations (GPU, DB, Bandwidth) 1:15:29 Review: Meeting Non-Functional Requirements