vllm.entrypoints.launchers.dp_supervisor
¶
Classes:
DPSupervisor
¶
_handle_signal(signum)
¶
Signal handler that is added to the event loop.
This catches the SIGTERM from K8s and begins graceful shutdown, by setting the _shutdown_event(), which is watched by the main coroutine monitoring the vLLM DP Servers.
_monitor_children()
async
¶
Main coroutine task that monitors the children vLLM servers.
Before the vLLM servers are /ready: - if the pid is dead, we will shut down - if the probe fails, we try again after dp_supervisor_probe_interval_s
After the vLLM servers are /ready: - if the pid is dead, we will shut down - if the probe fails, we will shut down
_probe_all_children()
async
¶
Background coroutine: probes all child endpoints on each interval.
Exits when any server becomes unhealthy after being ready, signalling _monitor_children to initiate shutdown.
_shutdown_children()
async
¶
Terminate the vLLM DP servers.
_start_children()
¶
Launch vLLM DP Servers on separate GPUs.
_start_server()
async
¶
Launch the DPSupervisor HTTP server.
Called only after the vLLM DP Servers are ready so that /health does not return 503 to external probes while the engines are initializing.
_wait_until_ready(monitor_task)
async
¶
Block until the vLLM DP Servers are ready or shutdown is triggered.
Returns early if monitoring stops (e.g. a DP Server dies during startup), in which case the supervisor server is never started.
_build_device_ids(args, local_rank)
¶
Build the --device-ids value for a DP child process.
The child resolves these against its own inherited device-control env var (e.g. CUDA_VISIBLE_DEVICES), so integer IDs must stay env-relative here rather than being translated to physical IDs.
_probe_endpoint(session, args, port, path, conn_err_failure_threshold=3, conn_err_retry_delay=5.0)
async
¶
Probe /health endpoint for 200 status.
If there is a connection error, retry every N seconds.
_run_vllm_dp_server(child_args)
¶
Entrypoint function for the vLLM DP Server.