Load balancer configurations

Set up custom routing policies and maintain session stickiness for incoming requests to route your traffic to an optimal data source with the Application Load Balancer Cloudlet.

Get load balancer configurations

  1. Get a list your load balancing configurations.

    List-CloudletLoadBalancers
    
    originId    : example_load_balancer
    akamaized   : False
    checksum    : checksum70c2105edf8bb65425b399cd0
    description : Default load balancer
    type        : APPLICATION_LOAD_BALANCER
    
    originId    : example_load_balancer2
    akamaized   : True
    checksum    : checksum859fd8e624cda617802dcfa47
    description : Backup load balancer
    type        : APPLICATION_LOAD_BALANCER
    ...
    

    The response provides an originId needed for downstream actions.

  2. Using the returned origin ID, get a list of configuration versions.

    List-CloudletLoadBalancingVersions -OriginID my_origin_id
    
    createdBy        : jsmith
    createdDate      : 12/22/2021 2:21:51 PM
    deleted          : False
    description      : Updated version
    immutable        : True
    lastModifiedBy   : jsmith
    lastModifiedDate : 12/22/2022 2:21:51 PM
    originId         : example_load_balancer
    version          : 2
    
    createdBy        : jsmith
    createdDate      : 10/27/2021 9:37:10 AM
    deleted          : False
    description      : Initial version
    immutable        : True
    lastModifiedBy   : jsmith
    lastModifiedDate : 09/18/2022 2:11:14 PM
    originId         : example_load_balancer2
    version          : 1
    
  3. Use the version parameter along with your origin ID to get the configuration settings.

    Get-CloudletLoadBalancingVersion -OriginID my_origin_id -Version latest
    
    balancingType    : WEIGHTED
    createdBy        : jsmith
    createdDate      : 12/22/2021 2:21:51 PM
    dataCenters      : {@{cloudServerHostHeaderOverride=False; cloudService=False; continent=NA; country=US; hostname=example.com; latitude=42.3601; 
                    livenessHosts=System.Object[]; longitude=71.0332; originId=example_load_balancer; percent=100}}
    deleted          : False
    description      : Update version
    immutable        : True
    lastModifiedBy   : jsmith
    lastModifiedDate : 12/22/2021 2:21:51 PM
    originId         : example_load_balancer
    version          : 2
    

You can use the returned configuration on a new load balancer or make changes and create a new version.

Create a load balancer

To create a new load balancer, pass your -OriginID in the New-CloudletLoadBalancer command.

# Create new load balancer without a configuration
New-CloudletLoadBalancer -OriginID my_origin_id
originId    : whythisdoesntworkagain
akamaized   : False
checksum    : ex1chk1sum6e9817662a9cb18481def75
description : Created new load balancer
type        : APPLICATION_LOAD_BALANCER

This creates a load balancer without a configuration. To add a configuration, you can use an existing configuration as is or make and version your updates.

Use existing configuration

If you want to configure your new load balancer with a version of your existing configuration, use a pipe to get and set the version.

# Create a new load balancer and assign an existing configuration
# The existing config v10 becomes v1 on the new load balancer
New-CloudletLoadBalancer -OriginID new_origin_id
$LBConfig = Get-CloudletLoadBalancingVersion -OriginID old_origin_id -Version 10 

# Make changes

# Save your changes until you're ready to activate it

Set-CloudletLoadBalancingVersion $LBConfig new_origin_id -Version 1 

Update and create new version

You can make changes to your configuration's settings directly in the shell or in a JSON file to which you pipe.

  1. Determine your configuration's activation status.

    List-CloudletLoadBalancingActivations -OriginID my_origin_id
    
    activatedBy   : jsmith
    activatedDate : 12/22/2022 2:21:51 PM
    network       : PRODUCTION
    originId      : example_load_balancer
    status        : activated
    version       : 2
    
    activatedBy   : jsmith
    activatedDate : 09/18/2022 2:11:14 PM
    network       : PRODUCTION
    originId      : example_load_balancer
    status        : deactivated
    version       : 1
    
    StatusDescriptionVersioning path
    activeCurrently active on the network.
    • Make changes
    • Create new version to apply your changes.
    • Activate configuration.
    inactiveConfiguration has never been activated on any network.
    • Make changes
    • Activate configuration.
    deactivatedA previously active configuration that has been replaced by a newer version
    • Make changes
    • Create new version to apply your changes.
    • Activate configuration.
    pendingConfiguration activation is in progress.
    • Treat the configuration as if it is active.
    • Make changes
    • Create new version to apply your changes.
    • Activate configuration.
    failedUnsuccessful configuration activation. Not active on any network.
    • Make changes
    • Activate configuration.
  2. If the configuration status does not require a new version, make changes in the shell or a JSON file, saving them with the Set-CloudLoadBalancingVersion command until you're ready to activate it.

  3. If the configuration status requires a new version, make your changes to the configuration in the shell or a JSON file and version them. Before you activate your new version, you can continue to make changes, saving them with the Set-CloudLoadBalancingVersion command until you're ready to activate it.

    # Create a new version of an activated or previously activated config
    $Config | New-CloudletLoadBalancingVersion -OriginID my_origin_id
    New-CloudletLoadBalancingVersion -OriginID my_origin_id -LoadBalancer $Config
    
    # Save changes to a configuration that is not active
    $Config | Set-CloudletLoadBalancingVersion -OriginID my_origin_id -Version 10
    

When you're done making changes, activate your configuration on the network.

Activate version

To activate your configuration on a network, pass your origin ID, your version value as latest and identify the network, PRODUCTION or STAGING, in which to use the configuration.

Activate-CloudletLoadBalancingVersion -OriginID my_origin_id -Network PRODUCTION -Version latest