Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Load balancing with cookies disabled
Load balancing with cookies disabled [message #714546] Wed, 10 August 2011 19:37 Go to next message
Graham Missing name is currently offline Graham Missing nameFriend
Messages: 20
Registered: July 2010
Junior Member
Hi,

We have some RAP 1.3.X applications which are load balanced with apache mod_proxy across 4 instances of RAP with embedded jetty. I've followed instructions from other posts reqarding using a jetty worker name for the HashSessionIdManager. This works great and load balances across my 4 instances. I want to disable cookies now so that I can have multiple browser instances open. I followed other posts that showed how to set the session manager setUsingCookies to false. The problem that I've discovered is that all http "post" requestes have the jessionid appended on the url but the get requests do not.

I've supplied a couple of the Post and Get requests (stripped off most of it but wanted to show the URL and the cookie)

1) Example HTTP Post and GET(cookies set to TRUE)

POST /entrypointname?nocache=1313003230084 HTTP/1.1
Cookie: JSESSIONID=JVM11nzlmas86tpxjlzei4d6iar2g.JVM1; settingStore=1312991667919_0

GET /rwt-resources/resource/widget/rap/cursors/alias.gif HTTP/1.1
Cookie: JSESSIONID=JVM11nzlmas86tpxjlzei4d6iar2g.JVM1; settingStore=1312991667919_0

This load balances correctly but I cannot run multiple browser instances.

2) Example HTTP Post and GET(cookies set to FALSE)

POST /entrypointname;jsessionid=JVM11nzlmas86tpxjlzei4d6iar2g.JVM1?nocache=1313003216824 HTTP/1.1

GET /rwt-resources/resource/widget/rap/cursors/alias.gif HTTP/1.1

This only load balances the posts but not the gets correctly.

You can see that the get url does not have the jessionid appended and so when Apache mod_proxy looks for the jetty worker name is doesn't find one and then send the request to a different JVM which produces http 404 error codes.

Any ideas? Also moving to RAP 1.4 is not an option at this point. We're too close to implement this to production. Is there a way to get the jsession id appened to the get urls?

Thanks in advance
Re: Load balancing with cookies disabled [message #715521 is a reply to message #714546] Sun, 14 August 2011 10:08 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

the RAP client does not support rewriting URLs for static resources.
Feel free to open an enhancement request.

I first thought it should be fair to deliver static content from a
dedicated node, since the load is mostly caused by ui requests which are
all POSTs. But I see that this would require to somehow synchronize the
resources...

Best regards,
Ralf


On 08/10/2011 09:37 PM, Graham wrote:
> Hi,
>
> We have some RAP 1.3.X applications which are load balanced with apache
> mod_proxy across 4 instances of RAP with embedded jetty. I've followed
> instructions from other posts reqarding using a jetty worker name for
> the HashSessionIdManager. This works great and load balances across my 4
> instances. I want to disable cookies now so that I can have multiple
> browser instances open. I followed other posts that showed how to set
> the session manager setUsingCookies to false. The problem that I've
> discovered is that all http "post" requestes have the jessionid appended
> on the url but the get requests do not.
> I've supplied a couple of the Post and Get requests (stripped off most
> of it but wanted to show the URL and the cookie)
>
> 1) Example HTTP Post and GET(cookies set to TRUE)
>
> POST /entrypointname?nocache=1313003230084 HTTP/1.1
> Cookie: JSESSIONID=JVM11nzlmas86tpxjlzei4d6iar2g.JVM1;
> settingStore=1312991667919_0
>
> GET /rwt-resources/resource/widget/rap/cursors/alias.gif HTTP/1.1
> Cookie: JSESSIONID=JVM11nzlmas86tpxjlzei4d6iar2g.JVM1;
> settingStore=1312991667919_0
>
> This load balances correctly but I cannot run multiple browser instances.
>
> 2) Example HTTP Post and GET(cookies set to FALSE)
>
> POST
> /entrypointname;jsessionid=JVM11nzlmas86tpxjlzei4d6iar2g.JVM1?nocache=1313003216824
> HTTP/1.1
>
> GET /rwt-resources/resource/widget/rap/cursors/alias.gif HTTP/1.1
>
> This only load balances the posts but not the gets correctly.
>
> You can see that the get url does not have the jessionid appended and so
> when Apache mod_proxy looks for the jetty worker name is doesn't find
> one and then send the request to a different JVM which produces http 404
> error codes.
>
> Any ideas? Also moving to RAP 1.4 is not an option at this point. We're
> too close to implement this to production. Is there a way to get the
> jsession id appened to the get urls?
>
> Thanks in advance


--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Load balancing with cookies disabled [message #718999 is a reply to message #714546] Thu, 25 August 2011 18:31 Go to previous message
Graham Missing name is currently offline Graham Missing nameFriend
Messages: 20
Registered: July 2010
Junior Member
Thanks for the response. I was able to get around the issue by having the load balancer members share the same osgi.instance.area.
Previous Topic:List/Combo item background
Next Topic:web based form and letter generator?
Goto Forum:
  


Current Time: Fri Apr 19 08:42:48 GMT 2024

Powered by FUDForum. Page generated in 0.02210 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top