Registering Instances with a Load Balancer

You can register instances with a load balancer to route the inbound traffic to these ones, called back-end instances. The load balancer only routes inbound traffic to its healthy registered instances.

You can register additional instances with a load balancer at any time to handle an increase of the traffic load sent to your back-end instances.

To register back-end instances using their External IPs (EIPs) rather than their instance IDs, see the OSC CLI section.

Registering Instances with a Load Balancer Using Cockpit v1

  1. Click Services > Load Balancers.

  2. Click the load balancer you want to register an instance with.
    The load balancer is selected and its details appear.

  3. Click Instances.
    A panel with information about back-end instances registered with the load balancer appears.

  4. Click Register Instance .
    The REGISTER INSTANCE dialog box appears.

  5. From the Instance list, select the instance you want to register with the load balancer.

  6. Click Register to validate.
    The instance is registered with the load balancer and appears in the panel.

Registering VMs with a Load Balancer Using OSC CLI

See the LinkLoadBalancerBackendMachines or RegisterVmsInLoadBalancer command samples in the documentation of the OUTSCALE API.

Registering Instances with a Load Balancer Using AWS CLI

To register one or more instances, use the register-instances-with-load-balancer command following this syntax:

Request sample
$ aws elb register-instances-with-load-balancer \
    --profile YOUR_PROFILE \
    --load-balancer-name LB_NAME \
    --instances i-01234567 \
    --endpoint https://lbu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • load-balancer-name: The name of the load balancer.

  • instances: One or more instance IDs.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The register-instances-with-load-balancer command returns the following elements:

  • Instances: Information about one or more registered instance. This element contains the following information for each registered instance:

    • InstanceId: The ID of the instance.

Result sample
 {
   "Instances":
       {
           "InstanceId": "i-01234567"
       },
}

The specified instances are registered with the load balancer.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.