Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Dynamic weighted load balancing for target servers

Not applicable

I want to use weighted load balancing algorithm for target servers.

In my requirement,I want to change the weight of the load balancing dynamically.

If I give as given in apigee docs example,it is constant.

<TargetEndpoint name="default">
  <HTTPTargetConnection>
    <LoadBalancer>
      <Algorithm>Weighted</Algorithm>
      <Server name="target1">
        <Weight>1</Weight>
      </Server>
      <Server name="target2">
        <Weight>2</Weight>
      </Server>
    </LoadBalancer>
    <Path>/test</Path>
  </HTTPTargetConnection>
</TargetEndpoint>
  1. I thought of using KVM ,where I can change the Weight and use it in this proxy.But without using KVM policy in a proxy(with PUT in KVM),how can I change the values in KVM?doesthe change in KVM needs any restart?
  2. Is there any other better way to do this dynamic weight change after some period of time when our service provider requests for new weight in load balancing?

Please suggest

Solved Solved
1 5 453
1 ACCEPTED SOLUTION

HI @RK4

KVM value change does not need restart. It should reflect immediately. You can change it using the Mgmt UI or using this Mgmt API (assuming your org is CPS enabled)

View solution in original post

5 REPLIES 5