Load Balancing Scheduling Methods Explained
来源:互联网 发布:航天信息开票软件 编辑:程序博客网 时间:2024/05/16 14:22
There are several load balancing methods provided by the LoadMaster, which are known as "Scheduling Methods" or “algorithms”:
Round Robin
With this method incoming requests are distributed sequentially across the server farm (cluster), i.e. the available servers. If this method is selected, all the servers assigned to a Virtual Service should have the similar resource capacity and host identical applications. Choose round robin if all servers have the same or similar performance and are running the same load. Subject to this precondition, the round robin system is a simple and effective method of distribution. However, if the servers have different capacities, the use of the round robin system can mean that a less powerful server receives the next inquiry even though it has not yet been able to process the current one. This could cause a weaker server to become overloaded.
Weighted Round Robin
This method balances out the weakness of the simple round robin: Incoming requests are distributed across the cluster in a sequential manner, while taking account of a static “weighting” that can be pre-assigned per server. The administrator simply defines the capacities of the servers available by weighting the servers. The most efficient server A, for example, is given the weighting 100, whilst a much less powerful server B is weighted at 50. This means that Server A would always receive two consecutive requests before Server B receives its first one, and so on.
Least Connection
Both round robin methods do not take into account that the system does not recognize how many connections are maintained over a given time. It could therefore happen that Server B is overloaded, although it receives fewer connections than Server A, because the users of this server maintain their connections longer. This means that the connections, and thus the load for the server, accumulate. This potential problem can be avoided with the "least connections" method: Requests are distributed on the basis of the connections that every server is currently maintaining. The server in the cluster with the least number of active connections automatically receives the next request. Basically, the same principle applies here as for the simple round robin: The servers related to a Virtual Service should ideally have the similar resource capacities. Please note that in configurations with low traffic rates, the traffic will not balance out and the first server will be preferred. This is because if all the servers are equal, then the first server is preferred. Until the traffic reaches a level where the first server continually has active traffic, the first server will always be selected.Copyright © 2002 - 2013 KEMP Technologies, Inc. All Rights Reserved. Page 13 / 47 LM5305-FIPS Product Overview
Least Connection Slow Start Time
For both the Least Connection and the Weighted Least Connection scheduling methods, when a Real Server is initially brought online, a period of time can be configured where the number of connections is initially restricted and gradually increased. This provides a ‘ramp-up time’ for a Real Server to ensure that it is not overloaded by a flood of connections upon startup. This value is configured in the L7 configuration screen.
Weighted Least Connection
If the servers have different resource capacities the “weighted least connection” method is more applicable: The number of active connections combined with the various weights defined by the administrator generally provides a very balanced utilization of the servers, as it employs the advantages of both worlds. This is, in general, a very fair distribution method, as it uses the ratio of the number of connections and the weight of a server. The server in the cluster with the lowest ratio automatically receives the next request. Please note that the caveat for Least Connections regarding low traffic rates applies here as well.
Agent Based Adaptive Balancing
In addition to the methods above the LoadMaster contains an adaptive logic, which checks the state of the servers at regular intervals and independently of the configured weighting. For the extremely powerful “agent based adaptive balancing” method the LoadMaster periodically checks the system load on all the servers in the farm: Each server machine should provide a file that contains a numeric value in the range between 0 and 99 representing the actual load on this server (0 = idle, 99 = overload,101 = failed,102 = administratively disabled). The LoadMaster retrieves this file by an HTTP GET operation. It is the server’s job to provide the actual load in the ASCII file. There are no prerequisites, though, how the servers evaluate this information. Two different strategies are applied, depending on the overall load of the server farm: During normal operation the scheduling algorithm calculates a weighting ratio out of the collected load values and distributes the connections according to it. So if excessive overloading of a server occurs, the weighting is readjusted transparently by the system. As with the weighted round robin, incorrect distribution can then be countered by assigning different weights to the servers available. During a period of very low traffic, however, the load values as reported by the servers will not build a representative sample. A load distribution based on these values would result in uncontrolled, oscillating directives. Therefore in such a situation it is more reasonable, to calculate the load distribution based on the static weight ratio. The LoadMaster switches to the weighted round robin method automatically when the load on all servers falls below a limit defined by the administrator. If the load rises above the limit the LoadMaster switches back to the adaptive method.Copyright © 2002 - 2013 KEMP Technologies, Inc. All Rights Reserved. Page 14 / 47 LM5305-FIPS Product Overview For further information regarding Adaptive Balancing, please refer to the API for Agent Based Adaptive Balancing, Technical Note document.
Fixed Weighted
The highest weight Real Server is only used when other Real Server(s) are given lower weight values. However, if highest weight server falls, the Real Server with the next highest priority number will be available to serve clients. The weight for each Real Server should be assigned based on the priority among Real Server(s).
Weighted Response
Time The traffic is scheduled using the weighted round robin method. The weights used by the weighted round robin method are calculated using the response times from healthcheck requests. Each healthcheck request is timed to see how long it takes to respond. Please note that is assumed that the speed of the healthcheck depends on how slow the machine is which may not always be the case. The total response times of all the real servers on the Virtual Service are added together, from which the weight of the individual Real Server is calculated. The weights are recalculated approximately every fifteen seconds.
Source IP Hash
A hash of the source IP is generated and used to find the correct real server. This means that the real server is always the same from the same host. With this scheduling method, you don't need any source IP persistence. N.B. This MAY cause real server imbalance
So there you have it if you want to know more about Load Balancing or scheduling methods then feel free to get in touch.
- See more at: http://www.loadbalancerblog.com/blog/2013/06/load-balancing-scheduling-methods-explained#sthash.Os9BzWTl.dpuf
There are several load balancing methods provided by the LoadMaster, which are known as "Scheduling Methods" or “algorithms”:
Round Robin
With this method incoming requests are distributed sequentially across the server farm (cluster), i.e. the available servers. If this method is selected, all the servers assigned to a Virtual Service should have the similar resource capacity and host identical applications. Choose round robin if all servers have the same or similar performance and are running the same load. Subject to this precondition, the round robin system is a simple and effective method of distribution. However, if the servers have different capacities, the use of the round robin system can mean that a less powerful server receives the next inquiry even though it has not yet been able to process the current one. This could cause a weaker server to become overloaded.
Weighted Round Robin
This method balances out the weakness of the simple round robin: Incoming requests are distributed across the cluster in a sequential manner, while taking account of a static “weighting” that can be pre-assigned per server. The administrator simply defines the capacities of the servers available by weighting the servers. The most efficient server A, for example, is given the weighting 100, whilst a much less powerful server B is weighted at 50. This means that Server A would always receive two consecutive requests before Server B receives its first one, and so on.
Least Connection
Both round robin methods do not take into account that the system does not recognize how many connections are maintained over a given time. It could therefore happen that Server B is overloaded, although it receives fewer connections than Server A, because the users of this server maintain their connections longer. This means that the connections, and thus the load for the server, accumulate. This potential problem can be avoided with the "least connections" method: Requests are distributed on the basis of the connections that every server is currently maintaining. The server in the cluster with the least number of active connections automatically receives the next request. Basically, the same principle applies here as for the simple round robin: The servers related to a Virtual Service should ideally have the similar resource capacities. Please note that in configurations with low traffic rates, the traffic will not balance out and the first server will be preferred. This is because if all the servers are equal, then the first server is preferred. Until the traffic reaches a level where the first server continually has active traffic, the first server will always be selected.Copyright © 2002 - 2013 KEMP Technologies, Inc. All Rights Reserved. Page 13 / 47 LM5305-FIPS Product Overview
Least Connection Slow Start Time
For both the Least Connection and the Weighted Least Connection scheduling methods, when a Real Server is initially brought online, a period of time can be configured where the number of connections is initially restricted and gradually increased. This provides a ‘ramp-up time’ for a Real Server to ensure that it is not overloaded by a flood of connections upon startup. This value is configured in the L7 configuration screen.
Weighted Least Connection
If the servers have different resource capacities the “weighted least connection” method is more applicable: The number of active connections combined with the various weights defined by the administrator generally provides a very balanced utilization of the servers, as it employs the advantages of both worlds. This is, in general, a very fair distribution method, as it uses the ratio of the number of connections and the weight of a server. The server in the cluster with the lowest ratio automatically receives the next request. Please note that the caveat for Least Connections regarding low traffic rates applies here as well.
Agent Based Adaptive Balancing
In addition to the methods above the LoadMaster contains an adaptive logic, which checks the state of the servers at regular intervals and independently of the configured weighting. For the extremely powerful “agent based adaptive balancing” method the LoadMaster periodically checks the system load on all the servers in the farm: Each server machine should provide a file that contains a numeric value in the range between 0 and 99 representing the actual load on this server (0 = idle, 99 = overload,101 = failed,102 = administratively disabled). The LoadMaster retrieves this file by an HTTP GET operation. It is the server’s job to provide the actual load in the ASCII file. There are no prerequisites, though, how the servers evaluate this information. Two different strategies are applied, depending on the overall load of the server farm: During normal operation the scheduling algorithm calculates a weighting ratio out of the collected load values and distributes the connections according to it. So if excessive overloading of a server occurs, the weighting is readjusted transparently by the system. As with the weighted round robin, incorrect distribution can then be countered by assigning different weights to the servers available. During a period of very low traffic, however, the load values as reported by the servers will not build a representative sample. A load distribution based on these values would result in uncontrolled, oscillating directives. Therefore in such a situation it is more reasonable, to calculate the load distribution based on the static weight ratio. The LoadMaster switches to the weighted round robin method automatically when the load on all servers falls below a limit defined by the administrator. If the load rises above the limit the LoadMaster switches back to the adaptive method.Copyright © 2002 - 2013 KEMP Technologies, Inc. All Rights Reserved. Page 14 / 47 LM5305-FIPS Product Overview For further information regarding Adaptive Balancing, please refer to the API for Agent Based Adaptive Balancing, Technical Note document.
Fixed Weighted
The highest weight Real Server is only used when other Real Server(s) are given lower weight values. However, if highest weight server falls, the Real Server with the next highest priority number will be available to serve clients. The weight for each Real Server should be assigned based on the priority among Real Server(s).
Weighted Response
Time The traffic is scheduled using the weighted round robin method. The weights used by the weighted round robin method are calculated using the response times from healthcheck requests. Each healthcheck request is timed to see how long it takes to respond. Please note that is assumed that the speed of the healthcheck depends on how slow the machine is which may not always be the case. The total response times of all the real servers on the Virtual Service are added together, from which the weight of the individual Real Server is calculated. The weights are recalculated approximately every fifteen seconds.
Source IP Hash
A hash of the source IP is generated and used to find the correct real server. This means that the real server is always the same from the same host. With this scheduling method, you don't need any source IP persistence. N.B. This MAY cause real server imbalance
So there you have it if you want to know more about Load Balancing or scheduling methods then feel free to get in touch.
- Load Balancing Scheduling Methods Explained
- Concurrent request scheduling explained
- Load Balancing
- load balancing
- Load Balancing
- Load Balancing
- SA-Concurrent request scheduling explained
- Linux load average explained
- Load Balancing Web Applications
- Server Load Balancing
- Apache + Tomcat + Load Balancing
- Load balancing (computing)
- Hbase Load Balancing
- hdu 2850 Load Balancing
- Runtime Connection Load Balancing
- Load Balancing Web Applications
- HDU 2850 Load Balancing
- ICPC 6924 Load Balancing
- 第十一周项目6--回文数
- 忽略警告
- Thread+Handler的简单例子
- Android的自定义按钮
- 图的广度优先查找(BFS: Breadth -First Search) (1)问题分析 BFS的策略是尽可能广泛地搜索图。它首先访问所有和初始顶点邻接的顶点,然后访问距离它两条边的所有未
- Load Balancing Scheduling Methods Explained
- Tree
- word的编写模式和ie主页被篡改问题
- linux下更新Python版本并修改默认版本
- 最长公共子序列 【微软面试100题 第五十六题】
- Cocos2dx 3.0 过渡篇(十七) std::bind与CC_CALLBACK不得不说的故事
- 【LeetCode】Min Stack
- Android中Activity启动模式
- Java程序员应该知道的10个调试技巧