Server flapping, or bouncing up and down, is a common issue. Generally, server flapping is caused by the server reaching or slightly exceeding the health monitor’s maximum allowed response time.

Navigate to Applications > Pools > Analytics to validate whether a server is flapping, and probe into the specific server’s analytics page within the pool. Enable the Alerts and System Events overlay icons for the main chart. This shows server up-and-down events over the period selected. The page also shows which health monitors are failing.

Compare the response times from the server to the health monitor’s configured receive timeout window. If the failures can be attributed to these timers, several steps can be taken to remedy them.

Add Additional Servers

This might not help if the slowdown is due to a backend database, but it can be a quick and permanent fix for servers that are just overloaded or busy.

Increase the Health Monitor’s Receive Timeout Window

The timeout value can be 1-300 seconds. The timeout value must always be shorter than the send interval for the health monitor.

Raise the Number of Successful Checks Required, and Decrease the Number of Failed Checks Allowed

This ensures that the server is not brought back into the rotation as quickly, potentially giving it more time to handle the processes that are causing the slow response.

Change the Connection Ramp-up (If using the Least Connections Load-balancing Algorithm)

Servers can be susceptible to receiving many connections too quickly, when first brought up. For example, if one server has one connection and the rest have 100 connections, the least connections algorithm specifies that the new server must get the next 99 connections. This can easily overwhelm the server, leaving a flash crowd of connections that must be dealt to the remaining servers, thereby causing a domino effect. The connection ramp-up feature can be configured on the Advanced tab of the pool’s configuration. The connection ramp-up feature slowly ramps up the percentage of new connections sent to a new server. Increasing the ramp-up time might be beneficial if you are seeing a cascading failure of servers.

Set the Maximum Number of Connections Per Server

This option which is configurable on the Advanced tab of the pool configuration, ensures that servers are not overloaded and can handle connections at optimal speed.