Failover Protection with TD
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 Failover Protection with TD 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.
Ruk-Com Cloud Traffic Distributor easily provides advanced failover protection with the help of a built-in health monitoring module that automatically tests the backend regularly for availability and isolates unavailable segments from routing. This functionality is enabled by default. However, you can adjust the functionality of this module if desired. Just follow the steps below.
1. Go to the NGINX dashboard.Configand go to file/etc/nginx/nginx-jelastic.confinsideRoot:

Double-click to open in a new tab for editing.
2. Scroll down to about line 50 where the add-on configuration is declared. Find and check the required modules within the section.upstream commonwith the following parameters (where parameters in square brackets are optional):
check interval={interval} fall={fail_count} rise={rise_count} [timeout={timeout}] [default_down={true/false}] [port={port}] [type={type}]

where:
- {interval}- delay between checking two consecutive requests; Set to milliseconds.
- {fail_count}- Number of failed checks After that the server will be marked as unavailable.unavailable
- {rise_count}- Number of successful verifications after which the server will be marked asupand work
- {timeout}- Timeout (milliseconds) health check module waiting for a response from the backend before validating the request is considered failed.
- {true/false}- Set default state The checksum (up or down, respectively) of both backends (i.e. until the corresponding number of checks is passed) is specified as true by default.
- {port}- The port number to be used while connecting to the backend to perform health checks is by default set to 0, which means the default server port. (according to the established protocol) will be used.
- {type}- The type of protocol to be used for health checks (e.g. to analyze whether the backend is working or not).
- tcp- connectionTCPsimple socket
- ssl_hello- Send packageClient HelloSSL, which should respond with a messageServer Hello
- http- Send packageHTTPrequest to receive and analyze response (response)
- mysql- Connect withMySQLserver and answer greetings
- ajp- Send AJP Cping packages to receive and parse Cpong responses.
- fastcgi- Send requestFastCGIto receive and analyze responses
As set up in the image above, both backends will be validated for normal HTTP responses (e.g.200status code (which means the request is processed) every 3 seconds. If validation fails 3 times in a row, the corresponding Backend will be marked "down" and excluded from the path. So that all requests go to the second environment and when the downed server is up again it will be re-added automatically. (after 3 consecutive successful requests) in the backends list
3. After saving the configured changes in NGINX balancer, these changes can be applied without restarting the entire server. (and to avoid project crashes) through reloading via the Reload configuration option in the add-ons menu.

Confirm your decision through the pop-up that appears and in a few seconds your new failover protection settings will take effect.