fbpx

Multai load balancer uses Runtime instances as hosts to run the Load Balancers.

It is a best practice to run the Runtime Instances as part of a Spotinst Elastigroup.

In order to integrate Elastigroup with Multai please follow the following steps:

1. Create a Deployment and Runtime
  1. Navigate to the MLB Console -> Runtime and create a deployment
  2. Provide a name for the Deployment
  3. After the Deployment is created, copy the Deployment ID to be used in the next section
2. Create an Elastigroup with GCP or Azure

Follow this guide: Creating an Elastigroup while following these steps:

  1. We recommend starting with a minimum capacity of 2 instances
  2. Important! Your subnets should have access to an Internet Gateway
  3. Select an Image of systemD OS such as “CentOS 7” or “Ubuntu 16”
  4. Use the following User data script in the “Compute” tab under Additional Configurations
#!/usr/bin/env bash
curl -fsSL http://spotinst-public.s3.amazonaws.com/services/balancer/runtime/bootstrap/bootstrap.sh | \
SPOTINST_ACCOUNT_ID=act-xxxxxxx \
SPOTINST_DEPLOYMENT_ID=dp-xxxxxxx \
SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
bash

Where SPOTINST_ACCOUNT_ID represents your Spotinst Account ID, SPOTINST_DEPLOYMENT_ID is the deployment ID from the previous step and SPOTINST_TOKEN is your Spotinst API Token

5. Hit next to move to the scaling Tab

3. Optional – Create Scaling Rules

This step will add load-based scaling to the deployment cluster. For CPU centric loads you can create a step scaling rule based on desired CPU usage

CPU >= 60% for 3 consecutive periods of 1m => Add 1 instance
CPU >= 70% for 3 consecutive periods of 1m => Add 2 instance
CPU >= 80% for 1 consecutive periods of 1m => Add 2 instance

If your workload has more network consumption than CPU please contact our support (support@spotinst.com)to get advice on scaling based on active connections etc.

Continue and create the Elastigroup. The Runtime servers will launch within a few minutes.

4. Create Load Balancer

Create the Load balancer in the console at Balancers -> Create Balancer in the top right corner of the screen.

 

5. Validate that the Runtimes show under the deployment

After the instances finished launching, they will be visible under Runtimes-> Your Deployment screen.

 

What’s Next

Learn how to configure your new MLB as a load balancer for your applications here!