Configuring a Load-Balancing Predictor
This chapter describes how to configure a load-balancing predictor on the Cisco 4700 Series Application Control Engine (ACE) appliance. It describes how to configure a hash header predictor for the server farm that was created in Chapter , "Configuring Server Load Balancing" (as illustrated in Figure 6-1).
This chapter contains the following sections:
•Information About Load-Balancing Predictors
•Configuring a Hash Header 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 appliance selects a real server for a client request using a predictor and how to configure a hash header predictor as an example.
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 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 is the default predictor.
•Hash header—Selects a server using a hash value based on the HTTP header name.
For a complete list of predictor types that the ACE supports and how to configure them, see the Server Load-Balancing Guide, Cisco ACE Application Control Engine.
Configuring a Hash Header Predictor
To configure a a hash header predictor, you can use either the ACE Device Manager user interface (GUI) or the CLI.
•Configuring a Hash Header Predictor Using the Device Manager GUI
•Configuring a Hash Header Predictor Using the CLI
Configuring a Hash Header Predictor Using the Device Manager GUI
You can configure a hash header predictor using the ACE Device Manager GUI by following these steps:
Step 1 Choose Config > Virtual Contexts. Choose context VC_web.
Step 2 Choose Load Balancing > Server Farms. The Server Farms pane appears.
Step 3 Choose SF_web.
Step 4 Choose the Predictor tab.
Step 5 Choose Hash_Header for the predictor Type.
Step 6 Choose Accept for the Header Name.
Step 7 Assign the hash header predictor to server farm SF_web by clicking Deploy Now.
Configuring a Hash Header Predictor Using the CLI
You can configure a hash header predictor using the CLI by following these steps:
Step 1 Verify that you are operating in the desired context by checking the CLI prompt. If necessary, change to the correct context.
host1/Admin# changeto VC_web
Step 2 Enter configuration mode for SF_web.
host1/VC_web(config)# serverfarm SF_web
Step 3 Configure a hash header predictor.
host1/VC_web(config-sfarm-host)# predictor hash header Accept
Step 4 Display the predictor configuration information.
host1/VC_web# show running-config serverfarm
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
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. Next, you will configure server persistence by using the stickiness feature.