Scaling LLM Services: Multi-Tier Routing, Agent Clusters, and Safe Rollouts
This article outlines a general architecture for serving large language models at scale. It covers tiered model routing and scenario-based scheduling, Agent clusters for complex multi-step tasks, and gray releases with monitoring, rollback, and implementation checklists. All configurations and values are treated as architectural assumptions rather than confirmed product specifications.
This article does not use the claim that “a general-purpose LLM has reached 2.5 trillion parameters” as a basis for judgment. That number is currently an industry rumor and has not been officially confirmed. The discussion here focuses on general architectural approaches for supporting large-scale model services. All configurations and values in this article are architectural assumptions and do not represent the real parameters of any company’s unreleased products.
LLM service architecture can be broken down into three questions: which model should handle a request, how complex tasks should be decomposed and executed, and how a new model should be safely launched. These are discussed in order below.
1. Multi-Tier Model Routing and Scenario-Based Scheduling
(1) Motivation for Tiered Design
When a single model handles all requests, even simple Q&A consumes compute from a large-parameter model, which increases both cost and latency. A common approach is to divide models into several tiers, with each tier corresponding to a class of tasks. Higher tiers handle long-chain reasoning, document generation, and code writing, while lower tiers handle short Q&A and lightweight rewriting. The goal of tiering is to match each request type with appropriate resources.
(2) Typical Differences Between Tiers
The table below gives examples by task type. Latency and cost values are order-of-magnitude assumptions; actual values should be replaced with load-test results and billing data.
| Tier | Typical tasks | Latency target (example) | Relative cost per call (example) | Routing field values |
|---|---|---|---|---|
| Heavy-load model | Presentation generation, website code generation, deep research, long-document analysis | Tens of seconds, with streaming output support | High | scenario: SCENARIO_HEAVY_COMPUTE, agent_mode: TYPE_ULTRA |
| General-purpose model | Daily writing, medium-length Q&A, structured extraction | Seconds | Medium | scenario: SCENARIO_HEAVY_COMPUTE, agent_mode: TYPE_NORMAL |
| Fast-chat model | Instant Q&A, casual chat, simple translation | Sub-second first-token response | Low | scenario: SCENARIO_FAST_CHAT, agent_mode: TYPE_NORMAL |
(3) Gateway Routing Implementation
The gateway selects a backend resource pool based on the scenario and agent_mode fields in the request. Below is an example configuration response:
{"default_scenario": "SCENARIO_HEAVY_COMPUTE","available_models": [{"key": "ultra-model","display_name": "High-Parameter Agent Cluster","scenario": "SCENARIO_HEAVY_COMPUTE","agent_mode": "TYPE_ULTRA"},{"key": "default-model","display_name": "General-Purpose LLM","scenario": "SCENARIO_HEAVY_COMPUTE","agent_mode": "TYPE_NORMAL"},{"key": "lite-model","display_name": "Agile Fast-Chat Model","scenario": "SCENARIO_FAST_CHAT","agent_mode": "TYPE_NORMAL"}]}
scenario is a business scenario label. It describes what business scenario a class of requests belongs to, and it does not itself identify user intent. Intent recognition should be placed in the front layer of the gateway and handled by a lightweight classifier or rules; the classification result is then written into scenario. agent_mode determines the scale of backend resources: TYPE_NORMAL uses single-pass inference, while TYPE_ULTRA enters the Agent cluster.
Routing effectiveness depends on a clear label taxonomy and measurable classification results. Before launch, prepare an offline evaluation set, measure classification accuracy, and set a default tier for requests that cannot be determined. Misclassification has two manifestations: simple tasks consume heavy resources, or complex tasks are downgraded. Both cases need to be detected through logs.
2. Agent Clustering and Deep Task Execution
Normal mode usually relies only on the model’s own parameters to generate an answer. In Ultra mode, the system calls external tools and splits batch tasks across multiple execution units. This mode is suitable for large-scale retrieval, batch document processing, and other tasks that require multiple steps and long running times.
(1) Architecture Components
- Task planner: decomposes user requirements into a sequence of subtasks with dependencies.
- Concurrent execution engine: dynamically allocates compute nodes through a container orchestration system such as Kubernetes, and concurrently calls external APIs or vector retrieval services.
- State and memory management: stores intermediate results and context in batch tasks to ensure consistency across multi-step execution.
- Message queue: delivers subtasks asynchronously to execution units, smooths traffic peaks, and supports failed retries.
(2) Security Boundaries
The ability of an Agent to call tools means it can affect real systems. Security design should therefore precede feature expansion. At minimum, the following four items should be implemented:
- Tool allowlist: only registered interfaces may be called, and new tools require approval.
- Permission isolation: each subtask uses independent least-privilege credentials with an expiration time.
- Timeouts and retries: set a timeout for each tool call. Retries are only for idempotent operations and use exponential backoff.
- Audit logs: record the caller, input, output summary, and time of each tool call, with a log retention period that meets compliance requirements.
3. Gray Release and Rollback
Launching an ultra-large model is not just about replacing model files. The inference cluster, billing system, membership entitlements, and frontend copy all need to align with model switches. If frontend entry points go live before backend capabilities, users will see features that cannot be used. The release plan should therefore manage these items in the same change ticket.
(1) Staged Rollout
A common approach is to gradually introduce the new model by percentage, for example 1%, 5%, 20%, 50%, and 100%. Each stage remains for a period and only moves to the next stage after exit conditions are met. The values below are examples and should be based on the online baseline.
(2) Monitoring Metrics and Thresholds
- Inference latency: P95 latency increases by more than 20% relative to baseline.
- Error rate: the ratio of 5xx responses or timeouts exceeds 0.5%.
- GPU memory: GPU memory utilization remains above 85%.
- First-token latency: the first-token response time of the fast-chat model exceeds 1 second.
- Business metrics: session interruption rate and user-initiated retry rate rise significantly.
(3) Rollback Trigger Conditions
If any core metric exceeds its threshold for 5 consecutive minutes, rollback is triggered. Rollback switches back to the old version routing through the API gateway configuration center, with a target of completing the switch within one minute. Old version instances should be retained until the observation period ends.
(4) Release Checklist
| Checklist item | Content | Responsible role |
|---|---|---|
| Rollout plan | Ratios, dwell time, and exit conditions for each stage | Platform engineering |
| Monitoring and alerting | Metrics, thresholds, and alert recipients | SRE |
| Routing configuration | Mapping between scenario and agent_mode, and default tier | Platform engineering |
| Billing and entitlements | Billing rules and membership entitlements consistent with model switches | Product and finance |
| Frontend copy | Entries and campaign pages opened only after backend capabilities are ready | Operations |
| Rollback drill | Complete a switch-back drill before launch | SRE |
| Evaluation set | Before-and-after comparison results | Algorithm team |
4. Summary and Implementation Recommendations
LLM services are moving from a single chat box toward systems engineering that includes multi-tier routing, Agent scheduling, and staged releases. Teams preparing to implement this can proceed in the following order:
- Define tiers and routing labels first, build a classification evaluation set, and then consider scaling.
- Bind each gray-release stage to quantifiable exit conditions instead of scaling based on experience.
- Before launching Agents, complete tool allowlists, permission isolation, and audit logs, and then open high-risk tools.
Risk note: Both routing and Agents depend on upstream judgment. When that judgment is wrong, users are the first to notice.
