What does Maintenance Mode do?
Short answer
Maintenance Mode takes the Backend Service out of receiving new traffic without deleting it; it is applied on HTTP and L7 TCP vServices. When the setting is saved, ongoing connections and requests are not cut off midway and continue until they are completed; new connections go to the other Backend Services in the list. When the mode is turned off, the Backend Service starts receiving traffic again if the health check result is suitable.
How Does It Work?
- When the mode is turned on and saved, TR7 marks that server as in maintenance in the configuration of each vService that uses the Backend Service and reloads the vService without interruption. The definition, the settings and its place in the vService lists do not change.
- Open connections: During the reload, existing connections continue with the old configuration and stay on the server until they close on their own; long-lived L7 TCP connections are not cut off either. No new connections are sent to the server.
- Distribution: New connections are distributed to the other main Backend Services in the list.
- If all are in maintenance: If all the main Backend Services in the list are in maintenance or in the Error status, the Backup Service takes over if there is one; if there is no backup either, clients receive 503.
- Health check continues: The health check of the server in maintenance continues; the Health column continues to show the check result.
- Return: When the mode is turned off and saved, the server rejoins the distribution; if the health check result is Error, it does not receive traffic until the result is OK.
On vServices That Use Persistence
New connections of clients pinned with a cookie or source IP to the server put into maintenance are directed to the other servers; if the application session is kept on the server, these clients may need to log in again. To prevent this, the server is preferably put into maintenance at a low-traffic hour, or the application session is kept shared among the servers. If Session Affinity Manager is used, the sessions can be moved to the other servers with Rebalance before the maintenance.
In TR7
- Individual Backend Service: Load Balancer → Backend Services → the Backend Service is selected → Edit → Maintenance Mode is turned on → it is saved with the Edit button. Its default value is off.
- Backend Group: Maintenance Mode is at group level; when it is turned on, all the servers in the group go into maintenance together (Backend Groups · Maintenance Mode).
- More than one vService: The mode is applied to the Backend Service itself; it goes into maintenance at the same time on all the HTTP and L7 TCP vServices that use it. The vServices that will be affected are seen on the Used in tab of the preview panel.
- Network vService: Maintenance Mode is not applied to the distribution of Network vServices. On these vServices, to take the server out of service, the Backend Service is removed from the vService's Default Backend Services list and the vService is saved.
- Where to monitor: In the Backend Services list, an amber ambulance icon appears in the name column; on the Live Stats screen, the status of the server is written as amber Maintenance; the end of the open connections is monitored from the current session count on the same screen.
- Cluster: When Clustering is on and Manual Sync Mode is off (default), the setting is transferred to the peer device automatically; if Manual Sync Mode is on, it is sent manually with Synchronize.
Common Misconceptions
- "The Health column shows the server in maintenance." The Health column continues to show the health check result (OK or Error); the maintenance status is seen with the ambulance icon and in Live Stats.
- "Maintenance mode cuts off open connections." Ongoing connections and requests continue until they are completed; only new connections are not sent to the server.
- "I can put a single server in a group into maintenance." In a group, maintenance mode is applied to all the servers; for the maintenance of a single server, the server is defined as an individual Backend Service.
- "Maintenance mode removes the Backend Service from the vServices." The Backend Service stays in the lists; it only does not receive new traffic.
How it is done in the documentation
