179 questions
No questions match those filters.
How would you design a GenAI app to handle 1 million da...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansAt a million daily users, no single model can economically or reliably serve every request, so the design starts with routing: classify traffic by complexity and send the bulk of simple, repetitive queries to a small fast model, reserving the expensive flagship model for the fraction of requests that actually need it. Caching compounds that — a meaningful share of queries repeat verbatim or near-verbatim and never need to reach a model at all.
For the requests that do reach a model, streaming the response as it generates keeps perceived latency low even when total generation time doesn’t change, and pushing anything that isn’t latency-sensitive into an async queue keeps the interactive path fast. Rate limiting per user and horizontal scaling behind load balancers round out the infrastructure side, and none of it is worth much without observability tooling that actually surfaces where the bottlenecks are as traffic grows.
A support app handling a million daily queries split traffic roughly 70/20/10 across a cheap model, a mid-tier model, and a premium model for genuinely hard cases like refunds and complaints, with caching absorbing another 30% of total volume — bringing average cost per query down from around 8 rupees to 2. Model routing was the single change that mattered most.