<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>4.4.2 Sticky Session Issue when Load-balanced</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=548063" />
  <subtitle>4.4.2 Sticky Session Issue when Load-balanced</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=548063</id>
  <updated>2026-05-14T15:25:44Z</updated>
  <dc:date>2026-05-14T15:25:44Z</dc:date>
  <entry>
    <title>RE: 4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=604284" />
    <author>
      <name>Artur Linhart</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=604284</id>
    <updated>2008-03-27T08:12:56Z</updated>
    <published>2008-03-27T08:12:56Z</published>
    <summary type="html">OK, I do not know how it is done by apache LB - because it is just the apache http server with the mod_jk module... But I guess this will be the JSESSIONID beacuse this is the only one cookie which contains the identification of the cluster node inside. &lt;br /&gt;&lt;br /&gt;For example by apache (SW) LB it means, if You use tomcat in Your cluster and make the load balancing with the mod_jk module, You have to specify the parameter jvmroute on each Tomcat nore and this has to match with the lb nodes defined in mod_jk.conf...&lt;br /&gt;&lt;br /&gt;But this will be something different in the case of HW LB, I guess... Apache LB communicates with tomcat over AJP13 protocol which leads to much more better performance than just redirect all the http stuff. &lt;br /&gt;&lt;br /&gt;I think the HW LB only forwards the HTTP requests, is it true? Then it has to remember the JSESSIONID frome very request and if the cookie comes, then it makes the redirect... But - how long is the timeout how long the LB remembers the cookie? Maybe You should also set some timeout of the remembering of the session cookies - If the LB would have the &amp;#34;max remember time&amp;#34; set to 0, then this would also lead to the same behavior like if there is no stickiness configured at all... The timeout should be the same like the timeout set on the server with liferay...&lt;br /&gt;&lt;br /&gt;I would ask the HW LB producer how the stickiness can be configured in Your case... :-) I have no knowledge aucout the HW LB, so this is only theory which comes into my mind now...&lt;br /&gt;&lt;br /&gt;What I wanted to say by my previous post - it is not for the support ticket for Liferay, because it is liferay-independent question...</summary>
    <dc:creator>Artur Linhart</dc:creator>
    <dc:date>2008-03-27T08:12:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: 4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=603474" />
    <author>
      <name>Stephan Cray</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=603474</id>
    <updated>2008-03-27T03:10:03Z</updated>
    <published>2008-03-27T03:10:03Z</published>
    <summary type="html">Hey, Archie, thanks for taking the time to confirm it.  Just to make it clear to myself, I assume you are using JSESSIONID for sticky-session?&lt;br /&gt;&lt;br /&gt;Best,&lt;br /&gt;&lt;br /&gt;D-</summary>
    <dc:creator>Stephan Cray</dc:creator>
    <dc:date>2008-03-27T03:10:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: 4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=595133" />
    <author>
      <name>Artur Linhart</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=595133</id>
    <updated>2008-03-25T09:47:59Z</updated>
    <published>2008-03-25T09:47:59Z</published>
    <summary type="html">I can only confirm there is no problem if using apache LB with load balancing through mod_jk module... So it seems to be really the problem of HW LB...&lt;br /&gt;&lt;br /&gt;good luck, Archie</summary>
    <dc:creator>Artur Linhart</dc:creator>
    <dc:date>2008-03-25T09:47:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: 4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=575625" />
    <author>
      <name>Stephan Cray</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=575625</id>
    <updated>2008-03-17T00:52:01Z</updated>
    <published>2008-03-17T00:52:01Z</published>
    <summary type="html">If I use cookie-insert CLI, the LocalDirector then works fine, while cookie-passive JSESSIONID is not working properly.  This tells me that the HTTP session got invalidated somewhere, and got re-created that caused the JSESSIONID value change.  Could anyone confirm this before I log a support ticket?</summary>
    <dc:creator>Stephan Cray</dc:creator>
    <dc:date>2008-03-17T00:52:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: 4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=570273" />
    <author>
      <name>Stephan Cray</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=570273</id>
    <updated>2008-03-14T07:16:29Z</updated>
    <published>2008-03-14T07:16:29Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;For those interested, the following test.jsp page under the ROOT directory works fine, which should eliminate LB problems:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;%@page language="java" %&amp;amp;gt;


