Sie sind auf Seite 1von 12
Chapter 3 - Load Balancing 34 Chapter 3: Load Balancing Load-Balancing Modes Lesson Objectives During this lesson, you will be able to list the various load-balancing modes, explain the differences between them, and state the scenarios where each is most appropriate. Load Balancing Overview ‘The BIG-IP LTM System offers many load balancing modes. A load-balancing mode defines the criteria ‘used fo choose a pool member to host a connection. There are two groups of load balancing modes: static and dynamic. Also, there are options that dynamically activate secondary members if primary members fail allowing sites to define some members as “hot standbys”. Static Load-Balancing Static load balancing options distribute traffic across members based on pre-defined patterns. Member availability is taken into account but current performance is not. Two modes are supported: Round Robin ‘The round robin mode distributes connections evenly across available members. This mode is useful for even distribution of traffic among equally capable members. Ratio The ratio mode distributes new connections across available members in proportion to a user-defined ratio, ‘This mode is useful when members have different capacity. For example, if your pool contained one fast server and three slower servers, you could set the ratio so that the fast server receives more connections. The ratio can be set for each member or each node. Ratio mode distributes new connections in a weighted round-robin pattern. The figure above shows how connections would be distributed if the ratio values were set at 3:2:1:1 Configuring BIG-IP LTM v11 34 32 Chapter 3 - Load Balancing aisieese! is) Ratio 8 ato 2 Ratio 1 Ratio + Dynamic Load-Balancing Dynamic load balancing options distribute traffic across members based on current server performance and member availability. When each connection request is processed, the chosen metric for each member is compared and the best member chosen. The BIG-IP LTM System supports five dynamic load balancing modes. Least Connections The least connections method distributes new connections across available members based on the current connection count between the BIG-IP system and the server. It does not account for connections the servers may have with other systems. This mode is useful for distributing traffic to nodes that support long-lived connections like FTP and Telnet. Over time, service requests are distributed relatively evenly if all servers have similar capabilities. If multiple devices all currently have the same number of low connections, traffic is distributed across them in a round robin pattern. ‘This figure below shows how six connections would be distributed given the connection counts shown and assuming that no connections ‘close during the process. 462 462 462 Current Connections 470 32 Configuring BIGIP LTM v11 Chapter 3 - Load Balancing ea Fastest Gower ulo is rut leaded will Lrpors? ‘The fastest method distributes new connections to the member or node that currently has the fewest outstanding layer 7 requests. When a connection request is received, the member with the fewest outstanding requests is chosen. If the associated virtual server does not have both a TCP and layer 7 profile, LTM cannot track requests and responses. Load balancing will fall back to least connections. ‘This mode is useful for distributing traffic to devices that may differ in their response times depending on the load that previous requests have placed on the system. Over time, service requests are distributed relatively evenly if all servers have similar capabilities. Least Sessions Zayrechiem §—geed. fo Least sessions distributes new connections to members based on current persistence records (sessions) associated with that members. This method will result in round robin performance if cookie persistence is being used since the BIG-IP system does not keep cookie persistence records. Weighted Least Connections welytt of Concetion 1s Ceedrd' wR Lee yn 2> Weighted least connections requires that each member or node have a non-zero connection limit assigned. /3 — Then, requests are distributed to the device that is using the smallest percentage of its capacity where capacity isa ratio of the current connection count to the maximum connections allowed. Observed ower Coprefior Sour SLA iFepte ‘The observed method distributes new connections to members based on a system assigned ratio value. ‘The ratios are assigned based on the load on each member. Every second, those members with fewer than the average number of current connections are assigned a ratio of 3 and those with greater than the average number of connections are assigned a ratio of 2. Predictive ‘The predictive method is similar to observed, but assigns more aggressive ratio values of 4, for those with less than average connections, and 1, for those with greater than average connections. Dynamic Ratio ‘The dynamic ratio method is used specifically for load balancing traffic to RealNetworks® RealSystem® Server platforms, Windows® platforms equipped with Windows Management Instrumentation (WMI), or any server equipped with an SNMP agent such as the UC Davis SNMP agent or Windows 2000 Server SNMP agent. To implement this feature, software must be running on the actual servers and monitors configured to test the servers. Various metrics can be gathered from the servers and used as a basis for making a load balancing decision. Configuring BIG-IP LTM v11 33 34 Chapter 3 - Load Balancing Priority Group Activation While the load balancing mode determines how connection requests are distributed across members, priority group activation determines which members are eligible for use at a given moment. Priority group activation allows you to define primary members and backup members. Using this feature, you decide which members are primary and when to activate another group of members. Priority group activation is managed through two parameters. First, each pool member has a priority value assigned. ‘This value defaults to 0, the lowest priority. Second, when priority group activation is enabled, you set the threshold to have the BIG-IP system activate the next group. Priority group activation is disabled by default, so connection requests are normally distributed across all members based on their availability and the load balancing choice. Which members are active is determined by each member's priority value and the priority group activation threshold setting. If there are insufficient members within the highest priority group, the next group is activated. If there are still insufficient members, the next group is activated, and so on, until there are sufficient members or there are no more members. Let’s consider an example pool containing six members. In our example, three have a priority of 10 and three have a priority of 5. Those with the higher priority, 10, are in the highest priority group. Additionally, priority group activation threshold is set to less than 2. If all six members are available, new connections will only be sent to those three in the high priority. If one of the members with a priority of 10 were to fail a monitor test, new connections would only be sent to the remaining two members in the high priority group. However, if two (or more) were to fail, the highest group would have less than 2 available members, so the next highest group would be activated. At this point, traffic will be sent to the remaining member with a priority of 10 and all members in the next priority group. If ‘one or more of the members with a priority of 10 were to recover so that there are 2 or more available, new connections would again only be sent to the members with a priority of 10. The figure below shows how connections would be distributed when all the high priority members were available. tt Priority 10 Priority S Priority group activation is commonly used in two situations. First, sites will sometimes include apology servers within a pool of actual servers. If sufficient actual servers fail, some connections are sent to the apology servers during the partial outage. Unless you are managing persistence with iRules, persistence and apology servers should not be used with the same pool. If they are, connections may be sent to the apology servers even after the actual servers are available, ‘The second situation for priority group activation is when servers are configured for multiple uses, but administrators want to keep functions isolated. For example, a system might be configured both as a web server and an FTP server. Within the web pool, it may have a high priority but in the FTP pool a low 3-4 Configuring BIG-IP LTM v11 Chapter 3 - Load Balancing 35 priority. During normal situations, the system only receives web traffic. However, if enough of the FTP servers fail, it can act as an FTP server as well. FallBack Host -& ~veditst iff vee £3) Ifall the members of a pool fail, the virtual server can send an HTTP redirect message to the client. This allows the administrator to send customers to an alternate site or an apology server. This option is, configured through an HTTP profile. st wohl geried rUUIWidy on Neke ten Loe (Lo Ahde Rosier is ia nde Leo cuncdon wamber2 > yo cnnechen 4 fa teal Nose —> totof Guach ont Four eee al serviced’ ho tert Iethod, Ua LA method a gd Aten piety aoe he &ndinen Configuring BIG-IP LTM v11 3-5 36 Chapter 3 - Load Balancing Load Balancing: Member vs. Node ‘There is a subtle but significant difference between the Member load-balancing choices and the Node load balancing choices. Specifically, when choosing the pool member to handle the request, do you want to base the decision on node information or member information? ‘Take ratio load balancing as an example. Which ratios should be considered, the member's ratios or the rnode’s ratios? It is important to note that the member's ratios are set as a part of the pool's definition but a node’s ratio is global — and could affect many pools. The choice of member statistics or node statistics will also affect dynamic load balancing method distribution. For example, if you use Least Connections, which is more important: all connections to a node or only those connections to the member at that address? If multiple services are available through a single address, it could be either. For example, a site has 3 physical servers all running FTP and web- based services. Ifthe first server is currently serving many file transfers, would you want web requests sent to one of the other two servers? If'so, you would choose Least Connections (Node) ~ as shown on the right in the figure below - to send web requests away from the first server. On the other han are only concerned with the current number of web connections, you would choose Least Connections (Member) - as shown on the left in the figure below. The choice you make depends on your site's needs. ‘The choice is also significant to many load balancing modes. =) O http 107 fp 2 Least connections (member) Least connections (node) 36 Configuring BIG-IP LTM v11 Lab 3.1 - Prio} y Group Activation Lab Lab Objectives Create a Priority group activation and observe the behavior. Configure Priority Group Activation Reset the statistics for http_pool 1. Modify the http_pool using the information in the following table. ee eae ere eee ee ee General Properties, Name http_pool Description ‘Members tab: Load Balancing Method Ratio (member) Priority Group Activation Less than ... Available Members 2 ‘When complete, click... | Update Within the Configuration section of each member, set the Pt values as follows: Member Ratio Priority Group 172.16.20.1:80 0 |172.16.20.2:80 4 Pars [172.16.20.3:80 4 Reset the statistics for http_pool Disable pool member 172.16.20.2:80 in http_pool. Refresh the screen 5-10 times by pres: Open a new browser session and connect to http://10.10.X.100. CtrLFs. View the pool statistics. What are the results? Cera} 21/101 8. Back on your browser session to htt 100, refresh the screen 5-10 times by pressing CtrL-FS. 9. View the pool statistics. What are the results? 10. Enable pool member 172.16.20.2:80 in http_pool Expected Results and Troubleshooting * With Priority Group Activation set to less than 2 members, and all pool members enabled, 172.16.20.1:80 should receive no traffic. Traffic is distributed to members 172.16.20.2 and 172.16.20.3 in a 2:3 ratio. © With Priority Group Activation set to less than 2 members, and poo! member 172.16.20.2:80 disabled, 172.16.20.2:80 is not eligible to receive traffic. The next lower priority group (0) is activated as the number of available members in the pool has now fallen below the minimum 2 Traffic is distributed to members 172.16.20.1 and 172.16.20.3 in a 1:3 ratio. Cee aaa Lab 3.2 - Network Map and Load Balancing Lab Objectives + Choose differing load balancing methods and view the resulting behavior * Choose differing member priority and ratio values and view the resulting behavior «Estimated time for completion: 10 minutes Lab Requirements Access to hitp_pool from previous lab with at least two or more working members Explore Network Map View Configuration and Status from Network Map 1. From the Navigation pane, expand the Local Traffic section and select Network Map. Move your mouse over both virtual server and pool objects and notice what information is displayed about that object. 3. Select a Pool member and disable it. Use the following steps: 4, From the Network Map, click on a member of pool http_pool. 5. Inthe Member Properties section, set State to Disable. 6. Notice that status changed to disabled or a black circle. Navigate back to the Network Map and view the status there as well. Change the search field to 20.1 and then click Update Map. Notice that all members are still listed, but matches are highlighted. 8. Enable the disabled poo! member again 9. From the ‘70. Change the Start Seren from Welcome to Network Map and click Update, lavigation Pane, expand S; sm_and select Preferences. = ) TI. Log out using the Log out button in the upper-right comer of the GUL 12, Log back into the BIG-IP system again and notice that you are placed directly in the Network Map now. Configure Ratio (node) Load Balancing 13, 14, Is, 16, 17, 18, 19, 20, 21 23 Reset the statistics for http_pool. Navigate to http_pool : Members and change the load balancing method to Ratio (node), Click Update. In the next steps, you will change the ratio of node 172.16.20.3 to 5: From the Navigation pane, expand the Local Traffic section and select Nodes. From the Node List tab, select 172.16.20.3. Within the Configuration section, change the Ratio value to 5. Click Update. (Open a new browser session and connect to http://10.10.X.100. Refresh the screen 5-10 times by pressing Ctrl-FS, View the pool statistics. What are the results? If you are going on to the next optional lab, please leave your configuration the way it is (do not do the clean-up instructions below) and continue with the instructions on the next page. Check with your instructor if you have any questions about which labs to complete. Clean-Up Change the load balancing method to Round Robin. Disable Priority Group Activation. Set Connection Limit and Priority Group for 172.16.20.3:80 to 0. Set Priority Group for all members to 0. Set Ratio to 1 for all members, Expected Results and Troubleshooting Expected result: 172.16.20.1:80 should receive no traffic. The traffic will be distributed to the 20.2 and 20.3 members with a 2:5 ratio. Lab 3.3 - Setting Member Threshold (Optional) Note: If you disabled Priority Group Activation on pool http_pool at the end of the last lab, you will have to enable it again before carrying out this lab. 1, Reset the statistics for http_pool. 2. Change the Connection Limit for pool member 172.16.20.3:80 in http_pool to 5: ee eae Pe eo ee Members section Node Name: 172.16.20.3 Configuration: Basic Connection Limit 5 When complete, click... | Update - Open a new browser session and connect to http://10.10.X.100. Refresh the screen multiple times by pressing and holding Ctrl-FS. ‘View the pool statistics. What are the results? Change the Conneetion Limit for pool member 172.16.20.3:80 in http_pool to 2. Reset the statistics for http_pool. Refresh the screen multiple times by pressing and holding CtrFS. View the pool statistics. What are the results? Clean Up Within http_poot: 10. Change the load balancing method to Round Robii sable Priority Group Activation, Click Update 12. Set Connection Limit and Priority Group for 172.16.20.3:80 to 0 13. Set Priority Group for all members to 0 14. Set Ratio to 1 for all members. Click Update as you modify each member. Configurin Peer en Expected Results 2.16.20.1:80 should receive no traffic. The traffic to 20.3 The traffic will be distributed between 20.2 and 20.3 When the Connection Limit is set to 5, 17: should have a Maximum Connections of members. When Maximum Connection of 20.3 is set to 2, traffic to 20.3 should have a Maximum Connection of 2

Das könnte Ihnen auch gefallen