LoadBalancer

You can use and define cloud provider load balancers in your templates. To do that you define LoadBalancer node(s) in the node_templates: section of your templates.

Dell Cloud Manager currently supports these cloud provider load balancers:

  • Amazon Elastic Load Balancer (ELB)
  • Microsoft Azure Load Balancer
  • Google Compute Engine Load Balancer

The LoadBalancer node is defined with a section name, a type and properties.

section name

Example: lb:

type

type: dcm.nodes.LoadBalancer

properties

The following node properties are supported when defining a LoadBalancer node in a blueprint template:

  • name: - The desired name of the Load Balancer.
  • cloud: - cloud where the Load Balancer will be created in
  • cloudAccountID: - cloud account of the cloud
  • region: - region in the cloud where the Load Balancer will be created in
  • zone: - data center in the cloud region where the Load Balancer will be created in
  • configurations: - defines the Load Balancer configuration
  • - protocol: - defines the network protocol (HTTP or HTTPS)
  • algorithm: - defines the routing protocol
  • ROUND_ROBIN
  • LEAST_CONN (least connections)
  • SOURCE (Source address affinity persistence)
  • loadBalancerPort: - defines the port that the Load Balancer will listen on
  • instancePort: - defines the port that the servers the Load Balancer will be servicing are listening on
  • healthCheck: - defines one or more health checks and it’s associated options below for the Load Balancer
  • name: - specify a unique name for the health check
  • description: - specify a description for the health check (optional)
  • protocol: - specify the desired protocol
  • HTTP
  • HTTPS
  • TCP (TCP is not supported for the Microsoft Azure Load Balancer product)
  • port: - specify the port on the server(s) for the health check to contact to perform the health check
  • path: - specify the destination for the HTTP or HTTPS request (e.g. /index.html)
  • interval: - specify the amount of time between health checks of an individual server instance, in seconds (5 seconds - 300 seconds)
  • timeout: - specify the amount of time to wait when receiving a response from the health check, in seconds (2 seconds - 60 seconds)
  • unhealthyCount: - specify the number of consecutive failed health checks that must occur before declaring an EC2 instance unhealthy (2 - 10)
  • healthyCount: - specify the number of consecutive successful health checks that must occur before declaring an EC2 instance healthy (2 - 10)

Note

The Microsoft Azure Load Balancer requires a health check to be defined.

Example

lb:
  type: dcm.nodes.LoadBalancer
  properties:
    name: "acme-lb"                                                          # Name of the Load Balancer
    cloud: { get_input: [account_region_zone_selector, cloud] }              # Retrieve the cloud from the AccountRegionSelector
    cloudAccountId: { get_input: [account_region_zone_selector, accountId] } # Retrieve the cloud account ID from the AccountRegionSelector
    region: { get_input: [account_region_zone_selector, region] }            # Retrieve the region from the AccountRegionSelector
    zone: { get_input: [account_region_zone_selector, zone] }                # Retrieve the zone from the AccountRegionSelector
    configurations:
      - protocol: HTTP                                                       # Use the HTTP protocol
        algorithm: ROUND_ROBIN                                               # Use the Round Robin algorithm to service the listeners
        loadBalancerPort: 80                                                 # The Load Balance will listen on port 80
        instancePort: 80                                                     # Redirect the traffic to the listeners on port 80
    healthCheck:                                                             # Define a health check
          name: port_80_check                                                # Name is port_80_check
          description: "Load Balancer Health Check for Port 80"              # Description for the health check
          protocol: HTTP                                                     # Protocol is HTTP
          port: 80                                                           # Port to contact on the server(s) is 80
          path: /index.html                                                  # Destination for the HTTP or HTTPS request is /index.html
          interval: 120                                                      # Perform a health check every 2 minutes
          timeout: 60                                                        # Amount of time to wait for the response to the health check
          unhealthyCount: 2                                                  # If 2 consecutive health checks fail then mark the server as unhealthy
          healthyCount: 3                                                    # If 3 consecutive health checks succeed then mark the server as healthy
  requirements:
    - member: web_vm                                                         # The virtual machines launched from the node-template named "web_vm"
                                                                             # will be serviced by the Load Balancer

Note

Refer to the section in this document Apache Web Server with Load Balancer to see an example of a template which creates a Load Balancer.