Skip to content

Gateway state sync mechanism - #4135

Draft
jvstme wants to merge 1 commit into
masterfrom
issue_3959_gateway_state_sync
Draft

Gateway state sync mechanism#4135
jvstme wants to merge 1 commit into
masterfrom
issue_3959_gateway_state_sync

Conversation

@jvstme

@jvstme jvstme commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Introduce a way to reconcile gateway replica state based on the current list of services. This allows newly started or newly recovered gateway replicas to learn about existing services. It also improves fault tolerance, since an unavailable gateway replica no longer blocks the service lifecycle - services and service replicas can still be registered on the remaining healthy gateway replicas.

Behavioral details:

  • Run submission no longer waits for service registration before the run starts provisioning. This has both advantages (provisioning and service registration can happen in parallel) and disadvantages (compute may be provisioned for a service that will be terminated a moment later due to a registration error). This behavior may be revised in the future.
  • A service or a service replica is terminated with the gateway_error termination reason if it failed to be registered on all gateway replicas.
  • If registration succeeded at least on one gateway replica, registration on the remaining gateway replicas will be retried indefinitely.
  • Rolling deployments only proceed with terminating a service replica once the replacement replica is successfully registered on all gateway replicas.
  • Registration and unregistration tracking, including per-gateway-replica registration error messages, is available in events.

#3959

Introduce a way to reconcile gateway replica state
based on the current list of services. This allows
newly started or newly recovered gateway replicas
to learn about existing services. It also improves
fault tolerance, since an unavailable gateway
replica no longer blocks the service lifecycle -
services and service replicas can still be
registered on the remaining healthy gateway
replicas.

Behavioral details:
- Run submission no longer waits for service
  registration before the run starts provisioning.
  This has both advantages (provisioning and
  service registration can happen in parallel) and
  disadvantages (compute may be provisioned for a
  service that will be terminated a moment later
  due to a registration error). This behavior may
  be revised in the future.
- A service or a service replica is terminated
  with the `gateway_error` termination reason if
  it failed to be registered on all gateway
  replicas.
- If registration succeeded at least on one
  gateway replica, registration on the remaining
  gateway replicas will be retried indefinitely.
- Rolling deployments only proceed with
  terminating a service replica once the
  replacement replica is successfully registered
  on all gateway replicas.
- Registration and unregistration tracking,
  including per-gateway-replica registration error
  messages, is available in events.
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