Libra worker should support node weights

Bug #1117349 reported by David Shrewsbury
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libra
Fix Released
Medium
David Shrewsbury

Bug Description

Need to handle node weighting. We would map the value from the API server request to the HAProxy equivalent config value.

See the 'weight' option to the 'server' config value in HAProxy docs:

  http://cbonte.github.com/haproxy-dconv/configuration-1.4.html#5-weight

From the Atlas-LB API docs:

---
The caller can assign the relevant weights to nodes using the weight attribute of the node element.

The weight of a node determines the portion of requests or connections it services compared to the other nodes of the load balancer. For example, if node A has a weight of 2 and node B has a weight of 1, then the loadbalancer will forward twice as many requests to node A than to node B. If the weight attribute is not specified, then the node's weight is implicitly set to "1".
---

Example:

{
  "nodes": [
             {
               "address": "10.1.1.1",
               "port": "80"
             },
             {
               "address": "10.2.2.1",
               "port": "80",
               "weight": "2"
             },
             {
               "address": "10.2.2.2",
               "port": "88",
               "condition": "DISABLED",
               "weight": "2"
             }
           ]
}

Tags: worker
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to libra (master)

Fix proposed to branch: master
Review: https://review.openstack.org/21330

Changed in libra:
status: New → In Progress
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to libra (master)

Reviewed: https://review.openstack.org/21330
Committed: http://github.com/stackforge/libra/commit/53fedfca2a3167341a1839be128a29bdec3b50a0
Submitter: Jenkins
Branch: master

commit 53fedfca2a3167341a1839be128a29bdec3b50a0
Author: David Shrewsbury <email address hidden>
Date: Wed Feb 6 11:00:20 2013 -0500

    Support server node weights.

    Support setting a weighting value for each node that will determine
    the proportion of load balancing requests that it receives in relation
    to the other defined servers and their weights.

    Also adds a file describing the worker JSON message versioning.

    Fixes bug 1117349

    Change-Id: Ie1460c165f03b0523ee28d864b74ea9e5858b256

Changed in libra:
importance: Undecided → Medium
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.