Cloud Raya Load Balancer, Solution to Distribute Load Equally

How can we help?
< All Topics
Print

Cloud Raya Load Balancer, Solution to Distribute Load Equally

Load Balancer, a single point entry to distribute load between servers and also can act as a proxy for the backend server behind it. Cloud Raya loadbalancer implements a TCP-level with three policies: round-robin, Least connection, and Source IP.

  • Round-robin load balancing: Client request are forwarded to each server in turn
  • Least connection load balancing: Client requests are distributed to the backend server with the least number of active connections at the time the client request is received.
  • Source IP load balancing: This type of load balancing uses an algorithm that takes the source and destination IP address of the client and server to generate a unique hash key. This key is used to allocate the client to a particular server. As the key can be regenerated if the session is broken, this method of load balancing can ensure that the client is directed to the same server that it was using previously.

How to create Load Balancer

  1. Login to your Cloud Raya management portal
  2. Navigate to Networking > Load Balancer
  3. Click Add New Load Balancer
  4. Input the required value displayed by dialog box

Load Balancer

    • Location : Jakarta
    • Load Balancer Name: the name of you load balancer rule
    • Algorithm : Choose your desired load balancer algorithm (round-robin, least connection, and Soure IP Hash)
    • Public Port : Input your public facing port
    • Private Port : Input your private port (the listened port at your instances)
    • Public IP for LoadBalancer : Choose Acquire Automatically if you don’t have any Public IP or want to acquire new Public IP, otherwise please choose the available Public IP
  1. Clik Add Load Balancer, and wait until the provisioning is completed

Assigning Backend Server

  1. Click configure on the new created Load Balancing
  2. Click Assign new VM, and choose the specific VMs as the backend servers for the loadbalancer
  3. The final result should be like the below pictures

  1. No need to assign IP Public to the VM, because you only need the loadbalancer IP Public in front of your servers.

Testing

Let’s test to see if this works. We are gonna use the round-robin as load balancer algorithm. The expected result is, the traffic will forwarded to one web server and another, everytime request been made.

Here, we test using a curl command from command line. The syntax will be like curl http://<load balancer IP>:8080/ 
curl http://202.43.248.249:8080/

how to build Load Balancer

Conclusion

If you plan deploy multiple VMs as Web workers or another app that required multiple computing machines, best to deploy the loadbalancer to distribute the load balancely.

To get more tips and tutorial article you can check on Cloud Raya’s Knowledge base and Blog. Or even better, you can sign up now free in Cloud Raya to try our dashboard and feature.

Table of Contents

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment

Ready, Set, Cloud

Ready, Set, Cloud