TCP Load Balancing
This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.
Click or tap a screenshot to view it at its original size.
Objective
This guide explains how to use TCP Load Balancing on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.
Before you begin
- Sign in with an account permitted to manage the relevant environment.
- Confirm the target environment, region and resources before saving changes.
- Create a backup or rollback plan before changing a production system.
Load balancing ensures high system availability through distributing the workload across multiple components. Using multiple components for load balancing instead of a single component may increase reliability through reproducibility. Ruk-Com uses NGINX for two types of load balancing: TCP and HTTP.
Ruk-Com Cloud customers can use TCP to balance requests to databases, mail servers and other distributed applications with network support. TCP can also be used instead of HTTP if faster rebalancing is required. In this case, you need to know that this speed is achieved by neglecting various request handling steps.
The TCP load balancing component receives connection requests from client applications through network sockets. This component decides which nodes in the Env will be requested. For distributing this request, Ruk-Com has usedRound Robin Algorithm
Once the connection is established, requests from client applications continue through the same connection to the selected node. The application cannot determine which instance to select.
The existing connection will only be lost if something goes wrong, like a temporary network failure or something of that nature. The next time the request is received a new connection will be created. This connection can go to any instance in the Environment.
To perform TCP balancing at the Ruk-Com Cloud environment, follow these instructions:
1. Create an Env with 2 or more application servers (for example, Tomcat). In this case, NGINX will be added automatically. Note that you must enable Public IP for the NGINX node.

2. Click Config for NGINX in your Env.

3. In the open tab, go to tcpmaps > mappings.xml and specify the frontend and backend ports. Save (Save) change
Frontendis the port that the user will connect to.
Backendis the port on which the balancer will forward requests.

4. Restart (Restart) the NGINX node.
And that's all. Now your Env uses TCP balancing for the application server.