AI Inference Capacity Planning for AI Applications with 10 Million Daily Active Users

    A practical engineering guide to scaling AI applications to 10 million daily active users and billions of daily tokens. It covers capacity planning based on peak traffic rather than averages, a layered inference pipeline with semantic caching and model routing, batching and scheduling strategies, cost observability, and a four-stage rollout plan to avoid common scaling mistakes.

    1. From “10 Million DAU” to Concrete Engineering Metrics

    A recent industry signal is worth noting: an AI coding and office application disclosed that its daily active users have surpassed 10 million, with daily token consumption exceeding 10 billion. Measured purely by total daily LLM token consumption, this puts the application among the largest AI applications in the market.

    For developers, the value of this data point is not the ranking. It is that it translates abstract business growth into computable engineering metrics. A rough order-of-magnitude estimate:

    • 10 million DAU and 10 billion tokens per day means roughly 1,000 tokens per user per day.
    • Spread evenly across an 8-hour workday, the average throughput is about 35,000 tokens per second.
    • Real traffic is long-tailed, with a clear morning peak and an afternoon peak. A peak factor of 3–5 is not unreasonable, meaning the system must sustain 100,000–170,000 tokens per second at peak.

    These numbers immediately expose a real constraint: single-GPU inference throughput is typically measured in thousands of tokens per second. Reaching the peak above requires a sizable compute pool and a mature scheduling system. In other words, “10 million DAU” is not marketing language. It is a hard requirement on inference cluster capacity, cache hit rate, and the cost model.

    2. Token Throughput Capacity Planning: Do the Math Before Choosing Hardware

    The first principle of capacity planning is not to design for the average. A recommended process:

    1. Define the business metrics. Separate input (prompt) tokens from output (completion) tokens. Their compute costs are asymmetric: input can be parallelized and cached, while output is autoregressive decoding, with latency growing linearly with length.
    2. Build a peak model. Estimate request volume with peak QPS ≈ DAU × requests per user / active seconds × peak factor, then multiply by average tokens per request to get the throughput target.
    3. Work backward to resource size. Use measured per-instance throughput as the baseline, divide by the target throughput, then divide by the expected utilization (keep it at no more than 60%–70% to leave headroom for failures and bursts).
    4. Validate the long tail. Long-context requests significantly increase memory usage and queueing time and must be modeled separately, not folded into the average.

    An illustrative capacity calculation script:

    1. def capacity_plan(dau, tokens_per_user, active_hours=8, peak_factor=4.0,
    2. tokens_per_req=1000, per_instance_tps=4000, util=0.65):
    3. avg_tps = dau * tokens_per_user / (active_hours * 3600)
    4. peak_tps = avg_tps * peak_factor
    5. qps = peak_tps / tokens_per_req
    6. instances = peak_tps / (per_instance_tps * util)
    7. return {"avg_tps": round(avg_tps), "peak_tps": round(peak_tps),
    8. "peak_qps": round(qps, 1), "instances": int(instances) + 1}

    The conclusion is often counterintuitive: the real bottleneck is not the unit price of compute but idle resources caused by the gap between peak and trough. Elastic scaling matters more than simply adding GPUs.

    3. Layered Inference Pipeline: Eliminate Repeated Computation at the Source

    A significant share of 10-billion-scale token consumption is usually duplicate or highly similar requests. Layered filtering is the most cost-effective optimization:

    • Request layer: validate parameters and enforce quotas. Reject illegal or over-frequency requests outright to avoid wasted compute.
    • Semantic cache layer: return cached results for identical or near-identical questions, skipping inference on a hit. In practice, use vector similarity with a threshold, and maintain a human regression set for the threshold to prevent false hits.
    • Prefix reuse layer: turn fixed prefixes such as system prompts, tool descriptions, and coding standards into reusable context to avoid re-encoding them every time.
    • Model routing layer: send simple tasks to smaller models or lightweight classifiers, and escalate only complex tasks to larger models. Routing policies should support gradual rollout and rollback.

    An illustrative routing and cache decision:

    1. def route(req, cache, router):
    2. hit = cache.lookup(req.text, threshold=0.93)
    3. if hit:
    4. return hit.answer, "cache"
    5. tier = router.classify(req) # "small" | "large"
    6. ans = infer(req, model=tier)
    7. cache.store(req.text, ans, ttl=3600)
    8. return ans, tier

    Note that cache hit rate and routing accuracy must be monitored as first-class metrics. Otherwise, optimization becomes a black-box guessing game.

    4. Batching and Scheduling: Rebalancing Throughput and Latency

    Autoregressive decoding is naturally suited to batching, but larger batches increase latency. A workable approach is to set a latency budget, maximize batch size within that budget, and split long requests into chunks or isolate them in separate queues so one long-context request cannot drag down an entire batch. Scheduling recommendations:

    • Priority queues: prioritize interactive requests and use offline batch jobs to fill troughs.
    • Timeouts and degradation: after a timeout, return a simplified result or a retry prompt rather than queuing indefinitely.
    • Backpressure: when queue水位 exceeds a threshold, send a rate-limiting signal upstream to protect the backend.

    5. Cost Observability: Attribute Every 100 Million Tokens

    No measurement, no optimization. A minimum viable observability system should include three types of data: request-level (user, scenario, input and output tokens, latency, cache hit or not), instance-level (utilization, memory, queueing time), and cost-level (token unit price and total by business line). On this basis, build three dashboards: cost per request, cache hit rate, and peak/trough resource utilization. Before and after any optimization ships, compare on the same dashboard instead of tuning by feel.

    On the collection side, you only need instrumentation, with no dependency on a specific vendor API:

    1. record = {"scene": "code_completion", "in_tokens": 812, "out_tokens": 96,
    2. "cache": False, "latency_ms": 640, "model_tier": "small"}
    3. metrics.increment("token.consumed", record["in_tokens"] + record["out_tokens"],
    4. tags=record)

    6. Rollout Plan and Common Pitfalls

    A four-stage rollout is recommended. Stage one is measurement only, to understand the real token distribution. Stage two adds semantic caching and prefix reuse, which typically delivers the most obvious cost savings. Stage three adds model routing and elastic scaling to smooth peaks and fill troughs. Only in stage four should you consider building or fine-tuning small models in-house, because without the first three stages done solidly, in-house efforts often just move complexity earlier.

    Three common pitfalls: procuring resources based on average traffic; treating the cache threshold as a fixed constant and never regression-testing it; and monitoring only latency but not token cost, which leads to acceptable user experience but an out-of-control bill.

    7. Conclusion

    The real lesson from “10 million DAU and 10 billion daily tokens” is that competition among AI applications has shifted from a single point of model capability to a systemic contest of compute efficiency and engineering maturity. Get capacity planning, layered caching, scheduling and batching, and cost observability right, and you will not be forced into reactive scaling when traffic grows tenfold. On general-purpose cloud infrastructure, standard capabilities such as container platforms, message queues, object storage, log services, and monitoring and alerting are enough to support this architecture. The key is unified metric definitions and a continuously running optimization loop.