Skip to content

Sync workers with every running router - #4320

Merged
un-def merged 1 commit into
masterfrom
issue_4315_sync_all_sglang_routers
Sep 29, 2026
Merged

un-def merged 1 commit into
masterfrom
issue_4315_sync_all_sglang_routers

Conversation

@un-def

@un-def un-def commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

During a rolling deployment, the replacement router runs alongside the old one, but the worker sync only picked the first running router job, which is always the old one. The replacement had no workers until the old router was scaled down and could not serve requests routed to it.

The sync now reads the workers of every running router, probes the workers once, and updates each router that is out of sync, so an unreachable router no longer blocks the others. Router tunnels are no longer held while workers are probed, which may take minutes: each router is read first, and connected to again only if it needs an update, re-reading its workers before applying the changes.

Also:

  • _Worker is renamed back to _TargetWorker, its fields are typed after SMG's WorkerSpec, and _add_worker_to_router() sends it as the POST /workers body as is.

Fixes: #4315

During a rolling deployment, the replacement router runs alongside
the old one, but the worker sync only picked the first running router
job, which is always the old one. The replacement had no workers
until the old router was scaled down and could not serve requests
routed to it.

The sync now reads the workers of every running router, probes the
workers once, and updates each router that is out of sync, so an
unreachable router no longer blocks the others. Router tunnels are no
longer held while workers are probed, which may take minutes: each
router is read first, and connected to again only if it needs an
update, re-reading its workers before applying the changes.

Also:

* `_Worker` is renamed back to `_TargetWorker`, its fields are typed
  after SMG's `WorkerSpec`, and `_add_worker_to_router()` sends it as
  the `POST /workers` body as is.

Fixes: #4315
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@un-def
un-def merged commit 6e36024 into master Sep 29, 2026
26 checks passed
@un-def
un-def deleted the issue_4315_sync_all_sglang_routers branch September 29, 2026 06:32
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.

[Bug]: Rolling deployment of type: sglang router is allowed but broken

1 participant