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
- Navigate to the MLB Console -> Runtime and create a deployment
- Provide a name for the Deployment
- After the Deployment is created, copy the
Deployment IDto be used in the next section
2. Create an Elastigroup with GCP or Azure
Follow this guide: Creating an Elastigroup while following these steps:
- We recommend starting with a minimum capacity of
Important!Your subnets should have access to an
- Select an Image of systemD OS such as “CentOS 7” or “Ubuntu 16”
- 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
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
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.
Learn how to configure your new MLB as a load balancer for your applications here!