


 



<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docwiki.cisco.com/w/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;feed=atom&amp;action=history</id>
		<title>Session Persistence Using Cookie Learning on the Cisco Application Control Engine Configuration Example - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;action=history"/>
		<updated>2013-05-21T09:04:22Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=36666&amp;oldid=prev</id>
		<title>Gillo1972: /* Design */</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=36666&amp;oldid=prev"/>
				<updated>2010-12-21T21:02:47Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Design&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:02, 21 December 2010&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ACE-1/Admin(config-context)# member sticky&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;ACE-1/Admin(config-context)# member sticky&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{note|At this time sticky resources are a fixed resource outside the other resources.&amp;nbsp; Thus you must use maximum equal-to-min and you must define sticky resources even &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is &lt;/del&gt;all is previously used.&amp;nbsp;  This also applies to the Admin context.}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{note|At this time sticky resources are a fixed resource outside the other resources.&amp;nbsp; Thus you must use maximum equal-to-min and you must define sticky resources even &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;if '''&lt;/ins&gt;all&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;is previously used.&amp;nbsp;  This also applies to the Admin context.}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once the resources have been allocated a sticky group can be defined.&amp;nbsp; The Cisco ACE can be configured in various ways to apply session persistence using cookies.&amp;nbsp; For this example cookie learning will be used.&amp;nbsp; The cookie name ACE will attempt to learn is supplied when the sticky group is created.&amp;nbsp; By default ACE learns cookies and these entries have a idle timeout of 24 hours.&amp;nbsp; Using the configuration below ACE will learn the value of a cookie with the name “JSessionID”.&amp;nbsp; The session will timeout after 5 minutes of no new connections/requests containing this cookie value.&amp;nbsp; The ACE will use a pre-existing serverfarm named “webfarm”.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once the resources have been allocated a sticky group can be defined.&amp;nbsp; The Cisco ACE can be configured in various ways to apply session persistence using cookies.&amp;nbsp; For this example cookie learning will be used.&amp;nbsp; The cookie name ACE will attempt to learn is supplied when the sticky group is created.&amp;nbsp; By default ACE learns cookies and these entries have a idle timeout of 24 hours.&amp;nbsp; Using the configuration below ACE will learn the value of a cookie with the name “JSessionID”.&amp;nbsp; The session will timeout after 5 minutes of no new connections/requests containing this cookie value.&amp;nbsp; The ACE will use a pre-existing serverfarm named “webfarm”.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gillo1972</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=24601&amp;oldid=prev</id>
		<title>Docwikibot: Bot: Adding {{Template:Required Metadata}}</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=24601&amp;oldid=prev"/>
				<updated>2009-12-18T17:32:27Z</updated>
		
		<summary type="html">&lt;p&gt;Bot: Adding {{Template:Required Metadata}}&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:32, 18 December 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{Template:Required Metadata}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Goal==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Goal==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Docwikibot</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=7916&amp;oldid=prev</id>
		<title>Pzimmerm: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=7916&amp;oldid=prev"/>
				<updated>2008-12-04T18:37:29Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 18:37, 4 December 2008&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pzimmerm</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=7915&amp;oldid=prev</id>
		<title>Pzimmerm: /* Design */</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/w/index.php?title=Session_Persistence_Using_Cookie_Learning_on_the_Cisco_Application_Control_Engine_Configuration_Example&amp;diff=7915&amp;oldid=prev"/>
				<updated>2008-12-03T21:26:23Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Design&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Goal==&lt;br /&gt;
