L5 - Autoscaling 2/2 Flashcards

1
Q

What are cooldown periods for policies?

A
  • only after this time, breaches are handled again
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does predictive autoscaling have to do with an autoscaling group?

A

It determines proactively the minimum of the autoscaling group and thus increases resources.

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

What is a load balancer (LB)?

A

load balancer = single point of request and it then it is distributed across service instances

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

When is LB important?

A

In the case of multiple service instances.

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

Why do you need a LB to scale out?

A

Scaling out only works if all replicas are equally busy. LB is required to distribute requests.

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

goals of LB?

A
  • efficient utilization of a set of resources
  • exploit aggregated capacity of replicas to reduce response time and failure rate
  • increase availability (LB performs health checks, restarts faulty replicas/instances)
  • enables non-disruptive management (in case of provisioning and de-provisioning of resources)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Are there multi-layer LB?

A

Yes

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

How is LB implemented?

A
  • instances are allocated to certain VMs by the load balancer
  • the VMs are load balanced to servers
  • the LBs on different levels should interact with each other and exchange information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the difference between static and dynamic LB?

A
  • in static LB there is no feedback (e.g. weighted round robin)
  • in dynamic LB there is feedback on the status of the servers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Dynamic LB Diagram

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

What are the two sub-categories of dynamic LB?

A

Distributed and non-distributed

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

What are the two sub-categories of distributed LB?

A

Cooperative and non-cooperative

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

What are the two sub-categories of non-distributed LB?

A

Central and semi-distributed

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

What is distributed LB?

A

Nodes collaborate

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

What is cooperative LB?

A
  • nodes have the same goal (e.g. optimize memory)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is non-cooperative LB?

A
  • nodes have different goals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is centralized LB?

A
  • one central LB
18
Q

What is semi-distributed LB?

A

Nodes are partitioned and one LB is responsible for partition.

19
Q

4 approaches for web applications

A
  • round-robin DNS
  • DNS delegation
  • Client-side random sampling
  • Server-side load balancing
20
Q

Round-robin DNS

A
  • domain name is mapped to multiple IP addresses
  • IP addresses are given to clients in RR fashion
21
Q

name server

A

Name servers work as a directory that translates domain names into IP addresses.

22
Q

DNS delegation

A
  • structure domain (e.g. tum.de) in two zones
  • each zone has it’s own name server
  • DNS request is forwarded to both zones
  • the one resolving the address first wins the request
23
Q

What is DNS?

A

The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.

24
Q

Client-side random sampling

A
  • client receives a list of IP addresses
  • it selects randomly one to connect to
25
Q

Server-side load balancing

A

LB receives requests at a given port and distributes them

26
Q

What is session persistence in LB?

A

Session persistence ensures that a client will remain connected to the same server throughout a session or period of time. Because load balancing may, by default, send users to unique servers each time they connect, this can mean that complicated or repeated requests are slowed down.

stickiness/Session persistence = results in a “sticky session” between a user and a particular server. In this process, a load balancer uses logic to find an affinity between a specific network server and a client for the length of an entire session, defined by the amount of time a unique IP address stays on the site.

27
Q

How does a LB create sticky sessions?

A

A load balancer creates sticky sessions by either tracking a user’s IP details or using a cookie to assign that user an identifying attribute. This allows the load balancer to use the tracking ID to route all of that user’s requests to a specific server throughout the session.

28
Q

3 classes of LB algorithms

A

class-aware
content-aware
client-aware

29
Q

What is class-aware LB

A

based on classification of requests into the classes: sensitive, best-effort, undesired
eg. based on port numbers (e.g. port 1 is sensitive)

30
Q

What is content-aware LB?

A

based on request content e.g. URL
e.g. direcitng similar requests to the same server to exploit access to same information

31
Q

What is client-aware LB?

A

based on packet source
can improve performance as before

32
Q

4 LB algorithms

A
  • Round Robin (RR) and Weighted Round Robin
  • Least connection and weighted least connection
  • resource based
  • weighted response time
33
Q

Round Robin (RR) and Weighted Round Robin

A

RR is very simple and just allocates people to servers sequentially. Not good if some people use servers for a long time. → use smart load balancing.
Processors circularly assign each process without defining any priority. This results in a faster response in case of similar workload distribution among the processes. All the processes have different loading time. Therefore, some nodes might be heavily loaded, while the others may remain under-utilized
weight represents capability of server in weighted Round Robin

34
Q

Least connection and weighted least connection

A

distributes to server with the least number of active connections
Checks which servers have the fewest connections open at the time and sends traffic to those servers. This assumes all connections require roughly equal processing power.

35
Q

resource based LB algorithm

A

CPU load of the servers is taken into account
Distributes load based on what resources each server has available at the time. Specialized software (called an “agent”) running on each server measures that server’s available CPU and memory, and the load balancer queries the agent before distributing traffic to that server.

36
Q

weighted response time LB algorithm

A

the response time for a health check is used to compute the weights

37
Q

AWS Elastic Load Balancing (ELB)

A
  • Distributes incoming traffic across the instances in the Auto Scaling Group
  • Can use load balancer metrics (request counts per target) for auto scaling
  • Can use it for health checks (elastic load balancer sends health check messages to instance to find out if they are active or not)
38
Q

Classic Load Balancer (old; 2009)

A

Distributes requests evenly across availability zones or evenly across all registered instances in the target group.

39
Q

Application Load Balancer (VPC only, Application Layer)

A

Routes http requests based on contents to specific target groups

40
Q

Network Load Balancer (VPC only, Transport Layer)

A

Forwards TCP packets for a certain port to a target group.

41
Q

Gateway Load Balancer (VPC only, Transport and Network Layer)

A

Forwards ingress traffic to network appliances, like intrusion detection or monitoring
Forwards response traffic from network appliances to target after inspection

42
Q

Hypertext Transfer Protocol (HTTP) (from internet)

A

HTTP is a protocol which fetches resources such as HTML documents. It is used for exchanging data on the Web and is a client-server protocol which means requests are initiated by the recipient usually the Web browser.
HTTP contains specific instructions on how to read and process this data once it arrives.
When you type a URL into your web browser, you are sending an HTTP request to a web server. That server will then respond, again using the formatting of HTTP.