The Chatbot Went Viral
Easy · system design problem
The support chatbot trends on social media: 6× the questions, most of them the same few. Each answer needs a 30 ms nearest-neighbour search.
The support chatbot embeds each question and runs a nearest-neighbour search on a 4-shard vector database before calling the LLM. At T+20s it trends on social media: questions rise 6× for the rest of the day — mostly the same handful about one outage. Each replica keeps the whole HNSW index in RAM (2 TB) and takes hours to build; re-sharding means rebuilding the index.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.