&lt;br /&gt;
Configure basic load balancing with cookie learning where client traffic enters on one network and is directed to servers residing on a second network.  Once the client has entered the site they will remain stuck to a given server based on a HTTP Cookie learned by ACE from the server.  &lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
Clients will send application requests through the multilayer switch feature card (MSFC), which routes them to a virtual IP address (VIP) within the Cisco® Application Control Engine (ACE).  The VIP used in this example resides in an ACE context, which is configured with a client VLAN and a server VLAN (see the figure below).  Client requests will arrive at the VIP, and the ACE will check the request to see if it contains a cookie.  If it does, the sticky table will be checked to see which server should receive the request.  If the cookie entry has expired, or if the client does not have a cookie the ACE will pick the appropriate server to receive the request based on the requested URL.  When the server responds ACE will learn the cookie value found within the HTTP Response so that upon future requests client persistence to the server will be maintained. &lt;br /&gt;
&lt;br /&gt;
[[Image:SSL Persistence Using Cookie Learning.jpg]]&lt;br /&gt;
&lt;br /&gt;
Within the Cisco ACE sticky resources are finite and are controlled via resource allocation.  Before a context can apply session persistence using sticky groups, the context must first be given a sticky allocation.  Once this is done, a sticky group is created to define parameters and the serverfarm where client requests will be sent.  Recall, the load balancing action tells ACE how to handle traffic which has hit a VIP.  Thus the sticky group on ACE is applied within the load balance policy-map.  To enable server load-balancing with session persistence based on cookies ACE learns you need to do the following: &lt;br /&gt;
&lt;br /&gt;
* Allocate sticky resources to the context &lt;br /&gt;
* Enable ACLs to allow data traffic through the ACE device, as it is denied by default.  &lt;br /&gt;
* Configure the IPs of the servers (define rservers)&lt;br /&gt;
* Group the real servers (create a serverfarm) &lt;br /&gt;
* Create a sticky group&lt;br /&gt;
* Define the virtual IP address (VIP)&lt;br /&gt;
* Define how traffic is to be handled as it is received (create a policy map for load balancing)&lt;br /&gt;
* Apply the sticky group to  the load balancing policy&lt;br /&gt;
* Associate a VIP to a handling action (create a multimatch policy map [a service policy])&lt;br /&gt;
* Create client- and server-facing interfaces&lt;br /&gt;
* Apply the VIP and ACL permitting client connections to the interface (apply access group and service policy to interface)&lt;br /&gt;
&lt;br /&gt;
{{note|For brevity only the bold steps are covered in this document.  Please review the URL Load Balancing using Routed Mode document for more information on basic URL load balancing and the base configuration.}}&lt;br /&gt;
&lt;br /&gt;
To begin the configuration, allocate sticky resources to the context you will be using.  In this example a context “routed” has already been defined.  Create a resource class, allocate the desired amount of sticky entries, and apply them to the “routed” context.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/Admin# show run | begin routed&lt;br /&gt;
context routed&lt;br /&gt;
  allocate-interface vlan 10&lt;br /&gt;
  allocate-interface vlan 20&lt;br /&gt;
allocate-interface vlan 40&lt;br /&gt;
&lt;br /&gt;
ACE-1/Admin(config)# resource-class sticky&lt;br /&gt;
ACE-1/Admin(config-resource)# limit-resource all minimum 0.00 maximum unlimited&lt;br /&gt;
ACE-1/Admin(config-resource)# limit-resource sticky minimum 10.00 maximum equal-to-min&lt;br /&gt;
&lt;br /&gt;
ACE-1/Admin(config)# context routed&lt;br /&gt;
ACE-1/Admin(config-context)# member sticky&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|At this time sticky resources are a fixed resource outside the other resources.  Thus you must use maximum equal-to-min and you must define sticky resources even is all is previously used.   This also applies to the Admin context.}}&lt;br /&gt;
&lt;br /&gt;
Once the resources have been allocated a sticky group can be defined.  The Cisco ACE can be configured in various ways to apply session persistence using cookies.  For this example cookie learning will be used.  The cookie name ACE will attempt to learn is supplied when the sticky group is created.  By default ACE learns cookies and these entries have a idle timeout of 24 hours.  Using the configuration below ACE will learn the value of a cookie with the name “JSessionID”.  The session will timeout after 5 minutes of no new connections/requests containing this cookie value.  The ACE will use a pre-existing serverfarm named “webfarm”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/routed(config)# sticky http-cookie JSessionID web-sticky&lt;br /&gt;
ACE-1/routed(config-sticky-cookie)# timeout 5&lt;br /&gt;
ACE-1/routed(config-sticky-cookie)# serverfarm webfarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The serverfarm within the load balancing policy map must be swapped with the sticky group to apply cookie learning to new client requests.  Based on this example configuration there are two possible actions for handling new client requests.  Any requests for images will be sent to the “imagefarm” serverfarm, which does not require persistence.  All other requests will be sent to the web servers in the “webfarm” where the clients will use session persistence.   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/routed(config)# policy-map type loadbalance http first-match slb-logic&lt;br /&gt;
ACE-1/routed(config-pmap-lb-c)# class class-default&lt;br /&gt;
ACE-1/routed(config-pmap-lb-c)# no serverfarm webfarm&lt;br /&gt;
ACE-1/routed(config-pmap-lb-c)# sticky-serverfarm web-sticky&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|Changing from a serverfarm to a sticky group is potentially service impacting.  While current connections will be allowed to finish, new connections will not be accepted during the removal of the serverfarm and applying the sticky group to the load balance policy. }}&lt;br /&gt;
&lt;br /&gt;
When cookie learning is applied there are no entries in the http-cookie sticky database.  As new connections arrive, and cookies are learned new entryies for each client will be stored in the sticky database for http-cookies.  In this example there are two entries created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/routed(config-pmap-lb-c)# do show sticky database http-cookie&lt;br /&gt;
sticky group : web-sticky&lt;br /&gt;
type         : HTTP-COOKIE&lt;br /&gt;
timeout      : 5             timeout-activeconns : FALSE&lt;br /&gt;
  sticky-entry          rserver-instance      time-to-expire flags&lt;br /&gt;
  ---------------------+----------------------+--------------+-------+&lt;br /&gt;
  16820511103801384579  lnx1:0                  0         -&lt;br /&gt;
