DEV Community

Cover image for Cloud Computing #Day 3
Giriraj Roy
Giriraj Roy

Posted on

Cloud Computing #Day 3

We are here on the third day of the exciting cloud voyage where waves of Scaling and Elastic Load Balancing will be clashing so beautifully. So what is scaling or scalability?

Scalability

Scalability involves beginning with only the resources you need and designing your architecture to automatically respond to changing demand by scaling out or in. That is to say it will monitor the application and automatically adjust capacity to maintain steady, predictable performance at the lowest possible cost which is infact Amazon EC2 Auto Scaling.

image

Amazon EC2 Auto Scaling

Amazon EC2 Auto Scaling enables you to automatically add or remove Amazon EC2 instances in response to changing application demand. By automatically scaling instances in and out as needed, a greater sense of application availability can be maintained.

This gets even more exciting when we can use two approaches: dynamic scaling and predictive scaling.

  • Dynamic scaling responds to changing demand.
  • Predictive scaling automatically schedules the right number of Amazon EC2 instances based on predicted demand.

Pro Tip: Dynamic Scaling and Predictive Scaling can be used together for faster scaling

Diving Deeper

In the cloud, computing power is a programmatic resource, by adding Amazon EC2 Auto Scaling to an application, new EC2 instances can be added to the application when necessary and terminate them when no longer needed.

Working Principle >>

image

When preparing to launch an application on Amazon EC2 instance and configuring the size of the Auto Scaling group, you might set the minimum number of Amazon EC2 instances at one. This means that at all times, there must be at least one Amazon EC2 instance running. This is the minimum capacity, the number of Amazon EC2 instances that launch immediately after you have created the Auto Scaling group.

The second configuration that can be set is Desired Capacity, which is set to minimum capacity by default if it is not explicitly set.

There is also the configuration of setting the maximum capacity to configure the Auto Scaling Group in response to increased demand.

Chalking out the Benefits

  • Setup scaling quickly

AWS Auto Scaling lets you set target utilization levels for multiple resources in a single, intuitive interface. You can quickly see the average utilization of all of your scalable resources without having to navigate to other consoles.

  • Make smart scaling decisions

AWS Auto Scaling monitors your application and automatically adds or removes capacity from your resource groups in real-time as demands change.

  • Automatically maintain performance

Using AWS Auto Scaling, you maintain optimal application performance and availability, even when workloads are periodic, unpredictable, or continuously changing.

  • Cost Effective

AWS Auto Scaling can help you optimize your utilization and cost efficiencies when consuming AWS services so you only pay for the resources you actually need

Elastic Load Balancing

This is the AWS service that automatically distributes the incoming application traffic to multiple resources like Amazon EC2 instances. It monitors the health of its registered targets, and routes traffic only to the healthy targets.

The load balancer acts as a single point of contact betwwen the incoming traffic and the Auto Scaling Group. Although Elastic Load Balancing and Amazon EC2 Auto Scaling are separate services, they work together to help ensure that applications running in Amazon EC2 can provide high performance and availability.

image

The way Elastic Load Balancer toggles the number of instances between High Demand Period and Low Demand Period is essential. Whenever there is a new instance in the network it will only have to send the signal to the load balancer instead of all the sources.

There are three different types of Load balancers:

  • Application Load Balancer
  • Gateway Load Balancer
  • Network Load Balancer

Use Cases

  • Modernize applications with serverless and containers : Scale modern applications to meet demand without complex configurations or API gateways.
  • Improve hybrid cloud network scalability : Load balance across AWS and on-premises resources using a single load balancer.
  • Retain your existing network appliances : Deploy network appliances from your preferred vendor while taking advantage of the scale and flexibility of the cloud.

image

Top comments (0)