HA Architecture Flashcards
What is a load balancer?
A physical or virtual device that is used to help you balance network load across multiple servers.
What are the three different types of load balancers?
- Application Load Balancer
- Network Load Balancer
- Classic Load Balancer
What are application load balancers?
best suited for load balancing of http and https traffic. They operate at Layer 7 and are application-aware. Can create advanced request routing, sending specified requests to specific web servers.
What are network load balancers?
Best suited for load balancing of TCP traffic where extreme performance is required. Operating at connection level (Layer 4), capable of handling millions of request per second while maintain ultra-low latencies
What are classic load balancers?
Legacy elastic load balancers. You can load balance HTTP/HTTPS application 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
What does the 504 error in a classic load balancer mean?
It means that the application is having issues. This could be either at the Web Server layer or at the Database Layer, not the actual load balancer. Identify the issue and scale it up or out where possible.
What is the X-Forwarded-For?
It contains the public IP address of the user that is coming through via the load balancer.
What is a target group in load balancing?
Where your load balancer routes the requests to targets within that target group. Can have groups of EC2 instances for each region / language / etc.
True or False. You use classic load balancers for intelligent routing.
False. You use application load balancers for intelligent routing.
True or False. Instances monitored by ELB are reported as: InService or OutofService.
True.
True or False. When using a load balancer, you are given both a DNS name and an IP address.
False. They have their own DNS name. You are never given an IP address.
What are sticky sessions?
Classic Load Balancer routes each request independently to the registered EC2 instance with the smallest load. Sticky session allows you to bind a user’s session to a specific EC2 instance. Ensures all requests from the user during the session are sent to the same instance.
Why do you want to use sticky sessions?
Say you are saving something onto the EC2 locally, you want to enable sticky sessions to allow you to be able to retrieve that information readily.
What if you sign on and notice that all the traffic is going to only one EC2 instance?
- Enable Sticky Sessions
- Disable Sticky Sessions?
Disable sticky sessions
What is cross-zone load balancing?
Allows Elastic/Application load balancers to direct traffic across different zones to help ensure efficiency on your EC2 instances.
A user is using Route53 and 100% of traffic is being sent to US-EAST-1A. You notice there is an EC2 instance in US-EAST-1B that isn’t getting any of the traffic, how can you make sure it gets it’s even share of the traffic?
Enable Cross Zone Load Balancing.
What are path patterns?
Create a listener with rules to forward requests based on the URL path. Known as path-based routing.
True or False. Sticky session enable your users to stick to the same EC2 instance. It can be useful if you are storing information locally to that instance.
True.
True or False. Cross Zone Load balancing enables you to load balance across multiple endpoint locations.
False. Cross Zone Load balancing enables you to load balance across multiple availability zones.
True or False. Path patterns allow you to direct traffic to different EC2 instances based on the URL contained in the request.
True.
What are the three components of auto scaling?
- Groups - logical component
- Configuration Templates - instructions for each group on how to and what to launch
- Scaling Options - ways to scale your auto scaling group. ie dynamic scaling (resource based), schedule (monday morning 9 AM), etc.
What are the 5 different scaling options (list them)?
- maintain current instance levels at all times
- scale manually
- scale based on a schedule
- scale based on demand
- use predictive scaling
True or False. Maintaining your current instance at all times involves Amazon to perform a periodic health check on running instances within auto-scaling group. If it finds an unhealthy instance, it prompts the user to notify.
False. Maintaining your current instance at all times involves Amazon to perform a periodic health check on running instances within auto-scaling group. If it finds an unhealthy instance, it terminates that instance and launches a new one.
True or False. Manual scaling allows you to specify only the change in your maximum, minimum, or desired capacity of your auto-scaling group.
True. You can scale up / down the # of instances that you want to maintain.
True or False. Scaling by schedule means that scaling actions are performed automatically as a function fo time and date.
True. For when you know when you will need more / less resources.
True or False. Scale based on demand allows you to use scaling policies to define parameters that control the scaling process.
True.
What is predictive scaling?
Utilizing auto-scaling in a way by combining predictive scaling and dynamic scaling (proactive and reactive approaches, respectively) to scale your Amazon EC2 capacity faster.
True or False. HA Architecture is based around the below tenents:
- always design for failure
- use multiple AZ’s and multiple regions wherever you can
True.
What is the difference between multi-AZ and Read Replicas for RDS?
Multi-AZ is for disaster recovery, read replica is for performance.
What is the difference between scaling out and scaling up?
Scaling out is where we use auto-scaling groups and add additional EC2 instances. Scaling up is when you change the resources of your EC2 instance.
How can you force a failover from one availability zone to another?
By doing a reboot.
What is a cloud formation?
It’s a way of completely scripting your cloud environment.
True or False. Quick start is a bunch of CloudFormation templates already built by AWS Solutions Architects allowing you to create complex environments very quickly.
True.
What is Elastic Beanstalk?
Aimed at developers for those developers that are not as involved in AWS. An easier, less complicated version of CloudFormation. Can quickly deploy and manage applications in the AWS Cloud without worrying about the infrastructure that runs those applications.
What are all the Compute AWS Services? List 8
EC2, Lightsail, ECR, ECS, EKS, Lambda, Batch, Elastic Beanstalk
You have a website with three distinct services, each hosted by different web server autoscaling groups. Which AWS service should you use?
- S3 Static Websites
- Elastic Load Balancers (ELB)
- Application Load Balancers (ALB)
- Classic Load Balancers (CLB)
- Network Load Balancers (NLB)
Application Load Balancers (ALB).
The ALB has functionality to distinguish traffic for different targets (mysite.co/accounts vs. mysite.co/sales vs. mysite.co/support) and distribute traffic based on rules for target group, condition, and priority.
What is scaling out?
Scaling out is where you have more of the same resource separately working in parallel (visualize services sitting side by side).
What is scaling up?
Scaling up is where you make it bigger and bigger like and ugly tower with more floors being added after the initial design was finished
In discussions about cloud services the words ‘availability’, ‘durability’, ‘reliability’ and ‘resiliency’ are often used. What does durability mean?
Durability refers to the on-going existence of the object or resource. Note that it does not mean you can access it, only that it continues to exist.
Which term is used to refer to the likelihood that a resource ability to recover from damage or disruption?
Resiliency can be described as the ability to a system to self heal after damage or an event. Note that this does not mean that it will be available continuously during the event, only that it will self recover.
Which term is used to refer to the likelihood that a resource will work as designed?
Reliability is closely related to availability, however a system can be ‘available’ but not be working properly. Reliability is the probability that a system will work as designed. This term is not used much in AWS, but is still worth understanding.
In S3 the durability of my files is ________.
99.99999999%
When you have deployed an RDS (not Aurora) database into multiple availability zones, can you use the secondary database as an independent read node?
No, the secondary database is for high availability or DR - not for improving read performance. The high-availability feature is not a scaling solution for read-only scenarios; you cannot use a standby replica to serve read traffic. To service read-only traffic, you should use a Read Replica. For more information, see Working with Read Replicas of MariaDB, MySQL, and PostgreSQL DB Instances.
True or False. AWS Global Accelerator uses the vast, congestion-free AWS global network to route TCP and UDP traffic to a healthy application endpoint in the closest AWS Region to the user.
True.
True or False. Seamless failover is ensured as AWS Global Accelerator uses anycast IP address which means the IP does not change when failing over between regions so there are no issues with client caches having incorrect entries that need to expire.
True.
True or False. Network Load Balancers intelligently route traffic for lowest latency.
False.
True or False. A Route 53 failover routing policy uses a primary and standby configuration. Therefore, it sends all traffic to the primary until it fails a health check at which time it sends traffic to the secondary. Route 53 failover policy does not intelligently route traffic for the lowest latency.
True.
True or False. Amazon CloudFront can be configured with “a pair of static IP addresses”.
False. Amazon CloudFront cannot be configured with “a pair of static IP addresses”.
True or False. Route 53 can be used to load balance, however it does not have the ability to route based on information in the incoming request path.
True.
What is CORS?
Cross-origin resource sharing (CORS) is a browser security feature that restricts cross-origin HTTP requests that are initiated from scripts running in the browser. If your REST API’s resources receive non-simple cross-origin HTTP requests, you need to enable CORS support
True or False. Elastic Map Reduce (EMR) is a hosted Hadoop framework and is not used for analytics on streaming data.
True.
True or False. Firehose can be used for running SQL queries.
False. Firehose cannot be used for running SQL queries.