sticky group : web-sticky&lt;br /&gt;
type         : HTTP-COOKIE&lt;br /&gt;
timeout      : 5             timeout-activeconns : FALSE&lt;br /&gt;
  sticky-entry          rserver-instance      time-to-expire flags&lt;br /&gt;
  ---------------------+----------------------+--------------+-------+&lt;br /&gt;
  3347854103021350619   lnx2:0                  0         -&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|The “sticky-entry”  is a hash of the cookie-value set by ACE for the real server.  It will not appear in a sniffer trace or on the client browser.  See the comment section below for determining which server a client is associated to via the cookie value.}}&lt;br /&gt;
&lt;br /&gt;
When a client connects to the VIP they download index.html page from the web servers.   At this point the client will get a cookie for the selected server to ensure all future requests will continue to use the same server.   While there is no way to see how many clients have a cookie for a given server the common show commands will provide details on the incoming requests and responses and other data stats.  &lt;br /&gt;
&lt;br /&gt;
Recall, the Cisco ACE inserts a static entry for each server in a server farm in the sticky group.  In this case there is only one sticky group and it uses cookie-insert and the serverfarm contains 2 real servers.  Thus the output of the show stats sticky command displays 2 entries, despite the number of clients using the VIP.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/routed# show stats sticky&lt;br /&gt;
&lt;br /&gt;
+------------------------------------------+&lt;br /&gt;
+----------- Sticky statistics ------------+&lt;br /&gt;
+------------------------------------------+&lt;br /&gt;
 Total sticky entries reused    : 0&lt;br /&gt;
 prior to expiry&lt;br /&gt;
 Total active sticky entries    : 3&lt;br /&gt;
 Total active sticky conns      : 0&lt;br /&gt;
 Total static sticky entries    : 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related show commands ==&lt;br /&gt;
