You can configure load balancer health checks for TAS for VMs routers so requests go only to healthy router instances.

In environments that require high availability, you must configure your own redundant load balancer to forward traffic directly to the VMware Tanzu Application Service for VMs (TAS for VMs) routers. In environments that do not require high availability, you can skip the load balancer and configure DNS to resolve the TAS for VMs domains directly to a single instance of a router.

Add health check endpoints for routers

Configure your load balancer to use the following HTTP health check endpoints. Add the IP addresses of all router instances along with their corresponding port and path:

  • Gorouter (HTTP router): http://GOROUTER_IP:8080/health
  • TCP router: http://TCP_ROUTER_IP:80/health

Set the healthy and unhealthy threshold properties for the Gorouter

To maintain high availability during upgrades to the Gorouter, each router is upgraded on a rolling basis. During upgrade of a highly available environment with multiple routers, each router is shut down, upgraded, and restarted before the next router is upgraded. This ensures that any pending HTTP requests passed to the Gorouter are handled correctly.

TAS for VMs uses these properties:

  • Unhealthy threshold: Specifies the amount of time, in seconds, that the Gorouter continues to accept connections before shutting down. During this period, the health check reports unhealthy to cause load balancers to fail over to other Gorouters. Configure a value that is greater than or equal to the maximum amount of time it could take your load balancer to consider a Gorouter instance unhealthy, given repeated failed health checks.

  • Healthy threshold: Specifies the amount of time, in seconds, to wait until declaring the Gorouter instance started. This allows an external load balancer enough time to register the instance as healthy.

You can configure these properties in the Networking pane of the TAS for VMs tile. For more information, see Configure networking in Networking TAS for VMs.

The following table describes the behavior of the load balancer health checks when a router shuts down and is restarted.

Step Description
1 A shutdown request is sent to the router.
2 The router receives shutdown request, which causes the following:
  • The router begins sending Service Unavailable responses to the load balancer health checks.
  • The load balancer continues sending HTTP request to the router
3 The load balancer considers the router to be in an unhealthy state, which causes the load balancer to stop sending HTTP requests to the router.

The time between step 2 and 3 is defined by the values of the health check interval and threshold configured on the load balancer.

4 The router shuts down.

The interval between step 2 and 4 is defined by the Unhealthy Threshold property of the Gorouter. In general, the value of this property should be longer than the value of the interval and threshold values (interval x threshold) of the load balancer. This additional interval ensures that any remaining HTTP requests are handled before the router shuts down.

5 If the router shutdown is initiated by an upgrade, the Gorouter software is upgraded.
6 The router restarts. The router returns Service Unavailable responses for load balancer health checks for 20 seconds; during this time the routing table is preloaded. The duration of the health check Service Unavailable response is configurable using the manifest property `router.requested_route_registration_interval_in_seconds`, which defaults to 20 seconds.
7 The routers begins returning Service Available responses to the load balancer health check.
8 The load balancer considers the router to be in a healthy state. The time between step 7 and 8 is specified by the health check interval and threshold configured for your load balancer (health check threshold x health check interval).
9 Shut down and upgrade of the other router begins.
check-circle-line exclamation-circle-line close-line
Scroll to top icon