&amp;lt;table aligh="center" border="1"&amp;gt;
&amp;lt;tbody&amp;gt;&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;
Session ID&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;amp;lt;%= session.getId() %&amp;amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;
Created on&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;amp;lt;%= session.getCreationTime() %&amp;amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;The output from your browser will look like the following and will be sticky:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;Session ID C6B2697C6599BE7C2853A0D2C8651BD6.app-2 
Created on 1205478445854 &lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;or&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;Session ID 8562082C1C93D784FA49F06FD2D58EB2.app-1 
Created on 1205478328084 
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Stephan Cray</dc:creator>
    <dc:date>2008-03-14T07:16:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: 4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=565875" />
    <author>
      <name>Stephan Cray</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=565875</id>
    <updated>2008-03-13T05:08:59Z</updated>
    <published>2008-03-13T05:08:59Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Thanks for the confirmation.  Assuming you are running 4.4.2, would it be possible to post your setup? Like HW LB type? App server type?  Any help would be appreciated.&lt;br&gt; &lt;br&gt;Here's the details from my setup:&lt;br&gt;&lt;br&gt;* An old-timer cisco ldir-430 splits the load to two XEN guest servers with JSESSIONID sticky&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;ldir-430(config)# show sticky
       Virtual Machine(s)               Sticky
   192.168.0.101:80:0:tcp                   10 cookie-passive JSESSIONID

ldir-430(config)# show bind
       Virtual Machine(s)   Real Machines/Urls
   192.168.0.101:80:0:tcp(IS)
                           192.168.0.125:8080:0:tcp(IS)
                           192.168.0.123:8080:0:tcp(IS)&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;* Two XEN guests run the Tomcat 6/Liferay-4.4.2 bundle, both listening on port 8080.&lt;br&gt;&lt;br&gt;* The two Tomcat instances are not clustered.&lt;br&gt;&lt;br&gt;* The two Tomcat &amp;lt;Engine&amp;gt; elements from the server.xml look like the following: &lt;br&gt;&lt;br&gt;   XEN Guest 1:&lt;br&gt;   &lt;pre&gt;&lt;code&gt;&amp;lt;engine name="Catalina" defaulthost="localhost" jvmroute="app-1"&amp;gt;&amp;lt;/engine&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;   &lt;br&gt;   XEN Guest 2:&lt;br&gt;    &lt;pre&gt;&lt;code&gt;&amp;lt;engine name="Catalina" defaulthost="localhost" jvmroute="app-2"&amp;gt;&amp;lt;/engine&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;* Access the url: http://192.168.0.101/, and experienced server jumping during the session.  For example, after logging in, it would bring the user to the login page again.&lt;br&gt;&lt;br&gt;* At the time of the jumping, I noticed the JSESSIONID cookie changed value.  &lt;br&gt;&lt;br&gt;* This happened on both FireFox and IE7.  &lt;br&gt;&lt;br&gt;* If I just put a simple JSP page under the ROOT folder with a getSession() call , the LB sticks to one server just fine during the session.  This eliminates possible issue from the LB itself.&lt;br&gt;&lt;br&gt;At this point, I don't know where the http session got invalidated, as the jumping does not occur at a particular page.  Any ideas would be appreciated.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Stephan Cray</dc:creator>
    <dc:date>2008-03-13T05:08:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: 4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=552068" />
    <author>
      <name>Mika Koivisto</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=552068</id>
    <updated>2008-03-09T20:20:34Z</updated>
    <published>2008-03-09T20:20:34Z</published>
    <summary type="html">We haven&amp;#39;t had any problems with hardware lb. Just use JSESSIONID for sticky.</summary>
    <dc:creator>Mika Koivisto</dc:creator>
    <dc:date>2008-03-09T20:20:34Z</dc:date>
  </entry>
  <entry>
    <title>4.4.2 Sticky Session Issue when Load-balanced</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=548062" />
    <author>
      <name>Stephan Cray</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=548062</id>
    <updated>2008-03-07T08:23:13Z</updated>
    <published>2008-03-07T08:23:13Z</published>
    <summary type="html">Session affinity (sticky) seems not working from my setup.  This can be seen from both a hardware load balancer setup and apache mod_proxy_balancer setup.  Anyone else experienced the same, or, just me confusing?&lt;br /&gt;&lt;br /&gt;-Dafang</summary>
    <dc:creator>Stephan Cray</dc:creator>
    <dc:date>2008-03-07T08:23:13Z</dc:date>
  </entry>
</feed>
