Update a service
Check your docs version
These docs are for the new Anyscale design. If you started using Anyscale before April 2024, use Version 1.0.0 of the docs. If you're transitioning to Anyscale Preview, see the guide for how to migrate.
This guide covers how to update an Anyscale Service, including:
- Triggering an update to a service.
- Understanding the steps of the update process.
- Configuring the update behavior.
- Applying best practices when updating production services.
Terminology
- Service: an Anyscale-managed set of Ray Serve apps that consist of one or more clusters.
- Rollout: the process of updating a service from its current (primary) version to a new (canary) version.
- Primary version: the main cluster serving traffic for a service with the current configuration options. There is only a primary version in the absence of an ongoing rollout.
- Canary version: a cluster using the new configuration during a rollout. Anyscale gradually shifts traffic toward the canary version until it reaches 100%, at which point the rollout is complete and the canary version becomes the new primary version.
Update a service
To update a service, use anyscale service deploy
. If the service is already running (identified by its name), this command triggers an automatic rollout that does the following:
- Starts a new cluster for the newly deployed service version. The new version is called the canary version.
- Waits for the new cluster and Serve apps to become healthy.
- Gradually shifts traffic from the old cluster, the primary version, to the new cluster, the canary version.
- Completes the rollout and terminates the old cluster.