Load Balancer is a solution that involves balancing the load of servers and the applications installed on them. Load Balancer is a special type of server that distributes network traffic between server clusters. The advantages of this solution are high availability of your resources, which affects, among other things, the reliability and loading time of your website or application.
Load Balancer in e24cloud
With e24cloud Load Balancer service, you can ensure high availability of your application. The user defines the port on which Load Balancer listens and endpoints - virtual servers.
Application availability with Load Balancer
In the following examples, we will consider a scenario in which we create a Load Balancer to ensure high
availability for our application running on port 80
- HTTP. We have two servers - both running NGINX.
How to create a Load Balancer using VDC?
The architecture that we want to create in this example will look like this:
First, we need to create a L3 network with NAT for communication between the Load Balancer and endpoints. Remember to add virtual servers to the L3 network after creating it, as these will be the endpoints between which the Load Balancer will distribute network traffic.
To create a Load Balancer, select Servers from the menu on the left, then e24cloud Load Balancers. Next, click the Add new Load Balancer button. In the form that appears, enter the location and name of the Load Balancer, from which the hostname of the L3 network will be automatically generated. Then select the previously created L3 network.
In the next step, provide the port/ports on which the Load Balancer will communicate with the servers in our private L3 network, and specify the private IP addresses of those servers. Finally, click the Create Load Balancer button. The Load Balancer will be created and assigned a public IP address, which will be associated with the L3 network.
After adding the Load Balancer, we will see it on the list.
Verification
The Load Balancer checks for the presence of the backend-test
file in the root directory on each endpoint at 1-second
intervals. If the HTTP code
is different than 200, the Load Balancer will stop directing traffic to the problematic
endpoint. If everything is configured correctly, accessing the Load Balancer via HTTP protocol should display the content
of one of the endpoints.