fbpx

If you are running an application or service behind AWS’ Elastic Load Balancer (ELB) or Application Load Balancer (ALB), Elastigroup provides the freedom to run blended cluster from multiple instance types, sizes({M3,M4,C3,C4}.{Large,Xlarge,etc..}) and purchasing options (SpotOn-DemandReserved).

Elastigroup launches the target capacity in multiple uncorrelated Spot Markets, to ensure a predictable and stable workload. Its unique value proposition is its ability to add resiliency to workloads that otherwise would not be suitable to run on the Spot Market.

 

Note: To ensure that the load balancer stops sending requests to instances that are marked for termination, Elastigroup will de-register and drain the instances a few minutes before the instance gets a shutdown signal from AWS. At the same time Elastigroup will begin spinning up new instances in parallel to ensure your desired capacity won’t be degraded.

Specify one or more load balancers, and Elastigroup will register every instance with the load balancer . Elastigroup also de-registers instances from the load balancer upon termination and sends a SNS\Email notifications.

How To Integrate a Load Balancer

New Group Creation via the UI
  1. Create a new Elastigroup.
  2. Proceed with the creation proceeds as listed here: Creating Your First Elastigroup
  3. In the “Compute Tab” open the Load balancer settings and select the Load Balancer you would like to attach from the drop down selection were:
  • Amazon Load Balancer – Select your ELB or ALB Target sets.
  • Auto Healing – Select which health check service will automatically perform health checks on your EC2 instances. If an instance fails the health check, it is automatically removed from the Elastigroup and will be replaced with a new instance.
  • ELB – Use amazon’s Elastic load balancer health check.
  • TARGET SET – Use the AWS Application load balancer health check.
  • EC2 – Use the AWS EC2 Status check.
  • HCS – Use spotinst health check. You can read more about it here: Spotinst HCS service.
  • MLB – Use the Multai Load Balancer health check service.
  • Health Check Grace Period – Specify the timeout (in seconds) until newly launched instances become healthy. If an instance fails the health check after the given grace period, it will be terminated and replaced with a new one.
  • Unhealthy Duration – Specify the amount of time (in seconds) you want to keep existing instances that are deemed unhealthy before the instance is terminated and replaced with a new one.

Proceed with the group set up according to the “Getting Started Guide“.

Update existing Group via the UI
  1. Use the “Actions menu” in the Elastigroup to “Edit Configuration”
  2. Navigate to the Compute Tab
  3. Open the Load Balancer settings and select the Load Balancers to add out of the Drop down selection
  • Amazon Load Balancer – Select your ELB or ALB Target sets.
  • Auto Healing – Select which health check service will automatically perform health checks on your EC2 instances. If an instance fails the health check, it is automatically removed from the Elastigroup and will be replaced with a new instance.
  • ELB – Use amazon’s Elastic load balancer health check.
  • TARGET SET – Use the AWS Application load balancer health check.
  • EC2 – Use the AWS EC2 Status check.
  • HCS – Use spotinst health check. You can read more about it here: Spotinst HCS service.
  • MLB – Use the Multai Load Balancer health check service. You can read more about it here: Introduction to Multai Load Balancer
  • Health Check Grace Period – Specify the timeout (in seconds) until newly launched instances become healthy. If an instance fails the health check after the given grace period, it will be terminated and replaced with a new one.
  • Unhealthy Duration – Specify the amount of time (in seconds) you want to keep existing instances that are deemed unhealthy before the instance is terminated and replaced with a new one.

Click on “Next” until you reach the “Review Tab” and Update the Group.

Update a Group via API

Use the Update API as listed here: Update Group

Use the following Body:

{
  "group": {
    "compute": {
      "launchSpecification": {
        "loadBalancersConfig": {
          "loadBalancers": [
            {
              "name": "MyTargetGroup",
              "arn": "arn:aws:elasticloadbalancing:us-west-2:922761411349:targetgroup/MyTargetGroup/1fe63217f8ffcc05",
              "type": "TARGET_GROUP"
            },
            {
              "name": "MyClassicLB",
              "type": "CLASSIC"
            }
          ]
        },
        "healthCheckType": "ELB",
        "healthCheckGracePeriod": 300,
        "healthCheckUnhealthyDurationBeforeReplacement": 120
      }
    }
  }
}