Table Of Contents
Configuring a Load-Balancing Predictor
Information About Load-Balancing Predictors
Configuring the Round-Robin Predictor
Configuration Example for the Hash Header Predictor
Where to Go Next
Configuring a Load-Balancing Predictor
This chapter describes how to configure a load-balancing predictor (method) on the Cisco Application Control Engine (ACE) module.
This chapter contains the following sections:
•
Information About Load-Balancing Predictors
•
Configuring the Round-Robin Predictor
•
Configuration Example for the Hash Header Predictor
•
Where to Go Next
Information About Load-Balancing Predictors
After reading this chapter, you should have a basic understanding of how the ACE selects a real server for a client request using a predictor and how to configure the round-robin and the least-connections predictors.
When there is a client request for web services, the ACE selects a server that can successfully fulfill the client request in the shortest amount of time without overloading either the individual server or the server farm.
The ACE makes load-balancing choices using a predictor. When you configure a predictor, you define the series of checks and calculations that the ACE will perform to determine which real server can best service a client request.
For each server farm, you can configure one of several predictor types to allow the ACE to select an appropriate server. Two common predictor types include the following:
•
Round-robin—Selects a server from the list of real servers based on the weighted server capacity. A weight can be assigned to each real server based on its connection capacity in relation to the other servers in a server farm. Servers with higher weight values receive a proportionally higher number of connections than servers with lower weight values. For example, a server with a weight of 5 would receive five connections for every one connection received by a server with a weight of 1. Also known as weighted round-robin, this type is the default predictor.
•
Least connections— Selects the server with the fewest number of connections based on the server weight. This predictor is useful for processing light user requests (for example, browsing simple static web pages). Use the optional slow-start mechanism to avoid sending a high rate of new connections to servers that you have recently put into service. When a new real server enters slow-start mode, the ACE calculates and assigns an artificially high metric weight value to the new server and sends a small number of connections to the new server initially. The remaining connections go to the existing servers based on their weight and current connections. When the slow-start timer expires or the real server weight reaches zero, the ACE takes the server out of slow-start mode and assigns connections normally.
For a complete list of predictor types that the ACE supports and how to configure them, see the Cisco Application Control Engine Module Administration Guide.
This chapter describes how to configure a hash header predictor for the server farm that was created in Chapter 6, "Configuring Server Load Balancing," as shown in Figure 6-1.
Configuring the Round-Robin Predictor
Procedure
|
Command
|
Purpose
|
Step 1
|
Example:
host1/Admin# changeto VC_WEB
|
Changes to the correct context if necessary. Check the CLI prompt to verify that you are operating in the desired context.
|
Step 2
|
Example:
|
Enters configuration mode.
|
Step 3
|
serverfarm name
Example:
host1/VC_WEB(config)# serverfarm SF_WEB
host1/VC_WEB(config-sfarm-host)#
|
Enters server farm host configuration mode for SF_WEB.
|
Step 4
|
predictor roundrobin
Example:
host1/VC_WEB(config-sfarm-host)#
predictor roundrobin
|
Configures the round-robin predictor. For weighted round-robin, assign a weight to the real server.
|
Step 5
|
exit
Example:
host1/VC_WEB(config-sfarm-host)# exit
host1/VC_WEB(config)# exit
host1/VC_WEB#
|
Exits server farm host configuration mode. Exits configuration mode.
|
Step 6
|
show running-config serverfarm
Example:
host1/VC_WEB# show running-config
serverfarm
|
Display the predictor configuration information.
|
Step 7
|
copy running-config startup-config
Example:
host1/VC_WEB# copy running-config
startup-config
|
(Optional) Copies the running configuration to the startup configuration.
|
Configuration Example for the Hash Header Predictor
The following example shows how to configure the hash header predictor. The commands that you have configured in this chapter appear in bold text.
switch/VC_WEB(config)# do show running config
Generating configuration....
access-list INBOUND line 8 extended permit ip any any
description content server web-one
description content server web-two
description content server web-three
description content server web-four
class-map type management match-any REMOTE_ACCESS
description Remote access traffic match
3 match protocol telnet any
4 match protocol icmp any
class-map match-all VS_WEB
2 match virtual-address 10.10.40.10 tcp eq www
policy-map type management first-match REMOTE_MGMT_ALLOW_POLICY
policy-map type loadbalance first-match PM_LB
policy-map multi-match PM_MULTI_MATCH
loadbalance vip inservice
service-policy input REMOTE_MGMT_ALLOW_POLICY
description Client connectivity on VLAN 400
ip address 10.10.40.1 255.255.255.0
access-group input INBOUND
service-policy input PM_MULTI_MATCH
description Server connectivity on VLAN 500
ip address 10.10.50.2 255.255.255.0
ip route 0.0.0.0 0.0.0.0 172.25.91.1
username USER1 password 5 $1$vAN9gQDI$MmbmjQgJPj45lxbtzXPpB1 role SLB-Admin domain
DOMAIN1
Where to Go Next
In this chapter, you have configured a hash header predictor for your server load balancing. In the next chapter, you will configure server persistence by using the stickiness feature.