Skip to content

Connect a load balancer

View as Markdown

A load balancer gives your Auto Scaling Group one address and shares the requests among its VMs. TIR Load Balancer covers the load balancer itself. To make the same connection from the load balancer’s side, see Connect an Auto Scaling Group.

On the Associated Load Balancers tab of the group, select Create Load Balancer. The new load balancer starts with this group as its backend.

  1. On the details page of the group, open the Associated Load Balancers tab, which has every Web traffic load balancer the group can use.
  2. Open the row menu of the load balancer and select Attach.
  3. Under Backend group, check the Name, Protocol and Port. TIR suggests <group name>-backend as the name, adding -2, -3 and so on if the load balancer already uses it. Choose HTTP, HTTPS, or gRPC, and set Port to the port your application listens on.
  4. Under Routing rule, check the Rule name, <group name>-route by default, and When a request matches. A rule with no condition sends every request to the group.
  5. (Optional) Under Advanced settings, change how requests are distributed, the health check, the request timeout, and the number of retries.
  6. Select Attach.

If the load balancer already has a rule with no condition, this group would receive nothing, so add a condition to the new rule before you attach.

Attaching creates a backend group and a routing rule. If the load balancer refuses the rule, the group is added but no traffic reaches it yet; detach, and attach again once the load balancer is healthy.

On the load balancer’s own create or edit page, the backend picker lists an Auto Scaling Group under the tab Auto Scaling Group. You can pick a group only while it is Running. This attaches the group itself, not a snapshot of its VMs. An Auto Scaling Group needs a backend group of its own that holds only the group.

Check which load balancers serve the group

Section titled “Check which load balancers serve the group”

On Associated Load Balancers, Traffic to this group says whether requests reach the group. Serving means they do. Otherwise it says why not: the route is missing and the load balancer answers 503, the group has no VMs to serve, or the load balancer has failed, is stopped, is starting or is unavailable. Domain is the load balancer’s address, once it has one. An attached load balancer stays listed even while it is Initializing or Failed. If there is none to attach, create one from the same tab.

Once traffic reaches the group, Connect on Overview gives the load balancer’s address as https://<domain>.

  1. On the Associated Load Balancers tab, open the row menu of the attached load balancer and select Detach.
  2. Confirm. The group’s VMs stop receiving traffic from the load balancer and keep running, and you can attach the group again at any time.

Detaching also removes the backend group and its route when this group was its only member. If that was the load balancer’s only routing rule, it then answers 503 to every request.

Traffic to this group reads Serving for the load balancer, and the Domain opens your application. Requests are shared among the VMs that the group has running.

To see which VMs receive traffic, see Monitor an Auto Scaling Group. For help with a group that returns 503, see Troubleshooting TIR Auto Scaling Groups.