Chapter 15. High availability: load balancing
So where are we? In the early chapters, we played with the basics: EC2, S3, RDS, IAM, Route 53, CloudWatch, tags, and the AWS CLI. That was great. Then I introduced you to the wonders of elasticity and scalability and touched on making instances more highly available through the use of AWS availability zones.
But to be perfectly honest, nothing discussed so far will make things more highly available—or scalable or elastic, for that matter. Why not? Because you don’t have a high-level administration mechanism to coordinate between your front-line and backup instances. As it stands, even if you did have a running replica of a recently failed instance, how would your website visitors know where to go to find it? You need to add a load balancer to the mix that can monitor the health of your running instances and, if one goes dark, redirect incoming traffic toward active resources.
Like all load-balancing tools, Amazon’s Elastic Load Balancing (ELB) system is designed for more than just managing failovers. Failover, you’ll recall, is the automatic transfer of server tasks from a failed instance to an identical replacement. As the term load balancer suggests, ELB’s overall mandate is to balance traffic loads among multiple resources to satisfy defined efficiency and performance needs.