1.6 Load Balancing Flashcards

1
Q

What is a load balancer?

A

A server that balances incoming traffic to your application and distributes that traffic across multiple servers

Improves reliability and scalability of your application and allows replication.

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

What does fault tolerance mean in the context of load balancers?

A

Enhancement of service availability by redirecting traffic away from failed or malfunctioning servers.

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

What is health monitoring in load balancers?

A

Continuous monitoring of backend server health and performance, removing unresponsive servers from the pool.

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

What is SSL termination?

A

Offloading SSL/TLS encryption and decryption from backend servers to improve performance.

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

What is session persistence in load balancers?

A

Ensuring that subsequent requests from the same client are directed to the same backend server.

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

What is geographic load balancing?

A

Distribution of traffic based on the geographical location of the client to optimize performance.

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

What is content-based routing in load balancers?

A

Routing traffic based on content-specific criteria like URL paths, HTTP headers, or query parameters.

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

What is Round Robin load balancing?

A

The simplest form of load balancing where each request is directed to the next server in a sequential list.

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

What is the Least Connections load balancing method?

A

Routing traffic to the server with the fewest active connections.

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

What does Least Response Time load balancing measure?

A

It measures the response time of each server and directs traffic to the server with the fastest response time.

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

What is Source IP Hash in load balancing?

A

Requests from the same client IP address are consistently routed to the same backend server.

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

What is Weighted Least Connection load balancing?

A

Similar to least connections, but servers are assigned a weight based on their capacity or performance.

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

What are Application-Based Load Balancers?

A

Load balancers that operate at Layer 7 of the OSI model, allowing for advanced routing decisions.

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

What are Network Load Balancers?

A

Load balancers operating at Layer 4 of the OSI model, routing traffic based on IP addresses and TCP/UDP port numbers.

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

What is vertical scaling?

A

Increasing the capacity of a single server by adding more resources such as CPU, memory, or storage.

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

What is horizontal scaling?

A

Adding more servers to distribute the load across multiple machines.

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

Fill in the blank: Vertical scaling is also known as _______.

A

[scaling up]

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

Fill in the blank: Horizontal scaling is also known as _______.

A

[scaling out]

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

What is a key disadvantage of vertical scaling?

A

Limited scalability due to the maximum capacity of a single server.

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

What is a key advantage of horizontal scaling?

A

High scalability by adding more servers as needed.

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

What does Layer 7 load balancing operate on?

A

The Application Layer of the OSI model.

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

What does Layer 4 load balancing use to direct traffic?

A

Data from network and transport layer protocols such as IP, TCP, or UDP.

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

What is the role of a load balancer compared to a reverse proxy?

A

A load balancer distributes incoming network traffic across multiple servers.

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

What is a reverse proxy?

A

A proxy server that retrieves resources on behalf of a client from one or more servers.

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

What is a disadvantage of using a reverse proxy?

A

Can become a single point of failure if not properly configured for high availability.

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

What is a key characteristic of a private IP?

A

An IP address that is reachable only between servers in the same network.

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

What does database replication address?

A

Failover and redundancy issues in database design.

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

What happens when a load balancer is added to a web tier?

A

Improved availability of the web tier and resolution of failover issues.

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

What is the primary role of a load balancer?

A

A load balancer evenly distributes incoming traffic among web servers that are defined in a load-balanced set.

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

How do users connect to a load balancer in a web application setup?

A

Users connect to the public IP of the load balancer directly. With this setup, web servers are unreachable directly by clients anymore.

33
Q

What is the purpose of using private IPs in a load-balanced setup?

A

Private IPs are used for communication between servers to enhance security. A private IP is only reachable between servers in the same network and is not accessible over the internet.

34
Q

How does a load balancer communicate with web servers in a load-balanced setup?

A

The load balancer communicates with web servers through private IPs to ensure better security and isolation.

35
Q

What happens if server 1 goes offline in a load-balanced setup?

A

If server 1 goes offline, all the traffic is routed to server 2. This prevents the website from going offline.

36
Q

What is the solution when a website’s traffic grows rapidly and two servers are not enough?

A

The load balancer can handle this issue by automatically adding more web servers to the pool. It will start sending requests to the newly added servers.

37
Q

What does the web tier setup look like after adding a load balancer and additional web servers?

A

After adding a load balancer and a second web server, the setup solves failover issues and improves the availability of the web tier, ensuring that traffic can be rerouted in case of server failure.

38
Q

What is the problem with having only one database in the current web application design?

A

