Previous: , Up: Task 4---Scaling the PHP Front End   [Contents][Index]


3.6.2 Load-balance the Front End

  1. Return to the Lightsail console home page.
  2. From the horizontal menu click ‘Networking’, then click the three dots, then select ‘Manage’.
  3. Under the ‘Target instances
  4. Click ‘Attach another
  5. Repeat these steps for PHP-fe-2 and PHP-fe-3. Wait for them all to pass their health checks before moving on.
  6. Scroll up to the top of the screen.
  7. Copy your ‘DNS name’.

    Your ‘DNS name’ should look similar to ‘82f80d8b8bf5f434083381be722632d2-1378146635.us-west-2.elb.amazonaws.com’. 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.

  8. Paste the string into the web browser, and the application should load.
  9. Reload the page.
  10. Notice how the hostname at the bottom of the screen changes. This indicates that traffic is being routed appropriately.