Escalonamento, Migração de Recursos e Balanceamento de carga Carlos Ferrão Lopes nº M6935 Bruno Simões nº M6082 Celina Alexandre nº M6807 Paulo Cabral nº M6765 Quoc Nguyen-Trong nº M6831 Tecnologias de Cloud e Datacenter Professor Doutor Nuno M. Garcia 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. It’s possible only because of a good load balancing mechanism… /*Just for fun*/ [longman] Mechanism: um sistema que se destina a alcançar algo ou resolver um problema Load Balancing - Mechanisms Internet WAN 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 : Estática: não há troca de informações entre o balanceador de carga e cada nó de servidor, por isso tem um limite na condução correta do balanceamento. Dinâmica: rotear solicitações do cliente de acordo com as informações dos nós do servidor. Load Balancing - Algorithms Algoritmos de agendamento estáticos incluem (normalmente): Round-Robin: atribui os pedidos para os servidores do modo Round-Robin Least-Connection: encaminhar as solicitações para o servidor que tenha o mínimo de conexões Weighted Round-Robin and Weighted Least-Connection: Dá o “peso” de cada nó de servidor Algoritmos de agendamento dinâmicos 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 métodos mais simples para distribuir solicitações do cliente através de um grupo de servidores. Round-Robin manner: O balanceador de carga encaminha as solicitações de cliente para cada servidor á vez. Quando atingir o final da lista, o balanceador de carga volta ao começo. Classificação do método 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 solicitações do cliente para cada servidor antes de chegar ao início da fila para começar de novo. Funciona bem quando todos os servidores têm a mesma capacidade. Load Balancing - Algorithms Static Round-Robin Client A, B, C, A, B, C, and so on Load balancer 1 Server A 2 Server B 3 Server C Load Balancing - Algorithms Weighted Round-Robin É atribuída um peso para cada servidor com base em critérios escolhidos pelo administrador. O critério mais comumente usado é a capacidade de manipulação de tráfego do servidor. O balanceador de carga faz uma solicitação HTTP e a medida de quão rápida que um servidor responde a ele. Quanto maior o peso, maior a proporção de solicitações 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 1 Server A 2 3 Server B 4 Server C Load Balancing - Algorithms Dynamic Round-Robin Um peso é atribuído a cada servidor dinamicamente, com base em dados em tempo real sobre o estado atual do servidor, portanto, o peso é alterado continuamente. Um método dinâmico de balanceamento de carga, distribuindo os pedidos com base em vários aspetos da análise de servidor em tempo real, tais como o número atual de conexões por servidor ou o mais rápido 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