Elastic Load Balancing & Auto Scaling Groups Section

This is where we see the power of cloud that is AWS cloud.

Chetanya-Patil
Analytics Vidhya
4 min readOct 13, 2020

--

A)Scalability & High Availability

  • Scalability means that an application/ system can handle greater loads by adapting.
    — ->If the application can scale, that means that it can handle greater loads by adapting.
  • There are two kind of scalability :
    •Vertical Scalability
    •Horizontal Scalability( also called as elasticity)

Vertical Scalability

  • Let’s understand it by taking call center as an example:
    So imagine, we have a call center and we just receive calls, In AWS, when you are vertically scalable, that means that you can increase the size of the instance. So for our call center, say we have a junior operator and say we were able to upgrade that operator, we would get a senior operator. for example a senior operator can handle a lot more calls than the junior operator because it’s more experienced. So this would be vertical scalability looks like in call center. If we could upgrade obviously, a junior operator into a senior operator.
  • So in AWS, Let’s say your application runs on the t2.micro and to do a vertical scalability for that application, that means that now we run our application on t2.large. So,we’ve changed the size of our EC2 instance.
    And vertical scalability is very common when you a non-distributed system. for-example database, if you want to give more performance to your database, you would just increase the size of your database. But usually with vertical scalability, there is a limit to how much you can vertically scale and that is a limit of the hardware. Even in nowdays these limit can very very high.

Points:

  • Vertical Scalability means increasing the size of the instance.
  • For example, your application runs on a t2.micro
  • Scaling that application vertically means running it on a t2.large
  • Vertical scalability is very common for non-distributed systems, such as a database.
  • There’s usually a limit to how much you can vertically scale(hardware limit)

Horizontal Scalability

Now in horizontal Scalability instead of increasing the size of your EC2 instance, you increase the number of instances or systems for your application. So back in our example,that is call center we have operator, and we want to do horizontal scalability for that operator, that means we will add another operator. and If we need more operator we will add another operator, and so on. So we can scale horizontally from one operator to all the way to six operators.

So when you have horizontal scaling,that implies as you can see on the right hand side, that you need to have a distributed system. And for call center, that makes sense.You don’t need these people to be talking constantly. For a call center, each of the individual operators can take calls on their own. In AWS, or for web applications, so this is going to be very common, so if you have a web application or a modern application, you usually design it with horizontal scalability in mind. And it’s super easy on AWS to scale, thanks to Amazon EC2 and auto scaling groups.

Points:

  • Horizontal Scalability means increasing the number of instances/ systems for your application.
  • Horizontal scaling implies distributed systems.
  • This is very common for web application/modern applications.
  • It’s easy to horizontally scale thanks the cloud offering such as Amazon EC2

High Availability

And it goes hand in hand with horizontal scaling. High availability means that you are running your application and system in at least two availability zones on AWS. But for our call center, what does it mean? That means that we have a call center in New York, and maybe a second call center in San Francisco. And somehow, if one of these call centers is down,for example, say there’s a power outage in New York, then we can still take calls in San Francisco. And so we are highly available. Obviously, San Francisco will be more busy, but we are at least surviving the disaster of a power outage in one of our buildings.So in AWS you use two availability zones, obviously. And the goal of it is to usually survive a data center loss, a disaster. And in AWS, it could be an earthquake, that could be a power outage that could a lot of things.

Points:

  • High availability usually goes hand in hand with horizontal scaling.
  • High availability means running your application/ system in at least 2 Availability Zones.
  • The goal of high availability is to survive a data center loss(disaster).

Summary for High Availability & Scalability For EC2

  • Vertical Scaling : Increase instance size (=scale up/down)
    • From: t2.nano- 0.5G of RAM, I vCPU
    • To: u- I2tbI.metal — 12.3TB of RAM, 448 vCPUs
  • Horizontal Scaling: Increase numbers of instances (=scale out/in)
    • Auto Scaling Group
    • Load Balancer
  • High Availability: Run instances for the same application across multi AZ
    • Auto Scaling Group multi AZ
    • Load Balancer multi AZ

Is these Scalability Vs Elasticity (vs Agility)

  • Scalability: ability to accommodate a larger load by making the hardware stronger (scale up), or by adding nodes (scale out)
  • Elasticity: once a system is scalable, elasticity means that there will be some “auto scaling” so that the system can scale based on the load. This is “cloud-friendly”: pay-per-use, match demand, optimize costs.

(In AWS, Elasticity is the key concept)

  • Agility: (not related to scalability- distractor) new IT resource are only a click away, which means that you reduce the time to make those resources available to your developers from weeks to just minute. So that the organization is to be more agile.

B) Elastic Load Balancing https://medium.com/@chetanyapatil/elastic-load-balancing-fb6a9f851c53

--

--