High Availability Architecture

  • Elastic Load Balancers
    • Application Load Balancer – Best suited for load balancing of HTTP and HTTPS traffic. They operate at layer 7 and are application aware. They are intelligent, and you can create advanced request routing, sending specified requests to specific web servers.
    • Network Load Balancer – Best suited for load balancing of TCP traffic where extreme performance is required. Operating at the connection layer (layer 4), network load balancers are capable of handling millions of requests per second, while maintaining ultra-low latancies.
    • Classic Load Balancer – The legacy elastic load balancers. You can load balance HTTP/HTTPS applications and use layer 7 specific features, such as X-Forwarded and sticky sessions. You can also use strict layer 4 load balancing for applications that rely purely on the TCP protocol.
      • If your application stops responding, the ELB responds with a 504 error. This means that the application is having issues.
      • If you need the IPv4 address of your end user, look for the X-Forwarded-For header.
    • Sticky Sessions – A Classic Load Balancer routes each request indepdently to the registered EC2 instance with the smallest load. Sticky sessions allow you to bind a user’s session to a specific EC2 instance. This ensures that all requests from the user during the session are sent to the same instance. You can enable stick sessions for ALBs as well, but the traffic will be sent to the Target Group level.
    • Cross Zone Load Balancing – A Network Load Balancer can now distribute requests regardless of Availability Zone with the support of cross-zone load balancing. This feature allows Network Load Balancer to route incoming requests to applications that are deployed across multiple Availability Zones.
    • Path Patterns – You can create a listener with rules to forward requests based on the URL path. This is known as path-based routing. If you’re running micro services, you can route traffic to multiple back-end services using path-based routing. For example, you can route general requests to one target group and requests to render images to another target group.
  • Auto Scaling
    • Groups – A group is a logical component (web server group, application group, database group, etc.)
    • Configuration Template – Groups use a launch template or a launch configuration as a configuration template for its EC2 instances. You can specify information such as the AMI ID, instance type, key pair, security groups, and block device mapping for your instances.
    • Scaling Options – Scaling Options provided several ways for you to scale your Auto Scaling groups. For example, you can configure a group to scale based on the occurrence of the specified conditions (dynamic scaling) or on a schedule.
      • Maintain current instance levels at all times (using health checks)
      • Scale manually – The most basic way to scale your resources where you specify only the change in the minimum, maximum, or desired capacity of your Auto Scaling group.
      • Scale based on a schedule – Scaling actions are performed automatically as a function of date and time
      • Scale based on demand – A more advanced way to scale your resources – using scaling policies – lets you define parameters that control the scaling process
      • Use predictive scaling – You can use Amazon EC2 Auto Scaling in combination with AWS Auto Scaling to scale resources across multiple services