How to Choose url-test, fallback, and load-balance: Clash Proxy Group Types Compared

Compare how select and three automatic proxy groups switch nodes. Learn what interval, tolerance, and lazy do, plus YAML examples for choosing a group by use case.

Choosing Between Four Proxy Group Types

For a fixed exit, choose select. To use the node with the lowest measured latency, choose url-test. To use a backup only when the primary fails, choose fallback. To spread different connections across multiple exits, choose load-balance. First decide whether the exit IP can change, then decide if automatic selection is appropriate.

Rules send connections to an outbound or proxy group; the group selects the actual exit from its members. For example, DOMAIN,login.example.org,Fixed Exit sends the login domain to the “Fixed Exit” group. That group then determines which node to use. Changing the group type does not change rule order: rules are checked from top to bottom, and processing stops at the first match.

How to Choose Among the Four Proxy Group Types
Type How It Chooses Best For
selectManually selecting a memberLogin sessions, exit IP allowlists, and manual troubleshooting
url-testSelecting by measured latency, with a tolerance to reduce switchingEveryday browsing with many candidate routes and a changeable exit IP
fallbackSelecting the first available member in the configured orderA fixed primary route with a backup kept in reserve
load-balanceSelecting an available member for each new connection using an allocation strategyParallel workloads that can use multiple exit IPs

Group selection mainly affects new connections. An established TCP connection will not move to another route just because a latency test returns a different result. Browsers may also reuse existing HTTP/2 connections, so refreshing a page may not show the new selection. To verify a change, close the relevant connection and make a new request; don’t rely only on the node selected in the dashboard.

What interval, tolerance, and lazy Control

Probe URL and Interval

url is the HTTP or HTTPS address used for health checks. This example uses https://www.gstatic.com/generate_204, which should return HTTP 204. Every candidate exit should be able to reach the same probe URL; otherwise, a difference in results may simply mean the target is unreachable over one route. This latency measures the time for a single probe request. It is not download speed and does not replace testing access to the sites you actually use.

  • interval: 300 sets the probe interval to 300 seconds, or 5 minutes. It is not a request timeout and does not guarantee how quickly a failure will trigger a switch.
  • lazy: true allows the core to defer routine probes for groups that aren’t in use, which is useful for infrequently used automatic groups. A stale latency reading in the dashboard doesn’t mean a fresh round of tests has just run.
  • lazy: false is useful for primary/backup groups that need continuous checks, such as when you want the primary’s status refreshed even while it’s idle. Shorter intervals generate more probe traffic, especially with a large number of candidate members.

Latency Tolerance and Switching

tolerance is used by url-test and is measured in milliseconds. For example, with tolerance: 50, suppose the current exit is available at 120 ms and another route measures 95 ms. Since it’s only 25 ms faster, the current exit can be kept. If the other route measures 60 ms, the 60 ms difference exceeds the tolerance, so the faster exit can be selected. These are examples of how the setting works, not real-world measurements. Tolerance helps prevent unnecessary switching due to small fluctuations between available routes; it is not a delay before dropping a failed member.

mihomo Proxy Group YAML Examples

These examples use fields commonly supported in mihomo 1.19.x. Route-A, Route-B, and Route-C are example node names; replace them with names actually defined under proxies in your working config. If proxy-groups already exists, add these group entries to its list rather than declaring the same top-level key again. If nodes come from proxy-providers, you can reference a provider with use in the group and configure health-check separately in the provider settings. A group’s probe interval is not the provider’s probe interval.

proxy-groups:
  - name: Fixed Exit
    type: select
    proxies:
      - Route-A
      - Route-B

  - name: Everyday Latency Test
    type: url-test
    proxies:
      - Route-A
      - Route-B
      - Route-C
    url: https://www.gstatic.com/generate_204
    interval: 300
    tolerance: 50
    lazy: true

  - name: Primary and Backup
    type: fallback
    proxies:
      - Route-A
      - Route-B
    url: https://www.gstatic.com/generate_204
    interval: 60
    lazy: false

  - name: Spread Connections
    type: load-balance
    proxies:
      - Route-B
      - Route-C
    strategy: consistent-hashing
    url: https://www.gstatic.com/generate_204
    interval: 300
    lazy: true

Reference Groups in Rules

Add these three rules to your existing rules list, placing them before any broader rules that could match first. The example domains illustrate the order: send the login domain to the fixed exit first, then use a suffix rule for other requests under the same domain. Keep the existing MATCH fallback at the end; there’s no need to change its outbound for this test.

  - DOMAIN,login.example.org,Fixed Exit
  - DOMAIN,files.example.org,Spread Connections
  - DOMAIN-SUFFIX,example.org,Everyday Latency Test

To compare a latency-test group with a primary/backup group, keep the test domain fixed and change only the group name at the end of its rule from “Everyday Latency Test” to “Primary and Backup.” With the same probe URL, if Route A measures 160 ms and Route B measures 80 ms and both are available, the primary/backup group still prefers Route A. The latency-test group can choose Route B based on latency and tolerance.

Load Balancing Does Not Combine Bandwidth

load-balance assigns exits to different connections; it does not split a single TCP connection across two routes. A single-connection download uses just the selected exit. Whether a download manager can spread multiple connections across routes also depends on the group’s allocation strategy and the destination.

  • consistent-hashing tries to send the same domain grouping through the same exit. For example, a.example.org and b.example.org are usually grouped under their shared example.org domain. When the destination is an IP address, connections are grouped by destination IP. The selected exit may change if a member’s availability changes.
  • round-robin assigns new connections to available members in rotation. Multiple new connections to the same site may use different exits, so this is a poor fit for logins or allowlisted access that depends on a stable source IP.

If you have only two routes—one for everyday use and one to keep in reserve for primary-route failures—use fallback. If a service requires a single fixed source IP, use select to choose one node and confirm that the node has a stable public exit IP. Manually selecting a node cannot prevent the provider from changing its exit address.

Automatic Switching Not Working? Check Connections, Members, and Probes

  1. Start by checking the matched rule. In the client, open “Connections” → the relevant request → “Details,” then check the destination domain, matched rule, and outbound chain. Field names may vary slightly between clients. If the outbound is DIRECT, or the request matched an earlier group, changing the target proxy group won’t affect that connection.
  2. Next, confirm that the automatic group is actually being used. Open “Proxies” → the relevant group and check the member order and current selection. If the outer select group points to a specific node rather than the automatic group beneath it, the automatic group’s probe results won’t be used for that traffic.
  3. Verify primary/backup behavior with a new connection. In a controlled test environment, temporarily make the first configured member unreachable while keeping the second available. Trigger a group test or wait for its status to refresh, then close the old test connection and reconnect. Test again after restoring the primary: once it’s marked available, subsequent connections can return to the first member. Existing connections on the backup route won’t migrate.
  4. If all probes fail, check the probe URL first. Use select to test each node individually and distinguish between “the service is reachable, but the probe URL isn’t” and “the node can’t reach the service either.” In the first case, switch to a probe URL reachable through every candidate route. In the second, troubleshoot the route or network. Lowering interval will only make failed probes happen more often.
  5. After reloading, confirm which configuration is active. Updating a subscription may regenerate groups and rules. First check the selected profile under “Profiles,” then verify the group names and outbound under “Proxies” and “Connections.” If the client supports persistent overrides, put custom groups and rules in the override layer so the next update won’t overwrite your manual changes.

During troubleshooting, keep the test domain fixed and leave the rules unchanged; change only one group field at a time. See the site’s config field reference for commonly used settings. Verify the actual outbound in the connection details, not by latency numbers or the color of a speed-test button.

Download Clash