Support in-place update for service gateway - #4221
Merged
Merged
Conversation
The `gateway` property in service configurations can now be updated in-place. ```shell $ dstack apply -f my-service.dstack.yml Active run my-service already exists. Detected changes that can be updated in-place: - Configuration properties: - gateway Update the run? [y/n]: y NAME BACKEND GPU PRICE STATUS SUBMITTED my-service aws (us-east-2) - $0.0005 (spot) running 09:22 my-service provisioning completed (running) Service is published at: http://my-service.second-gateway.example.com ``` This allows you to reassign a service to a different gateway without stopping the service. ```shell $ dstack event [2026-08-27 09:28:33] [run my-service, gateway second-gateway] Service assigned to gateway [2026-08-27 09:28:33] [👤admin] [run my-service] Run updated. Deployment: 1. Changed fields: configuration.gateway [2026-08-27 09:28:39] [run my-service, gateway-replica first-gateway-0] Service unregistered [2026-08-27 09:28:39] [job my-service-0-0, gateway-replica first-gateway-0] Service replica unregistered [2026-08-27 09:28:41] [run my-service, gateway-replica second-gateway-0] Service registered [2026-08-27 09:28:41] [job my-service-0-0, gateway-replica second-gateway-0] Service replica registered ``` Migrating between gateways would typically result in service downtime while you are rerouting your client traffic to the new gateway. During reassignment, the service may also be unavailable on both gateways for a brief period (several seconds). Migration from a gateway to running without a gateway (`gateway: false`) and vice versa is also supported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
gatewayproperty in service configurationscan now be updated in-place.
This allows you to reassign a service to a
different gateway without stopping the service.
Migrating between gateways would typically result
in service downtime while you are rerouting your
client traffic to the new gateway. During
reassignment, the service may also be unavailable
on both gateways for a brief period (several
seconds).
Migration from a gateway to running without a
gateway (
gateway: false) and vice versa is alsosupported.
#2523 #3924