Recently started reading a lot about AWS and doing some practical things to be in hand-on touch with the concept. After reading about IAM user and EC2 I got to this interesting topic which I can be really important when you’re building a highly distributed system.

So it comes down to two things. This will be some basic before we start with the main topic but it kind of relates to that. I’m talking about scalability and high availability.

Scalability means that an application can handle greater loads by adapting some techniques. There are two kinds of scalability:-

1.Vertical Scalability

Vertical scalability means increasing the size of the instance. For example, your application runs on a t2.micro but scaling that means running it on a t2.large.

RDS, ElastiCache are services that can scale vertically. There’s usually a limit to how much you can vertically scale(hardware limit).

2. Horizontal Scalability

Horizontal Scalability means increasing the number of instances for your application. This is very common for web applications.

Horizontal scaling implies distributed systems.

High Availability

High availability means running your application in at least 2 data centers (Availability Zones). The goal of high availability is to survive a data center loss.

What is Load balancing?

Load balancers are servers that forward internet traffic to multiple servers (Ec2 instances) downstream.

Why should we use a load balancer?

So we can spread the load across multiple downstream instances. Also, we can expose a single point of access (DNS) to your application. Basically we don’t need to know about the whole backend for EC2 we only want to know about the hostname of the load balancer.

It will also do the regular health checks to your instances and it will know when to send the load on the instances. It can provide SSL termination (HTTPS) for your websites.

A load balancer can be highly available across zones.

Health Checks

Health checks are important for Load Balancers. They enable the load balancer to know if instances it forwards traffic to are available to reply to requests. It can be done on a port and a route. If the response is not 200, then the instance is unhealthy.

Load Balancer will check the port 4567 to check the EC2 instances. If it is healthy 200 (Ok). Then it will be able to send a request. The best thing is you can configure this to how many seconds you want to check the instance again. Let’s say if I have set it up for 5 sec then it will check the instance every 5 seconds.

All these benefits you get it with AWS and will cost much less.

#learning #deployment #aws-ec2 #load-balancing #aws #deep learning

AWS: What Is Load Balancing?
1.25 GEEK