Cisco CSS 11501 Getting Started Guide - Page 79

Sticky Based on a Con d String in an HTTP Cookie Header

Page 79 highlights

Chapter 4 Configuring Sticky Cookies Advanced Load-Balancing Method Using Cookies The following sections provide configuration information for: • Sticky Based on a Configured String in an HTTP Cookie Header, using the advance-balanced cookies command • Sticky Based on a Cookie in a URL, using the advance-balanced url command • Sticky Based on a Cookie in the HTTP Header or URL, using the advance-balanced cookieurl command For information on additional advanced load-balancing methods including arrowpoint cookies, refer to the Cisco Content Services Switch Content Load-Balancing Configuration Guide. Sticky Based on a Configured String in an HTTP Cookie Header If the server returns a cookie that is static and uniquely identifies itself, use the advanced-balance cookies command. This command enables the content rule to stick a client to a server based on the configured string found in the HTTP cookie header. A content rule with a sticky configuration set to advanced-balance cookies requires all clients to enable cookies on their browser. In the following configuration, the CSS looks for the cookie in the Cookie: field of the HTTP header: 1. The CSS looks for the configured string prefix, which is the cookie name. In this example, the string prefix in the content rule is MyCookie=. 2. If the CSS finds the prefix, then it looks for the value that matches one of the string values configured in one of the services. For example, the string value for service test 1 is server1. The CSS begins searching for the prefix and value at the beginning of the cookie field in the header and searches the entire field until the end of the field. If the HTTP header spans multiple packets, the CSS searches up to 5 packets by default; however, you can configure the CSS to search up to 20 packets (refer to the global spanning-packets command for more details). OL-6037-01 Cisco Content Services Switch Getting Started Guide 4-3

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142

4-3
Cisco Content Services Switch Getting Started Guide
OL-6037-01
Chapter 4
Configuring Sticky Cookies
Advanced Load-Balancing Method Using Cookies
The following sections provide configuration information for:
Sticky Based on a Configured String in an HTTP Cookie Header
, using the
advance-balanced cookies
command
Sticky Based on a Cookie in a URL
, using the
advance-balanced url
command
Sticky Based on a Cookie in the HTTP Header or URL
, using the
advance-balanced cookieurl
command
For information on additional advanced load-balancing methods including
arrowpoint cookies, refer to the
Cisco Content Services Switch Content
Load-Balancing Configuration Guide
.
Sticky Based on a Configured String in an HTTP Cookie Header
If the server returns a cookie that is static and uniquely identifies itself, use the
advanced-balance cookies
command. This command enables the content rule to
stick a client to a server based on the configured string found in the HTTP cookie
header. A content rule with a sticky configuration set to
advanced-balance
cookies
requires all clients to enable cookies on their browser.
In the following configuration, the CSS looks for the cookie in the Cookie: field
of the HTTP header:
1.
The CSS looks for the configured string prefix, which is the cookie name. In
this example, the string prefix in the content rule is MyCookie=.
2.
If the CSS finds the prefix, then it looks for the value that matches one of the
string values configured in one of the services. For example, the string value
for service test 1 is server1. The CSS begins searching for the prefix and value
at the beginning of the cookie field in the header and searches the entire field
until the end of the field.
If the HTTP header spans multiple packets, the CSS searches up to 5 packets
by default; however, you can configure the CSS to search up to 20 packets
(refer to the global
spanning-packets
command for more details).