Advanced

Load Balancing & Failover: Policy Group Configuration

Published by Clash Official Site. Proxy provider subscriptions often include dozens or even hundreds of nodes, but what truly determines your daily experience is how you organize these nodes in your Clash config. Policy groups (Proxy Groups) go beyond simply "pick a region (e.g. Singapore, Japan, US) based on latency" — url-test for automatic speed selection, fallback for failover, and load-balance for distributing load let connections automatically trade off between latency, stability, and bandwidth. This article systematically covers the behavioral differences and configuration points of each policy group type.

The Role of Policy Groups in the Routing Chain

When a rule decides that traffic should be proxied, it doesn't bind directly to a single node — it points to a policy group name like PROXY or "Node Selection." The policy group contains several nodes or sub-groups and defines how to pick the egress: manual selection, automatic speed testing, sequential fallback, or load distribution.

Understanding this, you'll realize that optimizing the experience usually means tuning the policy group structure, not endlessly switching individual nodes. A well-structured group setup reduces manual intervention and auto-switches when a node fails — no more "discovering your main node went down at 3am."

select: Manual Selection, Most Intuitive

type: select is the most common policy group — users manually pick a node or sub-group from the client's dropdown. Suited to cases where human judgment is clearly needed (e.g. "HK group / US group / JP group"). Also the default implementation for the top-level "Node Selection" entry.

Fully controllable; can't auto-adapt to node quality changes. Typically used as the top-level entry with url-test or fallback sub-groups attached below.

url-test: Auto Speed Test, Picks Fastest

url-test periodically tests all nodes in the group (commonly against https://www.gstatic.com/generate_204) and selects the node with the lowest latency that hasn't timed out. The "Auto" or "Auto Select" group in most provider configs is this type.

proxy-groups:
  - name: Auto
    type: url-test
    proxies:
      - HK-1
      - HK-2
      - JP-1
    url: https://www.gstatic.com/generate_204
    interval: 300
    tolerance: 50

interval is the test cycle in seconds; tolerance means a new node must be faster than the current one by at least this many ms before switching — avoids constant bouncing. Ideal for users who want to always use the fastest route, though testing consumes a small amount of data and CPU.

fallback: Failover, Emphasizes Availability

fallback uses nodes in list order, only trying the next node when the current one is unreachable. Unlike url-test which chases "fastest," fallback chases "just needs to connect" — perfect as a high-availability backup chain.

Typical structure: primary Trojan node → backup VMess node → last-resort IPLC. Paired with health-check, nodes are periodically probed and failed routes are skipped proactively. For streaming users, a stable fallback chain is often less stressful than constantly chasing the fastest node.

load-balance: Distribute Load

load-balance distributes connections across multiple nodes in the group. Supports consistent-hashing (same target → same node, reducing session disruption) and round-robin. Suited for downloads, multi-connection crawlers, or scenarios that need to spread across nodes to avoid single-node bandwidth caps.

Note: load balancing does NOT guarantee "double the speed on a single connection" — it distributes multiple concurrent connections across different egresses. For single long-lived TCP connections like video streaming, the benefit is limited; url-test or manually selected nodes are still recommended there.

TypeSelection logicTypical use
selectUser manualTop-level egress, regional groups
url-testLowest latencyAuto-select, daily browsing
fallbackSequential fallbackDisconnect backup, high availability
load-balanceHash / round-robinMulti-connection bandwidth spreading

relay and Nested Policy Groups

relay chains traffic through multiple nodes in sequence (proxy chaining), used for special penetration needs — uncommon for most users. More common is nested policy groups: top-level select lets users choose "HK Auto" or "US Auto," each of which is a url-test group, which in turn contains individual nodes. This preserves manual control while benefiting from automatic speed testing.

Practical Combination Tips

  1. Top-level "Node Selection" (select) containing "Auto," "Failover," and regional groups.
  2. Main group uses url-test with tolerance set to 50–150ms to reduce unnecessary switching.
  3. Build a dedicated fallback group as a backup, with nodes from different datacenters/protocols in order.
  4. Streaming services can point to a dedicated policy group in the rules layer — avoid mixing with the download load-balance group.
  5. Client speed test results are for reference only; judge by actual streaming and gaming experience.

Summary

url-test chases speed, fallback chases availability, load-balance chases concurrent distribution, select preserves manual control — combine all four to get real value from a multi-node subscription. Instead of manually testing dozens of nodes one by one, spend ten minutes getting your policy group structure right and let Clash handle most of the selection and switching in the background.

No client yet? Visit the official download page for Clash Verge Rev and more. After importing your subscription via the setup guide, you can see all policy group effects in the Proxy tab.


Related Articles