Can I use one Backend Service in more than one vService?
Short answer
Yes. The same Backend Service can be added to the Default Backend Services or Conditional Backend Services list of more than one vService. The record is single: a change such as the address, SSL or Maintenance Mode is reflected at the same time in all vServices that use it, and the health check is common to all vServices; Weight and Connection Limit, however, are applied separately in each vService. Before a change, the vServices that will be affected are checked in the Used in tab of the preview panel.
How Does It Work?
- Each vService writes the Backend Service into its own configuration as a separate server; all settings come from the same record.
- The health check is shared: There is a single check and a single status per Backend Service. If the Backend Service falls into the Error status, it stays out of traffic in all vServices in which it is used. A different health check cannot be assigned per vService.
- Weight and Connection Limit are per vService: Connection Limit is counted separately in each vService; the limit is applied not to the total of the vServices but to each of them separately. Weight is also calculated in the own distribution of each vService, relative to the other Backend Services in the list of that vService.
- A change goes to all vServices at the same time: When the Backend Service is saved, each vService that uses it is reloaded with the new setting; on HTTP and L7 TCP vServices, open connections are not cut, and the new setting is applied to new connections. In a cluster, the record is transferred to the peer device automatically while Clustering is on and Manual Sync Mode is off (default).
Selectability
Which records are listed in the Backend Service selector in the vService form depends on the vService type:
| vService type | Listed Backend Services |
|---|---|
| HTTP and L7 TCP | All Backend Services and Backend Groups; they can be filtered with the Route Table, Type and Used in tabs in the selector panel |
| Network | Only the Backend Services and Backend Groups in the same route table as the vService; the panel has the Type and Used in tabs |
The same Backend Service cannot be added twice to the same list of a vService; the form gives the "Duplicated backend services" warning.
In TR7
- Seeing the usage: The Used in tab in the preview panel of the Backend Service lists the vServices that use it; the badge next to the tab name shows the usage count.
- Statistics: On the Dashboard screen of the Backend Service, the Overview tab shows the total of all vServices in which it is used, and the Per vService tab shows each vService separately.
- Deletion: A Backend Service in use can be deleted with Delete; when it is deleted, it is removed automatically from the lists of all vServices.
- Removing from a single vService: Rather than the Backend Service itself, its entry is removed from the list in the edit form of that vService, and the vService is saved.
Common Misconceptions
- "Connection Limit is a total limit for all vServices." The limit is applied separately in each vService.
- "I put it into maintenance for one vService, and the others are not affected." Maintenance Mode is applied to the Backend Service itself; it does not receive new traffic in any of the HTTP and L7 TCP vServices in which it is used (Maintenance Mode is not applied on a Network vService). To remove it from a single vService, it is removed from the list of that vService.
- "Each vService performs its own health check." The check and the status are single per Backend Service.
- "A Backend Service in use cannot be deleted." It can be deleted, and it is removed from the lists of all vServices; therefore, the Used in tab is checked before deleting.
How it is done in the documentation
