You are previewing Programming Amazon EC2.

Programming Amazon EC2

Cover of Programming Amazon EC2 by Flavia Paganelli... Published by O'Reilly Media, Inc.
O'Reilly logo

Elastic Load Balancing

Wikipedia says that load balancing is “a technique to distribute workload evenly across two or more computers, network links, CPUs, hard drives, or other resources, in order to get optimal resource utilization, maximize throughput, minimize response time, and avoid overload.” And, Wikipedia notes, it can also “increase reliability through redundancy.” To finish the description, Wikipedia says load balancing “is usually provided by a dedicated program or hardware device.”

Amazon Elastic Load Balancing (ELB) is all of the above. It distributes load evenly across availability zones and across instances within those zones. ELB checks the health of the instances and will not route traffic to unhealthy instances. You have the ability to use something called sticky sessions, which can force a particular session to one instance. You would need this in case the instances keep session data in a nonshared location such as local memory.

ELB is not a dedicated program or a hardware device; it is a load-balancing service. As a service, it can automatically scale its capacity depending on incoming traffic. As a result, an ELB is not referenced by an IP address, but by a fully qualified domain name. It’s been said that an ELB scales best with slowly increasing/decreasing traffic, but in our experience spikes are handled quite well.


Layar is a high-profile augmented reality (AR) application for smartphones like Android and iPhone. The ongoing traffic is reasonable, but not ...

The best content for your career. Discover unlimited learning on demand for around $1/day.