Instance availability

The guideline here is to never run a single instance in a production environment. The simplest approach to improving availability is to spin up multiple EC2 instances and stick an ELB in front of them. The incoming request load is shared by all the instances behind the load balancer.

ELBs use a least connections algorithm to spread requests across healthy instances. Least connections target instances with the fewest outstanding requests and adjust to the request response times of an instance. For example, slower response times from an instance will result in that machine receiving fewer requests. 

Even though it is not recommended to have different instance sizes, within a specific tier, between or within the AZs, the ELB will adjust for the number of requests it sends to smaller or larger instances based on response times. In addition, ELBs use cross-zone load balancing to distribute traffic across all healthy instances regardless of AZs. Hence, ELBs help balance the request load even if there are unequal number of instances in different AZs at any given time (perhaps due to a failed instance in one of the AZs). Note that there is no bandwidth charge for cross-zone traffic (if you are using ELB).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.116.69