Failover Protection
Failover Protection with Traffic Distributor
The health-check functionality is enabled by default. Its interval, failure threshold, recovery threshold, timeout, initial backend state, port, and protocol can be adjusted when the default behaviour does not match the application requirements.
Open the NGINX Configuration
1Open the NGINX Config panel
In the Traffic Distributor environment, click the Config button for the NGINX layer.
Navigate through Root > etc > nginx and open:
/etc/nginx/nginx-jelastic.conf

Health-Check Configuration Syntax
Scroll to approximately line 50 and locate the health-check directive inside the upstream common section.
check interval={interval} fall={fail_count} rise={rise_count}
[timeout={timeout}] [default_down={true/false}]
[port={port}] [type={type}]

Health-Check Parameters
| Parameter | Description |
|---|---|
interval | Delay in milliseconds between two consecutive health-check requests. |
fall | Number of consecutive failed checks after which the backend is marked unavailable. |
rise | Number of consecutive successful checks after which the backend is marked available again. |
timeout | Maximum time in milliseconds that the module waits for a backend response before treating the check as failed. |
default_down | Sets the initial backend state before the required checks complete. true starts it as down; false starts it as up. The documented default is true. |
port | Port used for the check. A value of 0 uses the default server port for the selected protocol. |
type | Protocol used to verify backend availability. |
Supported Health-Check Types
tcp— opens a TCP socket connection.ssl_hello— sends an SSL Client Hello and expects a Server Hello response.http— sends an HTTP request and parses the response.mysql— connects to a MySQL server and receives its greeting response.ajp— sends an AJP Cping packet and expects a Cpong response.fastcgi— sends a FastCGI request and parses the response.
Default Failover Example
The documented example checks both backends every three seconds and expects a normal HTTP response with status code 200.
- Each backend is checked every 3 seconds.
- After 3 consecutive failed checks, the backend is marked down.
- The unavailable backend is removed from routing.
- All requests are sent to the remaining environment.
- After 3 successful checks in a row, the recovered backend is added back automatically.
Apply Changes without Downtime
2Save the configuration
Save the updated nginx-jelastic.conf file.
3Reload Traffic Distributor
Open the Traffic Distributor add-on menu and select Reload configuration.

Confirm the action in the pop-up window. The graceful reload applies the new failover settings without restarting the complete server, helping avoid application downtime.
