Chapter 5: Increasing an Application's Fault Tolerance with Elastic Load Balancing
In the previous chapter, we learned how to set up our instances in AWS using EC2. In this chapter, we will further extend that concept and start placing instances behind a load balancer to distribute the load. Placing an instance behind a load balancer will not only help in distributing the load but also if your instance goes down, the load balancer will stop routing traffic to that instance, which will increase the reliability of your application.
The primary function of a load balancer is to accept the client's connection (as shown in the following diagram) and distribute it to the backend targets, for example, EC2 instances, IP addresses, Lambda functions, and containers:
This chapter will start by looking at various load balancer offerings by AWS and which one to use in which situation. Once we gain theoretical...