Configuring Beginning And Ending Patterns - Cisco catalyst 6500 series Configuration Note

Content switching module
Hide thumbs Also See for catalyst 6500 series:
Table of Contents

Advertisement

Chapter 5
Configuring Real Servers and Server Farms
This example shows how to configure URL hashing and load-balancing predictor for a server farm:
Router(config)# mod csm 2
Router(config-module-csm)# serverfarm farm1
Router(config-slb-sfarm)# predictor hash url
Router(config-slb-sfarm)# real 10.1.0.105
Router(config-slb-real)# inservice
Router(config-slb-real)# exit
Cache servers perform better using URL hashing. However, the hash methods do not recognize weight
for the real servers. The weight assigned to the real servers is used in the round-robin and least
connection predictor methods.
The only time the sequence of servers starts over at the beginning (with the first server) is when there is
Note
a configuration or server state change (either a probe or DFP agent).
To create different weights for real servers, you can list multiple IP addresses of the cache server in the
server farm. You can also use the same IP address with a different port number.
To configure real servers with a weight when using the URL hash predictor, perform this task:
Command
Step 1
Router(config-slb-sfarm)#
serverfarm MYFARM
Step 2
Router(config-slb-sfarm)#
real 1.1.1.1 80
Step 3
Router(config-slb-sfarm)#
inservice
Step 4
Router(config-slb-sfarm)#
real 1.1.1.1 8080
Step 5
Router(config-slb-sfarm)#
inservice

Configuring Beginning and Ending Patterns

You configure a beginning and ending pattern at the virtual server level. The pattern you define applies
to all the server farms assigned to all of the policies in that virtual server that have URL hashing enabled.
The beginning and ending pattern delimits the portion of the URL that will be hashed and used as a
predictor to select a real server from a server farm that belongs to any policy assigned to that virtual
server.
To hash a substring of the URL instead of the entire URL, specify the beginning and ending patterns in
vserver vserver-name submode with the url-hash begin-pattern pattern-a command and url-hash
end-pattern pattern-b command. Hashing occurs at the start of the beginning pattern and goes to the
ending pattern.
For example, in the following URL, if the beginning pattern is c&k=, and the ending pattern is &, only
the substring c&k=c is hashed:
http://quote.yahoo.com/q?s=csco&d=c&k=c1&t=2y&a=v&p=s&l=on&z=m&q=l\
OL-4612-01
Purpose
Creates a server farm named MYFARM.
Specifies the real server at port 80
Enables the real server in service.
Specifies the real server at port 8080.
Enables the real server in service.
Catalyst 6500 Series Content Switching Module Configuration Note
Configuring URL Hashing
5-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 6000 series

Table of Contents