From 2fa10566e3b9a50e56e6464a3469091b073ab592 Mon Sep 17 00:00:00 2001 From: Qiming Zhang Date: Mon, 6 Jul 2026 00:09:16 -0700 Subject: [PATCH] [Core][DP] Rotate load-balancer tie-break to avoid systematic engine bias (#47420) Signed-off-by: mayuyuace --- vllm/v1/engine/core_client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vllm/v1/engine/core_client.py b/vllm/v1/engine/core_client.py index d5cf1050ca..bcb441e756 100644 --- a/vllm/v1/engine/core_client.py +++ b/vllm/v1/engine/core_client.py @@ -1434,6 +1434,12 @@ class DPLBAsyncMPClient(DPAsyncMPClient): # Increment local waiting count for better balancing between stats # updates from the coordinator (which happen every 100ms). current_counts[eng_index][0] += self.client_count + # Rotate the scan start so that ties (equal scores, e.g. right + # after a coordinator stats reset when engines look equally loaded) + # don't systematically favor the same engine. This removes the + # fixed tie-break bias without affecting load-aware decisions when + # scores actually differ. + self.eng_start_index = (self.eng_start_index + 1) % num_engines chosen_engine = self.core_engines[eng_index] # Record which engine is chosen for this request, to handle aborts.