Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

InternalLB - Internal Load Balancer - the container for LBRules. InternalLB is uniquely identified by NetworkId and IpAddress.

LBRule - Load Balancing Rule that gets configured within InternalLB

InternalLBVM - Internal Load Balancer VM - the CS System VM with HA proxy software, where all LB rules are getting configured.

General flow

  1. Create App tier using network offering with Service=Lb, Provider=ILBVm
  2. Create Internal Load Balancer - InternalLB1 - on the App tier network. The new InternalLBVM starts up on App tier with the Ip1 automatically acquired from the app tier network.
  3. Create Load Balancing rule LBRule1 with lbPort 80 and instancePort 80 in InternalLB1. Nothing gets configured on the backend yet.
  4. Add vm1 to the LBRule1. The rule for Ip1/VM1/ports 80:80 is configured inside gets added to the HA proxy config on InternalLBVM
  5. Add vm2 to the LBRule1. The rule for IP1/VM2/80:80 is configured inside 80 gets added to the HA Proxyproxy config on InternalLBVM
  6. If you want to manage access from tier A to tier B, setup Network ACLs

...

  • Add new manager - InternalLoadBalancerManagerImpl (name is TBD). This class will manage Internal Load Balancers.
  • A new InternalLBVM should be spanned once the internal load balancer is created. This code should be handled by InternalLoadBalancerNetworkApplianceManager. The VM gets created with 1 NIC having guest IP of the InternalLB
  • Might need a new Load Balancer interface. 

Backend changes

For the backend engineer to complete. Have to put HA proxy management/configuration details here

...

Api name

Request parameters

Response parameter

Available to regular user

createInternalLoadBalancer

  • networkId (required) 
  • name (required) 
  • description (required)
  • id
  • name
  • description
  • networkId
  • zoneId
  • ipAddress
  • type (=Internal)
  • list of LBRules (child objects, the list is empty at this point)

yes

deleteLoadBalancer

  • id (required)
  • true/false

yes

listLoadBalancers

  • id
  • name
  • description
  • networkId
  • zoneId
  • ipAddress
  • type

List of Load Balancer objects, each having:

  • id
  • name
  • description
  • networkId
  • zoneId
  • ipAddress
  • type
  • list of LBRules (child objects)

yes

...

3) Add Load Balancing Rule to the Internal Load Balancer created on step #2

Java code changes
  •  Revise LoadBalancingRulesManagerImpl and see what code can be re-used.

Backend changes

No changes.

Web Services API

New set of APIs to manage Load Balancing rules

API name

Request parameters

Response parameters

Available to regular user

createLoadBalancingRule

  • loadBalancerId(required)
  • algorithm (required)
  • loadBalancerPort (required)
  • instancePort (required)
  • id
  • loadBalancerId
  • algorithm
  • loadBalancerPort
  • instancePort
  • list of VMs assigned to the LBRule

yes

deleteLoadBalancingRule

  • id(required)
  • true/false

yes

listLoadBalancingRules

  • id
  • loadBalancerId
  • algorithm
  • loadBalancerPort
  • instancePort

List of LBRules, each having parameters:

  • id
  • loadBalancerId
  • algorithm
  • loadBalancerPort
  • instancePort
  • list of VMs assigned to the LBRule

yes

DB changes

TBD

4) Assign VM(s) to the Load Balancing Rule.

...

Web Services API

...

Existing New set of APIs will be used for adding/deleting VMs to/from Internal LB

  • assignToLoadBalancerRule
  • deleteFromLoadBalancerRule

...

Web Services API

...

to assign/remove vms from load balancing rules.

API name

Request parameters

Response Parameters

Available to regular user

tassignVMToLoadBalancingRule

  • id (required)
  • virtualMachineIds(required)
  • true/false

true

removeVMFromLoadBalancingRule

  • id (required)
  • virtualMachineId (required)
  • true/false

true

Internal Load Balancing Vm life cycle

...

Question: should we allow destroying the vm with DestroySystemVM command?

Limitations

  • Internal and Public Lb are mutually exclusive on a tier. If the tier has LB on the public side, then it can't have the Internal LB
  • Supported just on VPC networks

...