Skip to content

Get started with TIR Load Balancer

View as Markdown

Create a Load Balancer, send its traffic to one VM, and see your VM answer a request. You need a TIR project in Delhi or Chennai and a TIR VM that is running a web server on port 80. To create a VM, see Get started with TIR Virtual Machines first.

In your project, open Compute > Load Balancer and select Create Load Balancer. Keep the Web Traffic (HTTP/HTTPS) type and the External visibility, enter a name, and leave the capacity and the protocol as they are. Select Create Load Balancer to finish. The full set of choices is in Create a Load Balancer.

The details page opens and shows Initializing while TIR creates the Load Balancer. The status updates by itself. When it shows Running, the Overview tab has an address under Domain. If it shows Failed, see My Load Balancer shows Failed.

A backend group is the pool of backends that a rule sends traffic to. Open the Backend groups tab, select New group, and enter a name. On the Virtual Machines tab, tick your VM, which must be ready, and leave Port at 80. Select Create group. The steps are in Create a backend group.

Traffic reaches your backend group through a rule. Until a Running Load Balancer has a rule that forwards to a backend group, it answers every request with a 503 error. Open the Rules tab and select Add rule. Enter a rule name, leave the conditions empty so that the rule matches every request, and choose your backend group under Forward to. Save the rule. Add a rule covers conditions and splitting traffic.

Copy the address from Domain on the Overview tab, and open https://<domain> in a browser or send it a request from a terminal. Replace <domain> with the address you copied. The request reaches your VM’s web server through the Load Balancer.