[Feature] Add fault tolerance framework (simplified) for DP+EP external LB deployments (#44428)

Signed-off-by: fangyuchu <fangyuchu@qq.com>
Signed-off-by: a798347923 <2645302020@qq.com>
Signed-off-by: TianZhuo <2770730562@qq.com>
Signed-off-by: a798347923 <39047817+a798347923@users.noreply.github.com>
Signed-off-by: 205150940 <112750056+205150940@users.noreply.github.com>
Signed-off-by: w00689259 <wangzhuo66@huawei.com>
Signed-off-by: zWaNg3 <37772915+zWaNg3@users.noreply.github.com>
Signed-off-by: zWaNg3 <389750525@qq.com>
Signed-off-by: yzchang-plus <1078477584@qq.com>
Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com>
Co-authored-by: zWaNg3 <37772915+zWaNg3@users.noreply.github.com>
Co-authored-by: a798347923 <2645302020@qq.com>
Co-authored-by: TianZhuo <2770730562@qq.com>
Co-authored-by: 205150940 <112750056+205150940@users.noreply.github.com>
Co-authored-by: a798347923 <39047817+a798347923@users.noreply.github.com>
Co-authored-by: w00689259 <wangzhuo66@huawei.com>
Co-authored-by: zWaNg3 <389750525@qq.com>
Co-authored-by: yzchang-plus <1078477584@qq.com>
Co-authored-by: Jade Zheng <zheng.shoujian@outlook.com>
This commit is contained in:
fangyuchu
2026-07-25 11:49:09 -04:00
committed by GitHub
co-authored by zWaNg3 a798347923 TianZhuo 205150940 a798347923 w00689259 zWaNg3 yzchang-plus Jade Zheng
parent 33ef67e9fb
commit 0b0bd2b5f6
27 changed files with 1088 additions and 7 deletions
+25
View File
@@ -78,6 +78,11 @@ from vllm.v1.engine.utils import (
get_physical_gpu_ids_for_local_dp_rank,
)
from vllm.v1.executor import Executor
from vllm.v1.fault_tolerance.engine_core_sentinel import (
FT_UTILITY_METHOD,
EngineCoreSentinel,
fault_tolerant_wrapper,
)
from vllm.v1.kv_cache_interface import KVCacheConfig, get_kv_cache_spec_kind
from vllm.v1.metrics.stats import SchedulerIterationDetails, SchedulerStats
from vllm.v1.outputs import ModelRunnerOutput
@@ -1070,6 +1075,16 @@ class EngineCoreProc(EngineCore):
internal_dp_balancing,
)
# Initialize fault tolerance settings.
self.enable_fault_tolerance = (
vllm_config.parallel_config.enable_fault_tolerance
)
if self.enable_fault_tolerance:
self.ft_sentinel = EngineCoreSentinel(
engine=self,
parallel_config=vllm_config.parallel_config,
)
# Background Threads and Queues for IO. These enable us to
# overlap ZMQ socket IO with GPU since they release the GIL,
# and to overlap some serialization/deserialization with the
@@ -1355,6 +1370,7 @@ class EngineCoreProc(EngineCore):
"""Returns true if shutdown has not been requested."""
return self.shutdown_state == EngineShutdownState.RUNNING
@fault_tolerant_wrapper
def run_busy_loop(self):
"""Core busy loop of the EngineCore."""
while self._handle_shutdown():
@@ -1672,6 +1688,14 @@ class EngineCoreProc(EngineCore):
except Exception:
self._handle_request_preproc_error(req)
continue
elif request_type == EngineCoreRequestType.UTILITY:
request = generic_decoder.decode(data_frames)
client_idx, call_id, method, args = request
if method == FT_UTILITY_METHOD:
self.ft_sentinel.handle_command(
client_idx, call_id, args[0]
)
continue
else:
request = generic_decoder.decode(data_frames)
@@ -2021,6 +2045,7 @@ class DPEngineCoreProc(EngineCoreProc):
and self.step_counter % self.prefill_schedule_interval != 0
)
@fault_tolerant_wrapper
def run_busy_loop(self):
"""Core busy loop of the EngineCore for data parallel case."""