What is a Backend Service?
Short answer
A Backend Service is a single target server to which the vService forwards traffic. It is defined with an IP address or domain name and a port; it can be any service, such as a web, application, database or e-mail server. Health Check, Weight, Connection Limit, SSL Service, SNAT and Maintenance Mode are set separately for each Backend Service; its traffic, response time and health check history are monitored from its own Dashboard screen.
How Does It Work?
- It is attached to a vService: A Backend Service is used by adding it to the Default Backend Services or Conditional Backend Services list of a vService. A Backend Service that has not been added to any vService does not receive traffic.
- It is selected: The vService forwards the request to one of the healthy Backend Services in the list according to the algorithm; in algorithms that use Weight (e.g. Weighted Round Robin), the weight of the Backend Services is also taken into account.
- It is monitored: If a Health Checks profile is assigned to the Backend Service, TR7 sends checks at regular intervals. When consecutive failures reach the Required Failures threshold, the Backend Service is taken out of traffic; when consecutive successes reach the Required Successes threshold, it is taken back into traffic.
Basic Settings
| Setting | What it does |
|---|---|
| Address / Port | The IP address or domain name and the port the traffic goes to |
| Weight | Weight (1–256); a Backend Service with a higher weight receives proportionally more traffic. The default Round Robin algorithm does not take the weight into account; it applies in algorithms such as Weighted Round Robin |
| Connection limit | The maximum number of connections that can be open to the Backend Service at the same time (1–65535) |
| Health check | Health Checks profile; the default is No Check. With No check, health is not monitored and the Backend Service continues to receive traffic even if it has crashed |
| Backup Service | A backup that takes effect only when all the main Backend Services in the same target list are unavailable (in HTTP and L7 TCP vServices; does not apply to a Network vService) |
| Maintenance mode | Closes the Backend Service to new traffic; open connections are left to complete (in HTTP and L7 TCP vServices; does not apply to a Network vService) |
| SSL service | TR7 connecting to the Backend Service with TLS (re-encryption) |
| SNAT | The source IP address TR7 uses when connecting to the Backend Service. With the default Default, the source address is the Interface IP of the interface that leads to the server in the route table of the Backend Service, in the same subnet as the server (as the gateway instead, if the server is reached through a gateway) |
Backend Service Monitoring Screen
Each Backend Service has its own monitoring screen: in the Left Monitor Panel, the Backend Services tab is opened and the Backend Service is clicked. The screen opens with the Dashboard tab bearing the name of the Backend Service, and data is collected at per-second resolution:
| View tab | What it shows |
|---|---|
| Overview | The total of the traffic the Backend Service receives from all the vServices in which it is used: HTTP Requests, Response Time, Bandwidth, Current Sessions, Queue Depth, Connect Time, Connections, HTTP Response Codes |
| Health Check | Health check status history (Health Check State) and check response time (Health Check Time) |
| Per vService | The breakdown of the same metrics into separate series for each vService in which the Backend Service is used |
In the event of a slowdown or an increase in errors, this screen shows at what moment the response time rose, when the health check dropped and which vService the load came from.
Backend Service in TR7
- Adding: It is added with the Load Balancer → Backend Services → Add steps; Backend Service Name and Address (address and port) are required. Health check, Backup service, Maintenance mode and SSL service are in the main section of the form; advanced settings such as SNAT, Connection limit and Weight are in the Details section.
- Usage: The added Backend Service is added to the Default Backend Services or Conditional Backend Services list of vServices. The same Backend Service can be used in more than one vService.
- If there is more than one server providing the same service, a Backend Group, which gathers them into a single structure with common settings, can be used.
Common Misconceptions
- "A Backend Service is a server machine." A Backend Service is a service endpoint (address:port). Two applications running on two different ports on the same server are defined as two separate Backend Services.
- "TR7 detects the failure even if I don't assign a health check." The health of a Backend Service whose Health check field stays at No check is not monitored; it continues to receive traffic even if it has crashed.
- "I set Weight to 0 to stop the traffic." Weight is in the 1–256 range; 0 cannot be entered. Maintenance mode is used to temporarily take a Backend Service out of traffic (Maintenance Mode does not apply to a Network vService; the Backend Service is removed from the vService's Backend Services list).
- "If I define more than one backup, traffic is distributed across the backups." When the backups take effect, only the first available backup receives traffic at a time.
How it is done in the documentation
