Scalability and Elasticity with EC2

Scalability is the ability to handle increasing load. Elasticity is the ability to scale automatically.

EC2 supports both vertical and horizontal scaling.

Vertical scaling:

  • Change instance type.
  • Limited by hardware constraints.
  • Requires restart.

Horizontal scaling:

  • Add more instances.
  • Requires load balancing.
  • Enables fault tolerance.

In production systems, horizontal scaling is preferred.

Auto Scaling Groups (ASG) automatically adjust the number of instances based on:

  • CPU utilization
  • Request count
  • Custom metrics

Why this matters architecturally:

  • Prevents overprovisioning.
  • Reduces cost.
  • Improves availability.
  • Enables resilience.

Production insight:

Never rely on a single EC2 instance in a production environment. Use:

  • Multiple Availability Zones
  • Load balancers
  • Health checks
  • Auto Scaling policies

In this section, I learned:

0 of 4 completed

Choose your language

Select your preferred language for the site