Optimizing Compute in AWS

AWS Cloud Technology and Services

Rahulraj Singh

Technical Product Manager

What is compute in AWS?

 

AWS compute = virtual processing power

Three images highlighting cloud servers, physical machines, and power backup.

AWS Cloud Technology and Services

What is Amazon Elastic Compute Cloud (EC2)?

 

  • Provides resizable compute capacity in the cloud
  • Each individual EC2 machine is referred to as an instance

Key characteristics:

  • Ability to scale up or down based on demand
  • Availability of a varied range of instance types for specialized use cases

A branched chart showing compute connection to storage, databases, and networks.

AWS Cloud Technology and Services

EC2 instance type categories

AWS offers six categories of EC2 instances for specialized workloads

  • General purpose
  • Compute optimized
  • Memory optimized
  • Storage optimized
  • Accelerated computing
  • High Performance Computing (HPC) optimized

Icons showing grouped EC2 instances and a singular EC2 instance.

AWS Cloud Technology and Services

General purpose and storage optimized instances

General purpose instances

  • Balance of compute, memory, and networking resources
  • Use cases:
    • Hosting dynamic websites
    • Maintaining code repositories

EC2 instance icon showing a general purpose instance.

Storage optimized instances

  • High, sequential read and write access to large datasets
  • Use cases:
    • Data warehousing
    • Refactoring large relational databases

EC2 instance icon showing a storage optimized instance.

AWS Cloud Technology and Services

Compute and memory optimized instances

Compute optimized instances

  • Compute-intensive and high-performance workloads
  • Use cases:
    • Scientific simulations
    • Financial modeling

EC2 instance icon showing a compute optimized instance.

Memory optimized instances

  • Memory-intensive workloads
  • Use cases:
    • Real-time stream data analytics
    • Generating close captions

EC2 instance icon showing a memory optimized instance.

AWS Cloud Technology and Services

Specialized compute instances

Accelerated computing instances

  • Contain specialized hardware accelerators, like GPUs or FPGAs
  • Use cases:
    • Deep learning
    • Rendering gaming graphics

EC2 instance icon showing an accelerated computing instance.

HPC optimized instances

  • Best price performance for running high performance workloads at scale
  • Use cases:
    • Weather forecasting
    • Crash simulations

EC2 instance icon showing a high performance compute optimized instance.

AWS Cloud Technology and Services

Load balancing in AWS

Load balancing ensures even distribution of incoming traffic among multiple EC2 instances, preventing overload on a single server

  • Ensures high availability
  • Provides horizontal scaling

 

Types of load balancers in AWS

Four icons showing classic, network, application, and gateway load balancers.

AWS Cloud Technology and Services

How does load balancing work?

 

  1. Users send requests

An architecture diagram highlighting user requests sent to a load balancer.

AWS Cloud Technology and Services

How does load balancing work?

 

  1. Users send requests
  2. Requests hit the load balancer

An architecture diagram highlighting user requests sent to a load balancer.

AWS Cloud Technology and Services

How does load balancing work?

 

  1. Users send requests
  2. Requests hit the load balancer
  3. Primary target group is instantiated by the application load balancer first

An architecture diagram highlighting a user request move from a load balance to primary EC2 instances.

AWS Cloud Technology and Services

How does load balancing work?

 

  1. Users send requests
  2. Requests hit the load balancer
  3. Primary target group is instantiated by the application load balancer first
  4. If demand increases, the load balancer activates the secondary target group and distributes the load across all instances

An architecture diagram highlighting a user request move from a load balance to primary and secondary EC2 instances.

AWS Cloud Technology and Services

What is compute elasticity?

Elasticity ensures your system can scale up or down based on demand, providing flexibility in resource allocation

  • EC2 instances achieve elasticity through EC2 Auto Scaling

 

What is EC2 Auto Scaling?

  • Automatically adjust the number of active instances based on usage and requirement
  • Optimize costs
  • Prevent over-provisioning
AWS Cloud Technology and Services

How does auto-scaling work?

  1. Users send requests

An architecture diagram showing a user request generation.

AWS Cloud Technology and Services

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service

An architecture diagram showing a user request hitting an EC2 Auto Scaling service.

AWS Cloud Technology and Services

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service
  3. The service then routes requests to the active EC2 instances

An architecture diagram showing a user request hitting an EC2 Auto Scaling service and getting divided to EC2 instances.

AWS Cloud Technology and Services

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service
  3. The service then routes requests to the active EC2 instances
  4. If demand increases, it starts adding new EC2 instances to manage the additional load

An architecture diagram showing multiple user requests hitting an EC2 Auto Scaling service and getting divided to active and backup EC2 instances.

AWS Cloud Technology and Services

How does auto-scaling work?

  1. Users send requests
  2. The requests are routed to EC2 Auto Scaling service
  3. The service then routes requests to the active EC2 instances
  4. If demand increases, it starts adding new EC2 instances to manage the additional load
  5. As demand goes down, the newly added EC2 instances are shut down

An architecture diagram showing a user request hitting an EC2 Auto Scaling service and getting divided to EC2 instances.

AWS Cloud Technology and Services

Load balancing vs. auto-scaling

Load balancing

  • Route traffic evenly
  • Utilize existing EC2 instances

An icon showing AWS Load Balancer.

Auto-scaling

  • Ensure demand is always met
  • Ability to add/remove EC2 instances

An icon showing EC2 Auto Scaling.

AWS Cloud Technology and Services

Let's practice!

AWS Cloud Technology and Services

Preparing Video For Download...