&lt;br /&gt;
This section provides information you can use to confirm your configuration is working properly.&lt;br /&gt;
&lt;br /&gt;
Certain show commands are supported by the [https://www.cisco.com/cgi-bin/Support/OutputInterpreter/home.pl Output Interpreter Tool (registered customers only)], which allows you to view an analysis of show command output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/routed #show sticky database static&lt;br /&gt;
ACE-1/routed #show service-policy client-vips&lt;br /&gt;
ACE-1/routed #show service-policy client-vips detail&lt;br /&gt;
ACE-1/routed #show serverfarm&lt;br /&gt;
ACE-1/routed #show rserver&lt;br /&gt;
ACE-1/routed #show stats&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;br /&gt;
The type of cookie ACE will insert depends on if cookie-insert is configured or cookie-insert browser-expire is configured.  The sniffer traces below show the difference between the types of cookies ACE will insert.&lt;br /&gt;
&lt;br /&gt;
===ACE configured with “cookie insert”===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Hypertext Transfer Protocol&lt;br /&gt;
    HTTP/1.1 200 OK\r\n&lt;br /&gt;
    Set-Cookie: JsessionID=128748457485485489; path=/; expires=Thu, &lt;br /&gt;
16-Oct-2008 00:08:55 GMT\r\n&lt;br /&gt;
    Date: Fri, 29 Aug 2008 19:17:35 GMT\r\n&lt;br /&gt;
    Server: Apache/2.0.52 (Red Hat)\r\n&lt;br /&gt;
    Accept-Ranges: bytes\r\n&lt;br /&gt;
    Content-Length: 1112\r\n&lt;br /&gt;
    VirtualHost: 192.168.1.12\r\n&lt;br /&gt;
    Connection: close\r\n&lt;br /&gt;
    Content-Type: text/html; charset=UTF-8\r\n&lt;br /&gt;
    \r\n&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice the two cookie values do not appear to be related to the sticky-value in the show sticky database static output, displayed below: &lt;br /&gt;
  &lt;br /&gt;
&amp;lt;pre&amp;gt;  sticky-entry          rserver-instance      time-to-expire flags&lt;br /&gt;
  ---------------------+----------------------+--------------+-------+&lt;br /&gt;
  16820511103801384579  lnx1:0                  never         -&lt;br /&gt;
     &amp;lt;…snip…&amp;gt;&lt;br /&gt;
  3347854103021350619   lnx2:0                  never         -&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because the sticky-entry is a hash of the cookie value.  In order to determine the server a client is hitting one must mark the server such that it can be distinguished, possibly using a HTTP Header in the server response, or by determining the sticky-entry ACE uses for each learned cookie entry.  The sticky-entry is a hash of the first 255 bytes of the cookie value.  The ACE provides a command which takes the cookie value set by the server and displays the cookie entry.  This provides the association between a client and a real server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/routed(config-context)# show sticky database http-cookie “128748457485485489”&lt;br /&gt;
&lt;br /&gt;
sticky group : web-sticky&lt;br /&gt;
type         : HTTP-COOKIE&lt;br /&gt;
timeout      : 5             timeout-activeconns : FALSE&lt;br /&gt;
  sticky-entry          rserver-instance         time-to-expire flags&lt;br /&gt;
  ---------------------+------------------------+--------------+-------+&lt;br /&gt;
  497835028048248915    lnx2:0                   254            -&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==show running-config ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ACE-1/routed# show run&lt;br /&gt;
Generating configuration....&lt;br /&gt;
&lt;br /&gt;
access-list everyone line 8 extended permit ip any any&lt;br /&gt;
access-list everyone line 16 extended permit icmp any any&lt;br /&gt;
&lt;br /&gt;
rserver host lnx1&lt;br /&gt;
  ip address 192.168.1.11&lt;br /&gt;
  inservice&lt;br /&gt;
rserver host lnx2&lt;br /&gt;
  ip address 192.168.1.12&lt;br /&gt;
  inservice&lt;br /&gt;
rserver host lnx3&lt;br /&gt;
  ip address 192.168.1.13&lt;br /&gt;
  inservice&lt;br /&gt;
rserver host lnx4&lt;br /&gt;
  ip address 192.168.1.14&lt;br /&gt;
  inservice&lt;br /&gt;
&lt;br /&gt;
serverfarm host imagefarm&lt;br /&gt;
  rserver lnx3&lt;br /&gt;
    inservice&lt;br /&gt;
  rserver lnx4&lt;br /&gt;
    inservice&lt;br /&gt;
serverfarm host webfarm&lt;br /&gt;
  rserver lnx1&lt;br /&gt;
    inservice&lt;br /&gt;
  rserver lnx2&lt;br /&gt;
    inservice&lt;br /&gt;
&lt;br /&gt;
sticky http-cookie ACE-Insert web-sticky&lt;br /&gt;
  timeout 5&lt;br /&gt;
serverfarm webfarm&lt;br /&gt;
&lt;br /&gt;
class-map type http loadbalance match-all images&lt;br /&gt;
  2 match http url /images/.*&lt;br /&gt;
&lt;br /&gt;
class-map match-all slb-vip&lt;br /&gt;
  2 match virtual-address 172.16.1.101 any&lt;br /&gt;
&lt;br /&gt;
policy-map type management first-match remote-access&lt;br /&gt;
  class class-default&lt;br /&gt;
    permit&lt;br /&gt;
&lt;br /&gt;
policy-map type loadbalance http first-match slb&lt;br /&gt;
  class images&lt;br /&gt;
    serverfarm imagefarm&lt;br /&gt;
  class class-default&lt;br /&gt;
    sticky-serverfarm web-sticky&lt;br /&gt;
&lt;br /&gt;
policy-map multi-match client-vips&lt;br /&gt;
  class slb-vip&lt;br /&gt;
    loadbalance vip inservice&lt;br /&gt;
    loadbalance policy slb&lt;br /&gt;
&lt;br /&gt;
interface vlan 20&lt;br /&gt;
  description &amp;quot;Client Side&amp;quot;&lt;br /&gt;
  ip address 172.16.1.5 255.255.255.0&lt;br /&gt;
  access-group input everyone&lt;br /&gt;
  service-policy input client-vips&lt;br /&gt;
  no shutdown&lt;br /&gt;
&lt;br /&gt;
interface vlan 40&lt;br /&gt;
  description &amp;quot;Default gateway of real servers&amp;quot;&lt;br /&gt;
  ip address 192.168.1.1 255.255.255.0&lt;br /&gt;
  service-policy input remote-access&lt;br /&gt;
  no shutdown&lt;br /&gt;
&lt;br /&gt;
ip route 0.0.0.0 0.0.0.0 172.16.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Information==&lt;br /&gt;
[http://www.cisco.com/web/psa/products/index.html Technical Support &amp;amp; Documentation - Cisco Systems]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--List links to related information--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Data Center Application Services Configuration Examples]]&lt;/div&gt;</summary>
		<author><name>Pzimmerm</name></author>	</entry>

	</feed>