You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though green has 0% of traffic allocated, you can still invoke the endpoint and deployment with [json](https://github.com/Azure/azureml-examples/blob/main/sdk/endpoints/online/model-2/sample-request.json) file.
Once you've tested your `green` deployment, you can copy (or 'mirror') a percentage of the live traffic to it. Mirroring traffic doesn't change results returned to clients. Requests still flow 100% to the blue deployment. The mirrored percentage of the traffic is copied and submitted to the `green` deployment so you can gather metrics and logging without impacting your clients. Mirroring is useful when you want to validate a new deployment without impacting clients. For example, to check if latency is within acceptable bounds and that there are no HTTP errors.
279
276
280
-
Now, your green deployment will receive 10% of requests.
277
+
> [!WARNING]
278
+
> Mirroring traffic uses your [endpoint bandwidth quota](how-to-manage-quotas.md#azure-machine-learning-managed-online-endpoints) (default 5 MBPS). Your endpoint bandwidth will be throttled if you exceed the allocated quota. For information on monitoring bandwidth throttling, see [Monitor managed online endpoints](how-to-monitor-online-endpoints.md#metrics-at-endpoint-scope).
281
279
282
-
1. Send alltraffic to your new deployment:
280
+
The following command mirrors 10% of the traffic to the `green` deployment:
283
281
284
-
Once you're satisfied that your green deployment is fully satisfactory, switch all traffic to it.
282
+
```python
283
+
endpoint.mirror_traffic = {"green": 10}
284
+
ml_client.begin_create_or_update(endpoint)
285
+
```
285
286
286
-
```python
287
-
endpoint.traffic = {"blue": 0, "green": 100}
288
-
ml_client.begin_create_or_update(endpoint)
289
-
```
287
+
> [!IMPORTANT]
288
+
> Mirroring has the following limitations:
289
+
>* You can only mirror traffic to one deployment.
290
+
>* A deployment can only be set to live or mirror traffic, not both.
291
+
>* Mirrored traffic isnot currently supported with K8s.
292
+
>* The maximum mirrored traffic you can configure is50%. This limit is to reduce the impact on your endpoint bandwidth quota.
290
293
291
-
1. Remove the old deployment:
294
+
:::image type="content"source="./media/how-to-safely-rollout-managed-endpoints/endpoint-concept-mirror.png" alt-text="Diagram showing 10% traffic mirrored to one deployment.":::
0 commit comments