To start you will need to create a new MLB load balancer. You can follow our previous blog post on configuring MLB in AWS here: http://blog.spotinst.com/2017/03/23/multai-load-balancer-install-tutorial-aws/
Next, follow the steps below to configure the Elastigroup and MLB integration:
- Open your Elastigroup from the Spotinst Console.
- From the “Actions” menu select “Edit Configuration”
- Click on the “Compute” page and scroll down to “Multai” as you can see below:
Paste in the “Multai Token” that you used during the creation of the MLB Balancer (Instructions in the link above). The green tick box should appear next to the “Multai Token” field if you entered a valid token. You can also create a new API token if you like directly from the MLB console.
- From the drop down select the “Project” “Balancer” and “Target Set” for the balancer that you created.
- The option “AZ Awareness” will ensure that instances within the same AZ are using the corresponding MLB runtime instance in the same AZ. This feature reduces multi-zone data transfer fees.
- The option “Auto Weight” will automatically provide a higher weight for instances that are larger as appropriate. For example, if you have configured your Elastigroup with m4.large and m4.xlarge instances the m4.large will have half the weight of an m4.xlarge. This ensures that larger instances receive a higher number of MLB requests as appropriate and further optimizes your Elastigroup instances.
- You also have the option of using the MLB as a health check. Instances that do not pass the MLB health check within a specified time frame will automatically be terminated and new instances will be launched to replace them. You can also set the health check on the “Compute” tab of the edit wizard as you can see below:
- When finished, update your Elastigroup and Perform a roll when prompted. You can also manually perform a roll later.
- Verify that the new Elastigroup instances were added to your MLB Load Balancer. The instance that has been added via the Elastigroup integration will have the name field set as the EC2 instance ID.
Things to note:
- MLB Runtime nodes will need to be in a public subnet (Internet Gateway Attached) and belong to the same VPC as your Elastigroup. These nodes will require private routes from to your Elastigroup instances.
- A good test prior to configuring the Elastigroup integration is to SSH into one of your MLB Runtime nodes and perform a curl to the health check address for your application. If this functions properly then you are ready to configure the integration