3.1.5.5 loadBalancers

The loadBalancers resource allows fine-grained configuration of the distribution of incoming traffic across VM instances that are hosted in the environment managed by the server. This resource has two main parts: a front-end and a back-end configuration.

The front-end configuration exposes the IP address of the load balancer. For example, this address can be a reserved public or private IP address previously provided to the client, or it can be an IP address that is dynamically allocated from a subnet of a virtual network.

The back-end configuration identifies the tenant workload VMs to which the traffic will be delivered.

Probes define how the loadBalancer determines the health of a specific VM instance or endpoint of that instance. The loadBalancer sends traffic to a VM instance or endpoint only if the VM instance or endpoint was determined to be healthy.

A load balancing rule refers to a front-end configuration, a back-end configuration, and optionally to a probes resource to create a mapping between Virtual IP and a set of workload VMs. Traffic directed to the VIP is then load-balanced onto one of the workload VMs.

The loadBalancer uses a distribution algorithm to map traffic to available servers. The algorithm is a 5-tuple hash based on source IP, source port, destination IP, destination port, and protocol type. It provides stickiness only within a transport session, which is a feature that routes the requests for a specific session to the same physical machine that serviced the first request for that session.

Packets in the same TCP or UDP session will be directed to the same datacenter IP instance behind the load balanced endpoint. When the client closes and re-opens the connection or starts a new session from the same source IP, the source port changes and causes the traffic to go to a different datacenter IP endpoint.

The loadBalancer can be configured to use a 2-tuple (Source IP, Destination IP) or 3-tuple (Source IP, Destination IP, Protocol) to map traffic to the available servers. By using SourceIPProtocol, connections initiated from the same client computer go to the same datacenter IP endpoint.

Linkage to Other Resources

When a port of a specific frontend IP address sends traffic to the loadBalancers resource, the loadBalancers resource distributes the traffic to a specific port of a set of back-end IP addresses. The back-end IP addresses are associated with network interface cards (NICs) of VMs. Then back-end IP addresses in the loadBalancers resource are specified as references to these private IPs.

A public IP address can be associated with the private frontend IP of the loadBalancers resource by setting an ipConfigurationRef on the publicIPAddresses resource.

The resources that MUST be unique in the context of the parent loadBalancers resource are: backendAddressPools, frontendIPConfigurations, inboundNatRules, loadBalancingRules, outboundNatRules, probe.

The loadBalancers resource is invoked through the following URI.

 https://<url>/networking/v1/loadBalancers/{resourceId}

url: The address or name of the REST server of the Network Controller.

resourceId: The identifier for the specific resource within the resource type. See section 2.2.3.4 for more details.

Note  The server MAY support additional versions, v1 or later, in the URI.

The following HTTP methods can be performed on this resource.

HTTP method

Section

Description

PUT

3.1.5.5.1.4

Create a new loadBalancers resource or update an existing loadBalancers resource.

GET

3.1.5.5.1.2

Get one loadBalancers resource.

GET ALL

3.1.5.5.1.3

List all loadBalancers resources in the Network Controller.

DELETE

3.1.5.5.1.1

Delete a loadBalancers resource.

The following property elements are valid.

Element name

Type

Description

etag

Read-only

Specified in Common JSON Elements, section 2.2.2.

provisioningState

Read-only

Specified in Common JSON Elements, section 2.2.2.

backendAddressPools

Optional

Indicates the back-end Address Pool of the load balancer, see section 3.1.5.5.2 for full details on this element.

frontendIPConfigurations

Required

Indicates the front-end IP addresses of the load balancer, see section 3.1.5.5.3 for full details on this element.

loadBalancingRules

Optional

A list of load balancing configurations. Each configuration describes what traffic and how it gets load balanced between back-end IPs.

inboundNatRules

Optional

Indicates an array of inbound NAT rules configured for the load balancer, see section 3.1.5.5.4 for full details on this element.

outboundNatRules

Optional

Indicates an array of outbound NAT rules configured for the load balancer, see section 3.1.5.5.6 for full details on this element.

probes

Optional

Indicates an array of probes configured for the load balancer, see section 3.1.5.5.7 for full details on this element.

updateBackendAddressPools

Optional

Indicates whether back-end IP configurations can be added or removed via a PUT on the load balancer.

This property is supported with URI version v7 or later.