Getting Started Guide, Cisco ACE Application Control Engine Module
Configuring a Load-Balancing Predictor
Downloads: This chapterpdf (PDF - 102.0KB) The complete bookPDF (PDF - 3.17MB) | Feedback

Configuring a Load-Balancing Predictor

Table Of Contents

Configuring a Load-Balancing Predictor

Information About Load-Balancing Predictors

Configuring the Round-Robin Predictor

Configuration Example for the Round-Robin 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 Round-Robin 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 Server Load-Balancing Guide, Cisco ACE Application Control Engine.

This chapter describes how to configure a round-robin 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 

changeto context
 
        

Example:

host1/Admin# changeto VC_WEB
host1/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 

config
 
        

Example:

host1/VC_WEB# config
host1/VC_WEB(config)# 

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 Round-Robin Predictor

The following example shows how to configure the round-robin 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
 
   
rserver host RS_WEB1
  description content server web-one
  ip address 10.10.50.10
  inservice
rserver host RS_WEB2
  description content server web-two
  ip address 10.10.50.11
  inservice
rserver host RS_WEB3
  description content server web-three
  ip address 10.10.50.12
  inservice
rserver host RS_WEB4
  description content server web-four
  ip address 10.10.50.13
  inservice
 
   
serverfarm host SF_WEB
  predictor roundrobin
  rserver RS_WEB1 80
    inservice
  rserver RS_WEB2 80
    inservice
  rserver RS_WEB3 80
    inservice
  rserver RS_WEB4 80
    inservice
 
   
class-map type management match-any REMOTE_ACCESS
  description Remote access traffic match
  2 match protocol ssh any
  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
  class REMOTE_ACCESS
    permit
policy-map type loadbalance first-match PM_LB
  class class-default
    serverfarm SF_WEB
policy-map multi-match PM_MULTI_MATCH
  class VS_WEB
    loadbalance vip inservice
    loadbalance policy PM_LB
 
   
service-policy input REMOTE_MGMT_ALLOW_POLICY
 
   
interface vlan 400
  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
  no shutdown
interface vlan 500
  description Server connectivity on VLAN 500
  ip address 10.10.50.2 255.255.255.0
  no shutdown
 
   
domain DOMAIN1
add-object all
 
   
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 round-robin predictor for your server load balancing. In the next chapter, you will configure server persistence by using the stickiness feature.