Designing a ChatGPT-Scale Chatbot: Stateless Services, Streaming, and Cost Control
The article outlines a system design for a chatbot that serves millions of users, handling messages, conversation memory, and streamed replies in under a second. Its core principle is that the language model itself is stateless, with memory, history, and safety handled by separate services. The author notes that output tokens are far more expensive than input tokens, so long responses drive costs more than long chat histories. Prompt caching and streaming responses over server-sent events are highlighted as key levers for lowering expense and improving perceived speed. The design targets 500,000 messages per day for version one while being built to scale toward much larger volumes.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in