...
- APIs and Business logic - Alena Prokharchyk
- Backend - TBA
- UI - TBA
Glossary
- Internal LB - the load balancing between internal (guest) cloudStack networks
- Internal LB Rule- Load balancer rule with the front end IP from Internal (Guest) cloudStack network.
- Internal LB VM - cloudStack system vm managing internal LB Rules
Use case
There are 2 tiers in the VPC - Web tier and Application tier. Traffic to Web tier is balanced on the VPC VR on the public side. User wants traffic coming from Web to the App tier to be balanced as well. Load balancing on the App tier will be covered by the Internal LB feature.
...
1) Enable Internal LB on VPC tier
Introduce new Network Provider - InternalLBVm. This provider supports only 1 service - LB with capability schema=Internal.
In order to have Internal Load Balancing support on VPC tier, the tier has to be created from the network offering with:
- Service=LB, Provider=InternalLBVm.
or
- Service=LB, Provider=Netscaler, LB service capability schema=Internal.
Java code changes
- Network.java interface - add new capability for the LB service - schema. It will have 2 values - Internal and External.
- Existing Netscaler Service Provider will support both values - Internal and External - for the "schema" capability as it can act as a provider for External and Internal Load Balancing.
- Introduce new Network Element - InternalLBVm. Make it extend LoadBalancingServiceProvider interface. This provider supports only 1 service - LB, and its "schema" capability can be Internal only. We need a new network element because Internal LB Vm will have different number of nics from the regular CS system vm (Guest and Control only); and its lifecycle will be different as well. The Vm will be started not when network gets implemented, but when the new IP gets acquired from the Guest Network for the Load Balancer rule.
- Introduce InternalLBNetworkApplianceManager - for managing Internal Load Balancer vms. Allow to use network offering having LB capability schema=Internal to be used only when create network inside VPC
Backend changes
TBD. We might need a separate template/set of scripts for this kind of vm, or we can re-use the existing VR template.
...
- Add new manager - InternalLoadBalancerManagerImpl (name is TBD). This class will be responsible for managing Internal LB rules.
- The LBRule can be created with or without specifying the IP address. In this case we acquire IP address from the Guest network and start new Internal LB vm for the IP address
- A new InternalLBVM should be spanned as soon as the guest IP address is acquired by the LB rule. This code should be handled by InternalLBNetworkApplianceManager. The VM gets created with 2 interfaces: eth0 - linkLocal (private in VMWare case), eth1 - the IP address of the LB rule.
- There is going to be 1 Internal LB vm spanned per guest IP address participating in the Internal Load Balancing.
...
Backend changes
...
TBD. Have to put HA proxy management/configuration details here
...