Having only one database in the current design creates a single point of failure and does not support failover and redundancy.

39
Q

How can database failover and redundancy be addressed in a web application architecture?

A

Database replication is a common technique to address database failover and redundancy issues, allowing the database to be replicated across multiple servers to ensure availability.

40
Q

What is the primary function of load balancers?

A

Distributing incoming client requests to computing resources such as application servers and databases.

41
Q

List three advantages of using load balancers.

A
  • Preventing requests from going to unhealthy servers
  • Preventing overloading resources
  • Helping to eliminate a single point of failure
42
Q

What are the two types of load balancers based on implementation?

A
  • Hardware
  • Software (e.g., HAProxy)
43
Q

What does SSL termination do in the context of load balancers?

A

Decrypts incoming requests and encrypts server responses so backend servers do not have to perform these operations.

44
Q

True or False: Load balancers remove the need to install X.509 certificates on each server.

45
Q

What is session persistence in load balancers?

A

Issuing cookies and routing a specific client’s requests to the same instance.

46
Q

What are the two common modes for setting up multiple load balancers?

A
  • Active-passive
  • Active-active
47
Q

Name two metrics used by load balancers to route traffic.

A
  • Random
  • Least loaded
48
Q

What layer do Layer 4 load balancers operate at?

A

Transport layer

49
Q

What type of information do Layer 4 load balancers look at to distribute requests?

A

Source and destination IP addresses and ports in the header.

50
Q

Fill in the blank: Layer 4 load balancers perform _______.

A

Network Address Translation (NAT)

51
Q

What layer do Layer 7 load balancers operate at?

A

Application layer

52
Q

How do Layer 7 load balancers make load-balancing decisions?

A

By looking at the contents of the header, message, and cookies.

53
Q

What is one example of a decision a Layer 7 load balancer might make?

A

Directing video traffic to servers that host videos.

54
Q

What is horizontal scaling?

A

Improving performance and availability by scaling out using commodity machines.

55
Q

List two disadvantages of horizontal scaling.

A
  • Introduces complexity
  • Requires servers to be stateless
56
Q

What must be done with sessions when using horizontal scaling?

A

Store sessions in a centralized data store.

57
Q

What is a potential disadvantage of using a load balancer?

A

It can become a performance bottleneck if not properly resourced or configured.

58
Q

True or False: A single load balancer is not a single point of failure.

59
Q

What is one complexity introduced by configuring multiple load balancers?

A

Increased overall configuration complexity.

60
Q

What is a reverse proxy?

A

A web server that centralizes internal services and provides unified interfaces to the public

61
Q

How does a reverse proxy handle client requests?

A

Requests from clients are forwarded to a server that can fulfill it before the reverse proxy returns the server’s response to the client

62
Q

List three benefits of using a reverse proxy.

A
  • Increased security
  • Increased scalability and flexibility
  • SSL termination
63
Q

What is one way a reverse proxy increases security?

A

Hides information about backend servers

64
Q

What is SSL termination in the context of a reverse proxy?

A

Decrypting incoming requests and encrypting server responses so backend servers do not have to perform these operations

65
Q

Fill in the blank: A reverse proxy removes the need to install ______ on each server.

A

X.509 certificates

66
Q

What is one disadvantage of using a reverse proxy?

A

Increased complexity

67
Q

What is the difference between a load balancer and a reverse proxy?

A

Load balancers route traffic to multiple servers serving the same function, while reverse proxies can be used with just one web server

68
Q

Name two solutions that support both layer 7 reverse proxying and load balancing.

A
  • NGINX
  • HAProxy
69
Q

What does separating the web layer from the application layer allow?

A

To scale and configure both layers independently

70
Q

What principle advocates for small and autonomous services working together?

A

Single responsibility principle

71
Q

What are microservices?

A

A suite of independently deployable, small, modular services that run a unique process and communicate through a well-defined mechanism

72
Q

Give an example of a microservice that Pinterest might use.

A

User profile

73
Q

What is service discovery?

A

A mechanism that helps services find each other by tracking registered names, addresses, and ports

74
Q

Name two systems that can be used for service discovery.

A
  • Consul
  • Etcd
75
Q

Fill in the blank: Microservices can add ______ in terms of deployments and operations.

A

Complexity

76
Q

What is one way that workers in the application layer help enable asynchronism?

77
Q

What are health checks used for in service discovery?

A

To verify service integrity

78
Q

What is a disadvantage of adding an application layer with loosely coupled services?

A

Requires a different approach from an architectural, operations, and process viewpoint compared to a monolithic system