How to Use Deka SLB
This section shows an example Deka SLB configuration using the Roundrobin method with two VM instances in the Cloudeka portal service. The process includes VPC configuration, VM configuration, Deka SLB configuration, and security configuration.
VPC Configuration
The first step is to add a VPC configuration to the project that will use Deka SLB. For more details about creating a VPC, go to Create VPC Network.
VM Configuration
The next step is to add two VM instances using the same VPC, which is vpc-demo-slb. For more details about creating a VM, go to Create VM Instance.
The VM instances created in this example are demo-slb1 and demo-slb2. Open the console for both VMs. Click the More button, then select Access Console.
Enter the username and password to log in to the virtual machine.
Run the following command to update the package list on the VM.
sudo apt-get updateRun the following command to install the Apache HTTP Server package on the VM.
sudo apt-get install apache2Type Y to continue the installation process.
Press Enter to continue the installation process, then wait until it finishes.
After Apache is installed, check its status with the following command.
systemctl status apache2After Apache is running on each VM, create a file in the HTML directory. This file will be used in the Backend configuration under the Http Check URI field. Run the following command to open the HTML directory.
Run the following command to create a file in the HTML directory.
Enter the file content on each VM.
To exit the main.php file editor, press Ctrl + X. Then press Y and Enter to save the file.
Deka SLB Configuration
The next step is to add a load balancer configuration using the Server Load Balancer type from the Network menu.
After the Deka SLB configuration is created, an IP address such as 109.199.214.217 will appear. You will use this IP address in the Security Firewall configuration. In the SLB configuration, add the HTTP configuration to both the backend and frontend.
Security Configuration
On the Security menu, click Create Security. In the Inbound Rule section, click New Rule to add the IP address obtained after creating the Deka SLB configuration.
In the Apply to Instance section, select the previously created VM instances.
Result
After completing all configurations, verify that the web server is running correctly. Open a browser on your computer, then enter the load balancer IP address 109.199.214.217 and the file name created in the HTML directory, which is main.php.
Enter the following URL in your browser.
Last updated
