Load Balancer Flashcards

1
Q

What are 2 things that load balancer does?

A
  • It helps to spread the traffic across a cluster of servers to improve responsiveness and availability of applications, websites or databases.
  • keeps track of the status of all the resources while distributing requests. If a server is not available to take new requests or is not responding or has elevated error rate, LB will stop sending traffic to such a server.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where can a load balancer be placed?

A

• To utilize full scalability and redundancy, we can try to balance the load at each layer of the system.
• We can add LBs at three places:
o Between the user and the web server
o Between web servers and an internal platform layer, like application servers or cache servers
o Between internal platform layer and database

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

What is the value of a load balancer?

A

• By balancing application requests across multiple servers, a load balancer reduces individual server load and prevents any one application server from becoming a single point of failure, thus improving overall application availability and responsiveness

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

What is the difference between a web server and application server?

A

o Web server:
 Web Server is designed to serve HTTP Content.
 Web Server is mostly designed to serve static content, though most Web Servers have plugins to support scripting languages like Perl, PHP, ASP, JSP etc. through which these servers can generate dynamic HTTP content.

o Application Server
 App Server can also serve HTTP Content but is not limited to just HTTP and could support other protocols.
 App server is mostly suited for dynamic content.
 Most of the application servers have Web Server as integral part of them, that means App Server can do whatever Web Server is capable of.

o Interaction between the two:
 The application server is working in conjunction with the web server, where one displays and the other one interacts.

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

What are the benefits of a load balancer?

A

o Faster, uninterrupted service.
 Users won’t have to wait for a single struggling server to finish its previous tasks.
 Instead, their requests are immediately passed on to a more readily available resource.
o Service providers experience less downtime and higher throughput.
 Even a full server failure won’t affect the end user experience as the load balancer will simply route around it to a healthy server.
o System administrators to easily handle incoming requests while decreasing wait time for users.
o Predictive analytics.
 PA could determine traffic bottlenecks before they happen.
 As a result, the smart load balancer gives an organization actionable insight. These are key to automation and can help drive business decisions.
o System administrators experience fewer failed or stressed components. Instead of a single device performing a lot of work, load balancing has several devices perform a little bit of work.

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

What are the 2 things load balancer considers in general?

A

o Load balancers consider two factors before forwarding a request to a backend server:
 Server they can choose is responding appropriately to requests
 pre-configured algorithm to select one from the set of healthy servers.

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

What are load balancers health checks?

A

o Health Checks
 Load balancers should only forward traffic to “healthy” backend servers.
 To monitor the health of a backend server, “health checks” regularly attempt to connect to backend servers to ensure that servers are listening.
 If a server fails a health check, it is automatically removed from the pool, and traffic will not be forwarded to it until it responds to the health checks again.

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

What are 6 load balancing algorithms?

A
  1. Least connections method
  2. Least response time method
  3. least bandwidth method
  4. Round Robin
  5. Weighted round robin
  6. IP Hash
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Least connections method?

A

 Least Connections Method
• This method directs traffic to the server with the fewest active connections.
• This approach is most useful when there are many persistent connections in the traffic unevenly distributed between the servers.

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

What is Least response time method?

A

• This algorithm directs traffic to the server with:
o The fewest active connections
o The lowest average response time.

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

What is least bandwidth method?

A

• This method selects the server that is currently serving the least amount of traffic, measured in megabits per second (Mbps).

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

What is round robin method? When is it usefull?

A

• This method cycles through a list of servers and sends each new request to the next server. When it reaches the end of the list, it starts over at the beginning.
• It is most useful when:
o servers are of equal specification
o there are not many persistent connections.

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

What is weighted round robin method?

A
  • The weighted round robin scheduling is designed to better handle servers with different processing capacities.
  • Each server is assigned a weight, an integer value that indicates the processing capacity. Servers with higher weights receive new connections first than those with less weights, and servers with higher weights get more connections than those with less weights.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is IP hash?

A

• This method calculates a hash of the IP address of the client to determine which server receives the request.

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

What is redundant load balancing?

A

o Load balancer can be a single point of failure, to overcome this a second load balancer can be connected to the first to form a cluster.
o Each LB monitors the health of the other and since both are equally capable of serving traffic and failure detection, in the event the main load balancer fails, the second load balancer takes over.

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

Where could software load balacner be places?

A

 The load balancer can be placed between client and server or between two server-side layers.

17
Q

Give a name of a popular load balancer?

A

 HAProxy is one of the popular open source software LB.

18
Q

Describe a process - If we can control the machine where the client is running, HAProxy could be running on the same machine

A
  • Each service we want to load balance can have a locally bound port (e.g., localhost:9000) on that machine, and the client will use this port to connect to the server.
  • This port is managed by HAProxy; every client request on this port will be received by the proxy and then passed to the backend service in an efficient way (distributing load).
19
Q

HP proxy & health checks - what do you know?

A

 HAProxy manages health checks and will remove or add servers to those pools. It also balances requests across all the servers in those pools.

20
Q

What type of load balancers should we start with?

A

For most systems, we should start with a software load balancer and move to smart clients or hardware load balancing as the need arises.