Autoscaling Model Deployments using API
You can configure the Model Deployment in Cloudera AI Gateway and Inference to automatically scale down to zero instances when there is no traffic. Scale-to-zero is supported only in Knative deployment mode, which is the default deployment mode.
The following deployment specification shows an example model deployment that
auto-scales between zero and four replicas:
# cat ./examples/mlflow/model-spec-cml-registry.json
{
"namespace": "serving-default",
"name": "mlflow-wine-test-from-registry-onnx",
"spec": {
"source": {
"registrySource": {
"modelId": "yf0o-hrxq-l0xj-8tk9",
"version": 1
}
},
"autoscaling": {
"minReplicas": 0,
"maxReplicas": 4
}
}
}
