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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cloudeka.ai/deka-slb/how-to-use-deka-slb.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
