Professional Documents
Culture Documents
Load Balance Method
Load Balance Method
least connection load balancing Algorithm จะกระจายงาน แบบเฉลีย ่ ไปยัง server ทุกตัว
โดยคานึงถึง ปริมาณของงาน หรือ ความมีธรุ ะยุง่ ของ server โดยความมีธรุ ะยุง่ ของ server แต่
ละตัวไม่เท่ากัน server ทีม
่ ธ
ี รุ ะยุง่ น ้อยทีส
่ ด ้ จะถูกเรียกใช ้งานโดย Load balancer
ุ ในขณะนัน
พูดง่ายๆคือ จะไม่ปล่อยให ้ server ตัวใดว่าง หลั่นล ้า แน่นอน
ภายใต ้การทางานของ weighted round robin load balancing algorithm. Server แต่ละตัว
จะได ้รับการจัดสรร น้ าหนัก (Weight) โดย Server แต่ละตัวมีคา่ Weight ไม่เท่ากัน ขึน ้ อยูก
่ บ
ั
การจัด configure และขีดความสามารถในการประมวลต่อคาร ้องขอใช ้บริการทีม ่ าจากเครือ ่ ง
client
ตัวอย่างเช่น Server ตัวหนึง่ มีคา่ Weight เท่ากับ 5 ส่วนตัวอืน
่ มีคา่ Weight อยูท่ ี่ 2 และหาก
ตัว Load balancer ได ้รับการร ้องขอใช ้บริการ 5 ครัง้ มันจะส่งคาร ้องขอทัง้ 5 ของ Client ไปที่
Server ทีม่ ค
ี า่ Weight 5
แต่หาก Load balancer ได ้รับคาร ้องขอใช ้บริการเพียงแค่ 2 ก็จะส่งคาร ้องขอไปที่ Server ทีม ่ ี
ค่า Weight เท่ากับ 3 ทันที
2.2 Load Balancing Algorithm: Dynamic Round Robin
• Round Robin: The system passes each new connection request to the next
server in line, eventually distributing connections evenly across the array of
machines being load balanced. This method works well in most
configurations, especially if the equipment that you are load balancing is
roughly equal in processing speed and memory.
• Ratio (node): The number of connections that each machine receives over
time is proportionate to a ratio weight you define for each machine across all
pools of which the server is a member.
• Fastest (node): The system passes a new connection based on the fastest
response of all pools of which a server is a member. This method might be
particularly useful in environments where nodes are distributed across
different logical networks.
• Dynamic Ratio (node): This method is similar to Ratio (node) mode, except
that weights are based on continuous monitoring of the servers and are
therefore continually changing. This is a dynamic load balancing method,
distributing connections based on various aspects of real-time server
performance analysis, such as the number of current connections per node or
the fastest node response time.
• Least Sessions: The system passes a new connection to the node that
currently has the least number of persistent sessions. This method works best
in environments where the servers or other equipment you are load balancing
have similar capabilities. This is a dynamic load balancing method, distributing
connections based on various aspects of real-time server performance
analysis, such as the number of current sessions. Use of this load balancing
method requires that the virtual server reference a type of persistence profile
that tracks persistence connections.
• Weighted Least Connections (member): The system uses the value you
specify in Connection Limit to establish a proportional algorithm for each pool
member. The system bases the load balancing decision on that proportion
and the number of current connections to that pool member. For example,
member_a has 20 connections and its connection limit is 100, so it is at 20
percent of capacity. Similarly, member_b has 20 connections and its
connection limit is 200, so it is at 10 percent of capacity. In this case, the
system select selects member_b. This algorithm requires all pool members to
have a non-zero connection limit specified.
• Weighted Least Connections (node): The system uses the value you
specify in the node's Connection Limit and the number of current connections
to a node to establish a proportional algorithm. This algorithm requires all
nodes used by pool members to have a non-zero connection limit specified.
• Ratio (session): The system selects the pool member according to the ratio
of the number of sessions each pool member has active. Note that pending
sessions count as active sessions.
• Ratio Least Connections (member): The system selects the pool member
according to the ratio of the number of connections each pool member has
active.
• Ratio Least Connections (node): The system selects the node according
to the ratio of the number of connections each node has active.