---
title: Update an endpoint's configuration in Model Serving
description: Update the served models, compute, and traffic split of a Model Serving endpoint from the MLflow Deployments SDK, the Serving UI, or the REST API.
canonical_url: https://docs.databricks.com/gcp/en/machine-learning/model-serving/update-endpoint-configuration
---

# Update an endpoint's configuration in Model Serving

After you create an endpoint, you can update its compute configuration. This is useful when your model needs more resources. Workload size and compute configuration set the resources allocated to your model.

Update the endpoint with one of these methods:

* [Update with the MLflow Deployments SDK](https://docs.databricks.com/gcp/en/machine-learning/model-serving/update-endpoint-configuration.md#update-mlflow-sdk)
* [Update in the Serving UI](https://docs.databricks.com/gcp/en/machine-learning/model-serving/update-endpoint-configuration.md#update-serving-ui)
* [Update with the REST API](https://docs.databricks.com/gcp/en/machine-learning/model-serving/update-endpoint-configuration.md#update-rest-api)

## Before you update

> [!NOTE]
>
> Configuration and served-entity updates re-validate the endpoint's recorded creator workspace membership and per-served-entity grants. Confirm both still hold before you submit an update. See [Check the permissions an endpoint needs](https://docs.databricks.com/gcp/en/machine-learning/model-serving/create-manage-serving-endpoints.md#permissions).
>
> To avoid update failures:
>
> * Use a long-lived service principal owned by your team as the endpoint creator.
> * Do not use a personal user account that might be deactivated or removed from the workspace later.
> * The recorded creator must remain a workspace member for the lifetime of the endpoint.

> [!NOTE]
>
> Updates to the endpoint configuration can fail. When failures occur the existing active configuration stays effective as if the update didn’t happen.
>
> Verify that the update was successfully applied by reviewing the [status of your endpoint](https://docs.databricks.com/gcp/en/machine-learning/model-serving/manage-serving-endpoints.md#status).

Until the new configuration is ready, the old configuration keeps serving prediction traffic. While there is an update in progress, another update can't be made.

## <a id="update-mlflow-sdk" />Update with the MLflow Deployments SDK

The MLflow Deployments SDK uses the same parameters as the REST API. See [Update config of a serving endpoint](https://docs.databricks.com/api/workspace/servingendpoints/updateconfig) for request and response schema details. The following code updates the served entity of the `unity-catalog-model-endpoint` endpoint, using a model from the Unity Catalog model registry.

```python
import mlflow
from mlflow.deployments import get_deploy_client

mlflow.set_registry_uri("databricks-uc")
client = get_deploy_client("databricks")

endpoint = client.update_endpoint_config(
    endpoint="unity-catalog-model-endpoint",
    config={
        "served_entities": [
            {
                "entity_name": "catalog.schema.my-ads-model",
                "entity_version": "5",
                "workload_size": "Small",
                "scale_to_zero_enabled": True
            }
        ],
        "traffic_config": {
            "routes": [
                {
                    "served_entity_name": "my-ads-model-5",
                    "traffic_percentage": 100
                }
            ]
        }
    }
)
```

When the update finishes, `state.config_update` is `NOT_UPDATING`.

## <a id="update-serving-ui" />Update in the Serving UI

After you enable a model endpoint, select **Edit** to modify the compute configuration of your endpoint.

![Edit button](https://docs.databricks.com/gcp/en/images/machine-learning/edit-endpoint.png)

You can change most aspects of the endpoint configuration, except for the endpoint name and certain immutable properties.

You can cancel an in-progress configuration update by selecting **Cancel update** on the endpoint's details page.

## <a id="update-rest-api" />Update with the REST API

The following is an endpoint configuration update example using the REST API. See [Update config of a serving endpoint](https://docs.databricks.com/api/workspace/servingendpoints/updateconfig).

Send this request:

```text
PUT /api/2.0/serving-endpoints/{name}/config
```

With this JSON body:

```json
{
  "name": "unity-catalog-model-endpoint",
  "config": {
    "served_entities": [
      {
        "entity_name": "catalog.schema.my-ads-model",
        "entity_version": "5",
        "workload_size": "Small",
        "scale_to_zero_enabled": true
      }
    ],
    "traffic_config": {
      "routes": [
        {
          "served_entity_name": "my-ads-model-5",
          "traffic_percentage": 100
        }
      ]
    }
  }
}
```

## Additional resources

| Resource                                                                                                                                                      | Description                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Create an endpoint for custom models in Model Serving](https://docs.databricks.com/gcp/en/machine-learning/model-serving/create-manage-serving-endpoints.md) | Create an endpoint that serves a custom model.                                    |
| [Manage model serving endpoints](https://docs.databricks.com/gcp/en/machine-learning/model-serving/manage-serving-endpoints.md)                               | Check an endpoint's status, stop and start it, delete it, or set its permissions. |
