Scaling AI Applications and Controlling Inference Costs: Lessons from Large-Scale LLM Deployments
This article examines how to scale AI applications to millions of daily active users while keeping inference costs under control. Drawing on recent earnings data, operational metrics, and industry examples, it explains why tokens have become the primary capacity unit for LLM systems, how to build capacity plans across the entry, inference, and cost layers, and five practical levers for cost governance: input compression, prefix caching, tiered routing, batching, and result caching. It also outlines a layered architecture for office AI agents, engineering considerations for multimodal generation, and a deployment checklist focused on cost visibility, load testing, and observability. The core takeaway is that AI competition has shifted from model parameters to the engineering of unit cost and reliability.
1. What Earnings Data Reveals About AI Investment
A recent quarterly report from an internet company showed revenue growth of roughly 8% year over year, while operating profit declined slightly. Excluding a newly incubated AI assistant product line, core operating profit still grew. The signal is clear: AI investment compresses margins in the short term, but the underlying business remains solid. For developers, this is not financial news but a capacity planning signal—when a company is willing to trade profit for inference compute, high-concurrency AI applications have entered real production.
More telling are a few quantifiable operational metrics: an office-focused AI agent surpassed 10 million daily active users, with daily token consumption exceeding 10 billion, and combined monthly active users across multiple platforms above 30 million, ranking first in its category. Management has also stressed internally that failing to embrace the intelligent revolution means being disrupted by it. Put together, the engineering conclusion is that the bottleneck has shifted from “can the model answer” to “can it keep answering for 10 million people at an acceptable cost.”
2. Tokens as the New Capacity Unit
Traditional internet systems measure capacity in QPS, bandwidth, and storage. In LLM applications, tokens are a closer proxy for cost. 10 billion tokens per day implies an average consumption above 100,000 tokens per second, with highly uneven distribution: morning peaks from meeting notes, weekly report generation, and cross-document retrieval create spikes, with peak-to-trough ratios often several times over.
Capacity planning therefore needs three perspectives:
- Entry layer: rate limiting and queuing based on concurrent sessions and time to first token (TTFT);
- Inference layer: batching and replica elasticity based on token throughput and GPU memory usage;
- Cost layer: financial accounting based on cost per million tokens and cache hit rate.
An illustrative capacity estimation logic can be written as:
# Illustrative capacity estimation only; not any vendor's APIpeak_tps = daily_tokens / 86400 * peak_ratio # peak token throughputreplicas = ceil(peak_tps / per_replica_tps) # throughput per replicacost_per_day = daily_tokens / 1e6 * price_per_million
Here peak_ratio is typically 3–5, and per_replica_tps must come from your own load testing rather than copied from others.
3. Five Levers for Inference Cost Governance
- Input compression: structured extraction and deduplication for long documents; cutting redundant context by 30% or more is not uncommon.
- Prefix caching: keep system prompts, tool descriptions, and knowledge base snippets stable so KV Cache can be reused, significantly reducing repeated computation.
- Tiered routing: send lightweight tasks such as intent recognition and format validation to smaller models, escalating to larger models only for complex reasoning.
- Batching and scheduling: separate interactive requests from offline batch jobs, using throughput-first batching windows for offline work.
- Result caching: build a semantic cache for high-frequency questions, returning on hit, with invalidation policies to avoid stale answers.
Combined, these five typically bring unit business cost down to around 40% of the original, but actual numbers must come from your own load testing.
4. A Layered Architecture for Office AI Agents
Office scenarios became the first category to break 10 million DAU because task boundaries are clear and feedback is verifiable. A robust layered architecture looks like this:
- Access layer: a unified multi-platform gateway handling authentication, rate limiting, and canary releases;
- Orchestration layer: task planning, tool invocation, failure retries, and human handoff;
- Capability layer: document parsing, retrieval augmentation, spreadsheet computation, and code execution sandboxes;
- Data layer: object storage for raw files, message queues for peak shaving, and logging, monitoring, and alerting for observability.
The orchestration layer is the easiest place to lose control. Set a maximum step count and timeout budget for each task to avoid infinite tool-calling loops:
{"max_steps": 8,"timeout_ms": 20000,"tool_retry": 1,"fallback": "ask_user"}
5. Multimodal Generation and Digital Human Content Production
In the same period, an AI platform released a new generation image generation model with APIs opened to enterprise customers and developers, showing that multimodal generation is moving from demos to programmable workflows. Three engineering concerns stand out: first, the uncertainty of generated output requires automated quality checks and human spot checks; second, copyright and compliance require traceability of training and generated material; third, cost—compute for image and video generation is far higher than for text, so quota management is needed.
The entertainment industry offers an interesting sample: a South Korean entertainment technology company plans to launch a robot girl group, alongside virtual AI and human girl groups, with a robot concert in Macau and a tour including Dubai and Tokyo. Such scenarios demand real-time motion synchronization, low-latency rendering, and large-scale concurrent live streaming distribution—essentially a combined stress test of multimodal generation plus edge distribution.
6. Deployment Checklist
- Is there a cost dashboard and budget alerting centered on tokens?
- Has peak load been tested with at least 3x headroom?
- Are tiered model routing and prefix caching implemented?
- Is there quality checking and compliance traceability for multimodal generation?
- Does observability cover latency, failure rate, and unit cost?
The conclusion is straightforward: competition in AI applications has shifted from model parameters to the engineering of unit cost and stability. Treating tokens as the capacity unit and caching and routing as first-class citizens is what keeps systems sustainable at the scale of tens of millions of daily active users.
