2.4 - Load balance the front-end

  • Return to the Lightsail console home page and choose Networking from the horizontal menu.

  • Click Create Load Balancer

  • Scroll down and enter todo-lb for the load balancer name

  • Click Create Load Balancer

  • Under Target instances choose node-fe-1 from the dropdown list

  • Click Attach

  • Click Attach another and repeat the previous two steps for node-fe-2 and node-fe-3

It will take several minutes for all three instances to register their health checks as Passed once this has happened, move to the next step

  • From the top of the screen copy the long string following DNS name:. This is the URL for your Lightsail load balancer. Any requests on this URL will be routed to one of your three front end instances.

  • Paste the string into a web browser, the Todo application should come up. Reload the page and notice how the host name at the bottom of the screen changes - this indicates that traffic is being routed appropriately.