Can I restart a vService without interruption (soft / hard restart)?
Short answer
Yes; in HTTP and L7 TCP vServices, the lb service restart poolId <vService> command in WEB-CLI performs an uninterrupted (soft) reload by default: the new process reads the configuration again, and the open connections are completed in the old process; if an uninterrupted reload cannot be performed, TR7 switches to a hard restart on its own. If --hardReload true is added, the service is restarted without waiting for the open connections. Reload in the interface always performs a hard restart, and the open connections drop (What does Reload in the right-click menu do; how is it different from Disable / Enable?). Network vService is not restarted with this command; since ordinary configuration changes in HTTP and L7 TCP are already applied without interruption, a restart is not needed in most cases.
Problem: The vService Needs to Be Restarted
The vService needs to be restarted to resolve a problem, and it is desired that the open user connections not drop. Some changes also require the vService to be restarted on save: changes to Max. Connections/s, Max. Session Rate/s, Max. Total SSL Connections, Max. SSL Connections/s and Buffer Size(kB) in the vService Limits profile, turning Compression on or off on the vService or switching to a profile with a different level, Compression Level in the Compression profile, adding or removing the HTTP 1.0 Header Compatibility action, changes to its Headers to Fix list, and Cores, Memory Limit, CPU Priority, Cpu Usage Limit (%), Core Engine in QOS restart the vService on save (full list: When does a change I make take effect; does it go live as soon as I save it?). In Network vService, on the other hand, every save, including a name change, restarts the vService (Network vService · Save). Such changes are made outside peak hours.
Solution: Three Methods
The methods are separated by the way of restarting; if the open connections are to be preserved, Method 1 is used.
| Your situation | Suitable method |
|---|---|
| I want it reloaded while the open connections are preserved | Method 1: WEB-CLI restart |
| I want the service to start from scratch; dropping the open connections is not a problem | Method 2: WEB-CLI restart --hardReload |
| I want to restart it from the interface | Method 3: Reload |
Method 1: WEB-CLI Restart Recommended
- How it works
lb service restart poolId <vService>reloads the configuration without interruption; new connections are opened in the new process, and the open connections are completed in the old process. If an uninterrupted reload cannot be performed, the service is restarted on its own. - Where it is openedWEB-CLI →
lb service restart - Requirement CLI access and the modify permission in the Load Balancer area for the user. In a cluster setup, the command is applied only on the device where WEB-CLI is opened; for the peer device, the command is run in that device's WEB-CLI.
- vService type HTTP · L7 TCP
Step-by-Step Configuration
The terminal is opened with the WEB-CLI button at the bottom right and the command is written; poolId is required and the vService name is selected with Tab (lb service · Things to Know):
lb service restart poolId <vService>The status of the vService is queried:
lb service status id <vService>Verification
The concurrent session count on the Live Stats screen of the vService is monitored before and after the command.
The session count does not drop to zeroMethod 2: WEB-CLI Restart --hardReload
- How it works With
--hardReload true, the service is started from scratch without waiting for the open connections to finish; the clients reconnect. - Where it is openedWEB-CLI →
lb service restart→--hardReload true - Requirement CLI access and the modify permission in the Load Balancer area for the user; the command is applied only on the device where WEB-CLI is opened.
- vService type HTTP · L7 TCP
Step-by-Step Configuration
The required poolId field is written with the vService name, and then --hardReload true is added:
lb service restart poolId <vService> --hardReload truelb service status id <vService>Verification
The Status circle in the vService list is checked.
In progress for a short time, then green (OK)Method 3: Interface → Reload
- How it worksReload starts the running process of the vService from scratch with the same configuration; in HTTP and L7 TCP vServices the open connections drop. In a cluster setup, it is applied on both devices.
- Where it is openedLoad Balancer vService List → right-click on the row → Reload · the ⋮ menu of the vService preview or of the panel on the vService screen → Reload
- Requirement The vService must be enabled; while it is disabled, Reload is inactive.
- vService type HTTP · L7 TCP · Network
Step-by-Step Configuration
On the Load Balancer → Load Balancer vService List screen, the vService row is right-clicked.
Reload is selected in the menu; no confirmation is asked and the operation starts immediately.
Verification
The Status circle and the Status Logs tab in the vService panel are checked.
In progress for a short time, then green (OK)Common Mistakes
- Adding
--hardReloadwithout writing thepoolIdfield.poolIdis required and is written first:lb service restart poolId <vService> --hardReload true. - Thinking that Reload in the interface preserves the connections. Reload starts the process from scratch; Method 1 is used to preserve the connections.
- Trying to restart a Network vService with the restart command. The command is applied only in HTTP and L7 TCP vServices; in Network vService, Reload in the interface is used.
- Restarting after every change. Changes are applied on their own (When does a change I make take effect; does it go live as soon as I save it?).
- Thinking that the WEB-CLI command is applied to both devices in a cluster.
lb service restartis applied only on the device where the command is run.
How it is done in the documentation
