9_HA Architecture Flashcards
Load Balancers
3 different types of Load Balancers:
- Applications Load Balancers
- Network Load Balancers
- Classic Load Balancers
Load Balancers
-
504 error means the Gateway has timed out. This means that the application is not responding within the idle timeout period
- Trouble shoot the application. Is it the Web Server or the Database Server?
- If you need the IPv4 address of your end user, look for the X-Forwarded-for header
- Instances monitored by ELB are reported as:
- InService
- OutOfService
- Health Checks check instance health by talking to it
- Load Balancers have their own DNS name. You are never given an IP address (Application LB and Classic LB)
- Read the ELB FAQ for Classic Load Balancers (as opposed to Application Load Balancers)
- Connection draining: Enabled by default. It happens while deregistering an instance from an Elastic Load Balancer. For the duration of the configured timeout, the load balancer will allow existing, in-flight requests made to an instance to complete, but it will not send any new requests to the instance. Once the timeout is reached, any remaining connections will be forcibly closed.
Advanced Load Balancers Theory - Sticky Sessions
Sticky Sessions enable your users to stick to the same EC2 instance. Can be useful if you are storing information locally to that instance.
Advanced Load Balancers Theory - Cross Zone Load Balancing
Cross Zone Load Balancing enables you to load balance across multiple AZ.
Advanced Load Balancers Theory - Path Patterns
Path Patterns allow you to direct traffic to different EC2 instances based on the URL containted in the request.
HA Architecture
- Always design for failure
- Use multiple AZs and multiple Regions wherever you can
- Know the difference between multi-AZ and Read Replicas for RDS
- Know the difference between scaling out and scaling up.
- Read the question carefully and always consider the cost element.
- Know the different S3 storage classes
CloudFormation
- Is a way of completely scripting your cloud environment.
- Quick Start is a bunch of CloudFormation templates already built by AWS Solutions Architects allowing you to create complex environments very quickly.
CloudFormation Drift Detection
AWS CloudFormation Drift Detection can be used to detect changes made to AWS resources outside the CloudFormation Templates. AWS CloudFormation Drift Detection only checks property values that are explicitly set by stack templates or by specifying template parameters. It does not determine drift for property values that are set by default. To determine drift for these resources, you can explicitly set property values which can be the same as that of the default value.
Elastic Beanstalk
With AWS Elastic Beanstalk, you can quickly deploy and manage (web) applications in the AWS Cloud without worrying about the infrastructure that runs those applications. You simply upload your application, and AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring.
Elastic Beanstalk also supports the deployment of web applications from Docker containers.
OpsWorks
AWS OpsWorks Stacks lets you manage applications and servers on AWS and on-premises. With OpsWorks Stacks, you can model your application as a stack containing different layers, such as load balancing, database, and application server. You can deploy and configure Amazon EC2 instances in each layer or connect other resources such as Amazon RDS databases.
A stack is basically a collection of instances that are managed together for serving a common task.
Consider a sample stack whose purpose is to server web applications. It will be comprised of the following instances:
- A set of applications server instances, each of which handles a portion of the incoming traffic.
- A load balancer instance, which takes incoming traffic and distributes it across the application servers.
- A database instance, which serves as a back-end data store for application servers.
High Availability with Bastion Hosts 1 [SAA-C02]
- Two hosts in two separate AZ. Use a Network Load Balancer with static IP addresses and health checks to fail over from one host to the other.
- Cant use an Application Load Balancer as it is layer 7 and you need to use layer 4.
High Availability with Bastion Hosts 2 [SAA-C02]
One host in one AZ behind an Auto Scaling group with health checks and a fixed EIP. If the host fails, the health check will fail and the Auto Scaling group will provision a new EC2 instance in a separate AZ. You can use a user data script to provision the same EIP to the new host. This is the cheapest option, but it is not 100% fault tolerant.
On-Premises strategies with AWS [SAA-C02]
AWS services you can use on-premises
- Database Migration Service (DMS)
- Might have your DR environment in AWS and your on premises environment as your primary
- Server Migration Service (SMS)
- Supports incremental replication of your on-premises servers in to AWS
- Can be used as a backup tool, multi-site strategy (on-premises and off-premises) and a DR tool
- AWS Application Discovery Service
- Helps entreprise customers plan migration projects by gathering information about their on-premises data centers
- It will build a server utilization map and dependency map of your on-premises environment.
- VM Import/Export
- Download Amazolinkn Linux 2 as an ISO