Traffic Policies
Overview
ModelArts real-time inference services provide multi-deployment traffic scheduling capabilities. For multiple deployment instances created under the same real-time inference service, an independent traffic weight value can be configured for each deployment. The platform automatically distributes and routes inference service call requests proportionally based on the relative weight of each deployment. This enables fine-grained O&M control, including model gray releases, A/B testing, failover traffic switching, and on-demand traffic allocation.
For real-time services with existing deployment configurations, you can adjust the traffic weights of each deployment under the current service by modifying the traffic weight settings. The specific rules are as follows:
- Single deployment traffic weight: The traffic weight value for a single deployment must be an integer not exceeding 100.
- Multi-deployment traffic weight allocation: Traffic is routed to different deployments proportionally.
- All deployment traffic weights set to 0: The system automatically distributes traffic evenly across all normally running deployments to ensure service continuity.
- Enable traffic mirroring: The system replicates a fixed percentage (10%) of live traffic to the corresponding deployment for shadow verification, without affecting user requests.
| Use Case | Service Objective | Configuration Method | Value Delivered |
|---|---|---|---|
| Model gray release | Launches a new model version without interrupting services, minimizing failure risks through gradual rollout and validation. |
| Zero-downtime release; controllable risk; completely seamless to users. |
| Online A/B testing | Compares the real-world performance of multiple model versions or strategies to back iterative decisions with data. |
| Leverages live production traffic for objective evaluation, eliminating offline evaluation bias. |
| Traffic mirroring (shadow testing) | Validates the compatibility, performance, and stability of a new version using real traffic without impacting users. |
| Real-world validation with zero service risk; ideal for pre-launch verification of LLMs or critical services. |
| Multi-deployment load balancing & auto scaling | Absorbs peak traffic spikes while saving resources during off-peak hours to maximize utilization and stability. |
| Dynamically adapts to varying workloads, eliminates resource waste, and enhances service availability. |
| Multi-model & multi-service traffic scheduling | Shares infrastructure resources under a single inference endpoint, allocating traffic based on priority or importance. | Core service model deployment: Weight = 70. Secondary/Experimental model deployment: Weight = 30. During resource constraints, lower non-core weights to safeguard core SLAs. | Promotes resource reuse, optimizes infrastructure costs, and establishes clear service priorities. |
| Fast fault isolation & lossless rollback | Mitigates losses immediately when a specific model version experiences anomalies, keeping the overall service safe. | Instantly set the weight of the anomalous deployment to 0. Route 100% of the traffic back to the stable deployment version (Weight = 100). Isolate the problematic deployment for troubleshooting and patching. | Rapid loss mitigation; near-zero service impact; high O&M efficiency. |
| Rapid iteration & validation in test environments | Enables parallel development and testing validation without affecting production traffic. | Production deployment: Weight = 100. Test deployment: Weight unconfigured + traffic mirroring enabled. Validate functionality using shadow traffic before initiating a gradual gray release. | Strong isolation between production and testing; secure and highly efficient iteration cycles. |
Constraints
Mirrored traffic occurs only in synchronous calls, not in asynchronous ones.
Viewing/Modifying Traffic Weights
Log in to the ModelArts console and choose Model Inference > Real-Time Inference.
Method 1:
In the service list, click a service name to enter the service details page. In the Deploy tab of the service details page, you can view the actual traffic percentage of the service. The actual traffic percentage is calculated based on the traffic weight configuration and the deployment status.

In the traffic weight area, click Modify Configuration to modify the traffic percentage of the deployment.
| Parameter | Description |
|---|---|
| Mirrored Traffic | Also called shadow traffic. It is a secure deployment verification function that routes real-time copies of live traffic to a new version, without affecting actual user requests. It provides you with a shadow test environment that is identical to the production environment. Traffic mirroring requires that the service protocol be HTTP/HTTPS. When mirrored traffic is enabled for a deployment, it will no longer receive live traffic. The traffic weight is not used to estimate the traffic percentage. Instead, the system copies 10% of the actual traffic to the deployment using a standard policy. This helps you safely test the model. Ensure that resource quotas are sufficient to handle the mirrored traffic load. Mirrored traffic occurs in synchronous calls, not in asynchronous ones. |
| Traffic Weight | Configure traffic weights for deployments. Requests are routed proportionally. Each deployment's traffic weight must be an integer. Max. value: 100 If all weights are 0, traffic will be evenly split to avoid disruptions. Mirror traffic is not included in weight calculations for actual traffic. Its percentage is fixed by default and cannot be modified. Keep at least one deployment that receives live requests for each service. |
| Estimated Traffic Percentage | The estimated traffic percentage is the ratio of the traffic expected to be received by a single deployment instance group to the total traffic. The actual traffic percentage is calculated based on the traffic weight configuration and the deployment status. |
Method 2:
Method 3:
In the Operation column of the service list page, choose More > Set Traffic Policy to modify the traffic weight.
Click OK.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot