Load Balancing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Load Balancing

Technology used to distribute service requests to

resources.
Load Balancing is an optimization technique in order
to increase utilization, yield, lowest latency,
response time reduction and prevent the system
overload.
This can be implemented in hardware e.g.: F5 BigIP
Servers
And can also be implemented in software e.g.:
Apache mod_proxy_balancer extension

Load Balacing
The following network resources can be load

balanced:
Network Interfaces and services such as DNS, FTP,

and HTTP
Connections (using intelligent switches)
Storage Resources
Access to application instances

Load Balancing
Without Loud Balancing would be very difficult to

manage the cloud (in a strand of requests VS


resources).
Load balancing provides redundancy needed to make
an unreliable system into trusted through the
redirection of resources by the machines.
In addition a grouping with a failover mechanism

provides an increased tolerance to failures.

Load Balancing
Operating principles
In simpler load-balancing mechanisms:
The Loud Balancing is listening on a network port for
requests for services
When a client makes a request, it uses a scheduling
algorithm to allocate where the request shall be sent

Load Balancing
Typical algorithms of timing:
Round-Robin
Weighted Round Robin
Dynamic Round Robin
Fastest response Time
Least Connections

Load Balancing - Algorithms


Fastest Response Time
The server is chosen based on the faster response time of a group of servers.
This method can be particularly useful in environments where the servers are
distributed in different logical networks.

Its possible only because of a good


load balancing mechanism
/*Just for fun*/

Internet

WAN

[longman] Mechanism:
um sistema que se destina a
alcanar algo ou resolver
um problema

Load Balancing - Mechanisms


Firewall

Balanceamento de carga executadoSwitch


pelo balanceadores de carga,

usando algoritmos de agendamento.


Load balancer

LAN

Switch

Server 1

Server 2

Server 3

Load Balancing - Mechanisms


Balanceamento de carga executado pelo balanceadores de carga, usando

algoritmos de agendamento.

hardware-based
service-based

Load Balancing - Mechanisms


exemplo do balanceador de carga baseada em hardware:

Load Balancing - Mechanisms


service-based load balancer example:

Load Balancing - Mechanisms

Balanceamento de carga executado pelo balanceadores de carga,


usando algoritmos de agendamento.

Algoritmos de agendamento :

Esttica: no h troca de informaes entre o balanceador de carga e


cada n de servidor, por isso tem um limite na conduo correta do
balanceamento.

Dinmica: rotear solicitaes do cliente de acordo com as informaes


dos ns do servidor.

Load Balancing - Algorithms


Algoritmos de agendamento estticos incluem (normalmente):

Round-Robin: atribui os pedidos para os servidores do modo Round-Robin


Least-Connection: encaminhar as solicitaes para o servidor que tenha o
mnimo de conexes
Weighted Round-Robin and Weighted Least-Connection: D o peso de cada
n de servidor

Algoritmos de agendamento dinmicos incluem (normalmente):

Agent-based Sophisticated and Scalable Scheduling Method (ABSS)


Agent-based Sophisticated Scheduling Mechanism by Using Memory
Utilization (ASSUM)
Dynamic Round-Robin

Load Balancing - Algorithms


Round-Robin
Um dos mtodos mais simples para distribuir solicitaes do cliente

atravs de um grupo de servidores.

Round-Robin manner: O balanceador de carga encaminha as solicitaes


de cliente para cada servidor vez. Quando atingir o final da lista, o
balanceador de carga volta ao comeo.

Classificao do mtodo Round-Robin :

Static
Weighted
Dynamic

Load Balancing - Algorithms


Static Round-Robin
O balanceador de carga percorre uma fila circular

representativa de servidores, divide e envia as


solicitaes do cliente para cada servidor antes de
chegar ao incio da fila para comear de novo.
Funciona bem quando todos os servidores tm a

mesma capacidade.

Load Balancing - Algorithms


Static Round-Robin
Client
A, B, C, A, B, C, and so on

Load
balancer

Server
A

Server
B

Server
C

Load Balancing - Algorithms


Weighted Round-Robin

atribuda um peso para cada servidor com base em critrios escolhidos


pelo administrador.

O critrio mais comumente usado a capacidade de manipulao de


trfego do servidor. O balanceador de carga faz uma solicitao HTTP e a
medida de quo rpida que um servidor responde a ele.

Quanto maior o peso, maior a proporo de solicitaes de clientes o


servidor recebe.

Load Balancing - Algorithms


Weighted Round-Robin
Client
A, B, B, C, A, B, B, C, and so on

Load
balancer

Server
A

Server
B

Server
C

Load Balancing - Algorithms


Dynamic Round-Robin

Um peso atribudo a cada servidor dinamicamente, com base em dados


em tempo real sobre o estado atual do servidor, portanto, o peso
alterado continuamente.

Um mtodo dinmico de balanceamento de carga, distribuindo os


pedidos com base em vrios aspetos da anlise de servidor em tempo real,
tais como o nmero atual de conexes por servidor ou o mais rpido
tempo de resposta do servidor.

Load Balancing - Algorithms


Least Connections
With this method the system consider connections with a server that has the
least number of current connections.
Least Connections works best in environments where the servers and/or
equipment have similar capabilities.

Concluding, this algorithm only keeps track of the number of links attached to
each server.
Selecting the one with the fewest

Load Balancing - Algorithms


Observed
This method uses a combination of logic used in the Least connections
algorithms and Fastest response.
In this method the servers that have a better balance: fewer connections and
faster response time.
Receive a larger proportion of links

Load Balancing - Algorithms


Predictive
The Predictive uses the classification method used by the algorithm Observed.
However, with this algorithm it is possible to analyze the trend of ranking over
time:
Determine whether the performance of one or more servers is improving or getting

worse.

The ranked servers with a better performance rating, rather than worsen,
receive a higher proportion of links.

Load Balancing - Algorithms


Random
This method of load balancing distributes randomly the load between available
servers.
Chooses random numbers (assigned to different servers) and sends the current
connection to the chosen.

This method is available in many implementations of load balancing.


However, his utility is questionable.

Load Balancing - Conclusions


Having examined the different balancing algorithms we can conclude:
Load-balancing systems more sophisticated manage differently the

workload requested and/or allocated by customers based on different


factors:

Response time
Waiting lists
Connection latency and capacity

Load Balancing
Thank you
Obrigado

You might also like