Amazon ELB CW AS

Elastic Load Balancing (ELB)

  • ELB is a highly available service that distributes traffic across EC2 instances.

Amazon Cloud Watch (CW)

  • Cw monitors cloud resources and applications

Auto Scaling (AS)

  • AS maintains availability of applications by scaling EC2 capacity up or down

ELB

ELB distributes traffic across EC2 in on or more AZs

ELB supports routing and load balancing of

  1. HTTP
  2. HTTPS
  3. TCP
  4. SSL

ELB support integrated Certificate Management and SSL termination

Types

  • Internet-Facing Load Balancer
    • request form Internet to EC2s
  • Internal load balancer
    • load balancer between tiers of the applications after the internet facing load balancing

HTTPS Load Balancer

  • SSL offload
  • ELB does not support SNI
  • Certs need Subject Alternative Name (SAN)

Listener

Process that checks for connection requests

supports

  • HTTP
  • HTTPS
  • TCP
  • SSL

Configuring ELB ( console or cli )

Idle connection  timeout

  • triggered when no data is sent over the connection for a specified time periods
  • HTTP and HTTPS enable keep-alive
  • allows lb to reuse connections

Cross-zone load Balancing

  • evenly route traffic regardless of AZ

Connection Draining

  • Keep connections but stop sending new traffic

Proxy Protocol

  • TCP or SSL forwards requests without modifying request

Sticky Sessions

  • enables LB to bind a users’s session to a specific instance

health Checks

  • test status of EC2 instances
  • ping, connection attempt, or a page that is checked

Cloud Watch

Monitor AWS resource sin real time

support multiple actions – SNS or auto scaling

  • basic 5 minutes
  • detailed every minute
  • CloudWatch uses GET request
  • CloudWatch agent can send log data to CW logs running Linux or Ubuntu
  • 5000 alarms per account
  • retained for 2 weeks
    • need longer move to S3 and Glacier

Auto scaling

Scale EC2 capacity automatically by scaling out and scaling in.

Maintain a minimum or specified number of instances

  • manual Scaling
    • max, min or desired capacity  of AS Group
    • for infrequent events
  • scheduled scaling
    • scaling actions are performed automatically  as a function of a time and date
  • Dynamic Scaling
    • define parameters controlled by AS Group
      • network bandwidth

Auto Scaling Components

Launch configuration – template to crate new instance

  • Name
  • AMI
  • Instance Type
  • Security Group
  • key pairs

Auto Scaling Group

As group is a collection of EC2 instances managed by the auto scaling service

AS Group must contain

  • Name
  • Max and min of instances

Can use on demand or spot instances

Ondemand by default

Scaling Policy

increase or decrease by a specific number of instances

can associate more than one scaling policy with auto scalling group

  • Scale out Quickly
  • Scale in Slowly

cooldown period – configurable, when  to suspend scaling activities for a short time