Section 4: Elastic Load Balancing and Auto Scaling Flashcards

1
Q

Scailability and Elasticity meaning

A

Scailability = ability to add more resource when needed

Elasticity = when no longer needed, shrinks back

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Scaling Up vs Scaling Out

A

Scaling up = adding more resources to the instance

Scaling out = adding more instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

EC2 Auto Scaling

A

EC2 Auto Scaling launches and terminates instances dynamically, e.g. if CPU usage goes above/below X%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Launch template

A

Lunch templates specified EC2 instance config, e.g auto scaling rules, instance type, config VPN and subnets etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Basic vs Detailed monitoring

A

Basic monitoring
* 5 minute granularity
* No charge

Detailed monitoring
* 1 minute granularity
* Charges apply

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Lifecycle hooks

A

Lifecycle hooks - used to perform custom actions by pausing instances as the Auto Scaling Group lunches or terminated them.

Use case: run a script to downlad and install software after lanching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Load balancer

A

Loadbalancer has 1 public endpoint address (e.g. example.com) which then distributes the traffic between multiple Web Servers (which can be in different availability zones)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Fault tolerence

A

Fault Tolerence = ability to recover in case of component failure. E.g. you can place web servers in two availability zones and a load balancer will route appropraitely should one server/region fail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Types of Elastic Load Balancers (ELB)

A

Elastic load balancer types:

Application Load Blancer
* operates at request level
* routes based on content of the request (layer 7)
* HTTP/HTTPS protocol
* supports path-based routing, query string params routing, host-based routing, IP routing (HTTP header based routing)
* supports instances, IP addresses, contains, lambdas
* Does NOT support static IP address

Network load balancer
* operates at connection level
* routes connections on IP protocal data (layer 4)
* TCP/TLS/UDP protocol
* offers ultra high performance, low latency, TLS offloading
* Can have static / elastic IP
* Supports UDP and static IP address targets
* Does support static IP address

Gateway Load Balancer
* used in front of virtual appliances such as firewalls, IDS/IPS and deep packet insepction systems
* operates at level 3 - listens for all packets on all ports
* Uses port 6081 to exchange traffic

More info - https://aws.amazon.com/elasticloadbalancing/features/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Elastic Load Blancer uses cases

A

Application Load Balancer:
* web applications with L7 routing (HTTP/HTTPS)
* Microservices architectures (e.g. Docker containers)
* Lambda targets

Network load balancer
* TCP and UDP based applications
* ultra-low latency
* static IP addresses
* VPC endpoint services

Gateway Load Balancer
* Web app / next generation firewalls
* DDoS system
* intrusion detection/prevention systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Targets and Target Groups

A

Targets = EC2 instances, IP addresses, Lamba functions or containers

Target Groups = used to route requests to registered targets (used in/for load balancing)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

EC2 Scaling Types

A

EC2 Scaling Types

  • Target Tracking
    Adds or removes capacity as required to keep the metric at or close to the specific target value. Use when you want to keep the CPU usage of your ASG at 70%
  • Simple Scaling - Waits for the health check and cool down periods to expire before re-evaluating. Useful when load is erratic. AWS recommends step scaling instead of simple in most cases.
  • Step Scaling - Increases or decreases the configured capacity of the Auto Scaling group based on a set of scaling adjustments, known as step adjustments. You want to vary adjustments based on the size of the alarm breach
  • Scheduled Scaling - scales at defined date/time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Storing Session State

A

Session State data is used to ensure data persists even if an EC2 instance fails.

Session State storage is often used for session data such as authentication details stored/retrieved in a DynamoDB table. This is so users do not need to re-authenticate.

ElastiCache is also another popular solution fo storing session-state data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Sticky Sessions

A

Sticky sessions on your Application Load Balancer puts a cookie on a users session so that they always use the same EC2 instance. This can aid performance as the instance can maintain or cache the session state information locally (e.g. user authentication state).

There are two types of cookies:
* load balancer generated cookie
* application-based cooke (load balancer generates this)

Beware load balancer cookies always have the same name, so if using more than 1 load balancer could causing clashing issues.

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which type of scaling is provided by Amazon EC2 Auto Scaling?

A

Amazon EC2 Auto Scaling provides horizontal scaling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which type of ELB is best suited for use cases that require ultra-low latency TCP connections

A

Network Load Balancer is best for ultra-low latency TCP connections.

Network Load Balancer routes connections based on IP protocol data (layer 4) and offers ultra-high performance, low latency and TLS offloading at scale.

17
Q

**

What are examples of virtual appliances?

A

Virtual appliances:
* firewall
* intrusion detection system (IDS)
* intrusion prevention system (IPS)

18
Q

Which type of load balancer would be used in front of virtual appliances such as firewalls, IDS/IPS, and deep packet inspection systems?

A

Gateway Load Balancer would be used in front of virtual appliances

https://aws.amazon.com/elasticloadbalancing/gateway-load-balancer/