High Availability & Scalability Flashcards
What is scalability
The ability of a system / application to adapt to handle greater loads
Name the 2 ways a system / application can scale
Vertical and Horizontal Scaling
Characteristics of vertical scaling
increase the size of an instance
e.g. t1.micro to t1.large
common for non-distributed systems like a database
e.g. RDS, Elasticache are services that scale vertically
limited scalability
Characteristics of horizontal scalability
increase number of instances / systems for an application
common for distributed systems such as web / modern applications
It is usually easy to scale vertically than horizontally. true or false?
False
Horizontal scalability is easy thanks to the cloud offerings such as Amazon EC2 ASG, ALB multi AZ
Characteristics of High Availability
application / system is running in at least 2 AZs
survives a data center loss
HA can be passive (e.g. RDS Multi AZ)
HA can be active (e.g. horizontal scaling)
What are load balancers?
Load balancers are systems that forward traffic to multiple servers downstream
Purpose & Characteristics of load balancers
- Spread load across multiple downstream instances
- expose single point of access (DNS) to your application/system
- seamlessly handle failures of downstream systems
- perform health checks
- provide SSL termination
- enforce session stickiness
- HA across zones
- separate public vs private traffic
What is ELB
Elastic Load Balancer is a managed Load Balancer
- AWS guarantees that it will be working
- AWS takes care of upgrades, maintenance, and high availability
- AWS provides few configuration knobs
- costs less to set up own LB but takes lot more effort
Advantages of ELB
Due to integrations to many AWS offerings/services
- EC2 ASG, ECS
- ACM
- Cloudwatch
- Route 53
- WAF
- Global Accelerator
What are health checks? (HC)
A mechanism for LBs to be aware of instances it can forward traffic to
a HC is done on a port and a route (/health)
if response is not 200, then instances is unhealthy
Types of LBs
CLB, ALB, NLB, GLB
What OSI layer does ALB operate at?
Layer 7
What OSI layer does NLB operate at?
Layer 4
What OSI layer does GLB operate at?
Layer 3
What protocols does OSI layer 7 support?
http, https, ws
What protocols does OSI layer 4 support?
tcp, tls, udp
What protocol does OSI layer 3 support?
IP
What mechanism does the LB rely on to restrict traffic from the internet accessing an EC2 instance?
Security Group
The BFF design pattern can be implemented in AWS using what mechanism?
AWS has a feature called Target Group where a group of EC2 instances can be grouped together. A LB can divert traffic, e.g. based on path, to a particular TG. It can also divert traffic to another TG