4.2 - Load balance the front-end

  • Return to the Lightsail console home page and choose Networking from the horizontal menu and click on the name of your previously-created load balancer.

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

  • Click Attach

  • Click Attach another

  • Repeat the previous three steps for PHP-fe-2 and PHP-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 to 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.