Updated on 2025-07-11 GMT+08:00

Configuring a Routing Policy

Proxy instances support weighted and load balancing routing policies.

To configure a routing policy, you need to:

Constraints

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page, choose Database > TaurusDB.
  4. On the Instances page, click the instance name to go to the Basic Information page.
  5. In the navigation pane on the left, choose Database Proxy.
  6. On the Database Proxy page, click the name of a proxy instance.
  7. On the Basic Information page, click Change next to Routing Policy.
  8. In the displayed dialog box, select a routing policy.

    • Weighted: Read requests are assigned to nodes based on the weights you specify.
    • Load balancing: Read requests are assigned to nodes with fewer active connections. In load balancing policy, you do not need to configure the weights of nodes.

    The proxy mode of a proxy instance affects read requests assigned to different nodes.

    • Read-only mode: All read requests are assigned to the selected read replica based on the routing policy and weights you specify, but not to the primary node.
    • Read/write mode: All read requests are assigned to the selected nodes (including primary nodes and read replicas) based on the routing policy and weights you specify.
    Figure 1 Changing the routing policy of a proxy instance in read/write mode
    Figure 2 Changing the routing policy of a proxy instance in read-only mode