> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/deka-slb/how-to-use-deka-slb.md).

# 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](/deka-flexi/deka-flexi-network/vpc-network/create-vpc-network.md).

### **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](/deka-flexi/deka-flexi-instance/create-vm-instance.md).

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 update
```

Run the following command to install the Apache HTTP Server package on the VM.

```
sudo apt-get install apache2
```

Type `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 apache2
```

After 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.

```
cd /var/www/html
```

Run the following command to create a file in the HTML directory.

```
sudo nano [file-name].[extension]
```

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.

```
109.199.214.217/main.php
```
