4-5
Cisco Content Services Switch Getting Started Guide
OL-6037-01
Chapter 4 Configuring Sticky Cookies
Advanced Load-Balancing Method Using Cookies
service test4
ip address 10.1.1.4
string server4
active
!The string prefix must match the cookie name. We recommend that you
include the ‘=’ as part of the string prefix.
!*************************** OWNER ***************************
owner test
content stickyCookie
advanced-balance cookies
string prefix "MyCookie="
add service test1
add service test2
add service test3
add service test4
port 80
protocol tcp
active
Sticky Based on a Cookie in a URL
If the cookie is present in the URL instead of the cookie field of the HTTP header,
use the
advanced-balance url
command. Some client applications do not accept
cookies. When a site depends upon the information in the cookie, administrators
sometimes modify the server application so that it appends the cookie data to the
parameters section of the URL. The parameters typically follow a “?” at the end
of the main data section of the URL.
In this configuration, the CSS functions in a similar manner as when using the
advanced-balance cookies
command; however, the CSS looks in the URL after
the ‘?’ for the cookie.
Using the full configuration of the
“Sticky Based on a Configured String in an
HTTP Cookie Header”
section, the only difference is the
advanced-balance url
command in the content rule.
!*************************** OWNER ***************************
owner test
content stickyCookie
advanced-balance url