Skip to content

Support in-place update for service gateway - #4221

Merged
jvstme merged 1 commit into
masterfrom
pr_service_gateway_in_place_update
Aug 27, 2026
Merged

Support in-place update for service gateway#4221
jvstme merged 1 commit into
masterfrom
pr_service_gateway_in_place_update

Conversation

@jvstme

@jvstme jvstme commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

The gateway property in service configurations
can now be updated in-place.

$ 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.

$ 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.

#2523 #3924

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.
@jvstme
jvstme merged commit d137594 into master Aug 27, 2026
27 checks passed
@jvstme
jvstme deleted the pr_service_gateway_in_place_update branch August 27, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant