The native agent script provided by vLLM-Ascend encapsulates the vLLM service as an instance object. It also creates heaps for prefill and decode instances, organized according to their respective load scores. (A min-heap is a special data structure with the smallest element maintained at the top.) When a request reaches the proxy, the proxy selects an instance with the smallest load score from instance heaps. After the instance is selected, the load score is updated to implement load balancing among instances.
The native proxy script lacks built-in instance availability detection. To address this, the fault isolation function is introduced. This function is used to isolate services that cannot run properly, preventing traffic from reaching faulty instances. In addition, a health detection mechanism has been added to assist fault isolation.
The proxy script now is able to track failure times and faults of instance objects. Figure 1 shows the process.
Since the proxy script retains faulty instances in the heaps, the selection logic has been updated to iteratively detect non-faulty instances from one selection cycle. If all instances in the heaps are marked as faulty, the proxy service becomes unavailable.
In the proxy script, the health check coroutine is enabled by default. All instance objects are checked and processed based on the check result. For details, see Figure 2.
For details, see Deploying Inference Jobs Using a Script in One-Click Mode.