Updated on 2025-03-28 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 a project.
  3. Click in the upper left corner of the page, choose Database > GaussDB(for MySQL).
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Database Proxy.
  6. 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.