Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP sticky session and High-availability clusters (RAP sticky session and High-availability clusters )
RAP sticky session and High-availability clusters [message #1792429] Tue, 17 July 2018 18:03 Go to next message
Chao Shen is currently offline Chao ShenFriend
Messages: 3
Registered: July 2018
Junior Member
Hello, we are trying to figure out how to use /config the high availability cluster for our RAP application.

From this https://wiki.eclipse.org/RAP/RWT_Cluster page, it says:
"One thing to mind though when setting up a load balancer for RAP applications is that it must be configured to use sticky sessions (aka session affinity). This entails that once a session is started, the same server serves all subsequent requests for that session. "

It also says:
"A high availability cluster operates by having redundant nodes. So that if one node crashes, the service as a whole is unaffected as other nodes take over the work."

I am a little confused by the above 2 statements.

E.g. for this workflow: get into a entry point, click a search button to search the person, change the person name, click update button to update the person.
When the update button is clicked, it has to have the person model, otherwise, it won't know what to update.
So it makes sense to set up sticky session so that the subsequent code need to hit the same node.

But we are confused about how the high availability cluster can work.
E.g. If the person data model is created in the JVM of node1 of a cluster, if something broken, and node 1 is down, then the node2 takes over the work. How does the node2 get the data in node1?
Do we need to serialize all our data model and other service side states and store in the session/cookies in order to use the high availability cluster?

Thanks,
Chao
Re: RAP sticky session and High-availability clusters [message #1792514 is a reply to message #1792429] Wed, 18 July 2018 20:32 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
If you have a high availability cluster, the cluster should already be replicating the sessions between nodes.

If you want to be able to replicate sessions, you'll need to use JEE mode, as SWT Compatibility mode has a dedicated thread per session, and threads can't be shared between JVM's.
Re: RAP sticky session and High-availability clusters [message #1792515 is a reply to message #1792514] Wed, 18 July 2018 20:38 Go to previous messageGo to next message
Chao Shen is currently offline Chao ShenFriend
Messages: 3
Registered: July 2018
Junior Member
Thanks for your reply.

We are trying to figure out how to change to JEE mode.

Maybe the question is stupid, but in JEE mode, do we still need to config sticky session?

If all nodes know each other's state, when why RAP says: "it must be configured to use sticky sessions (aka session affinity)"? I think it shouldn't matter which node the request goes to since all the nodes holding the same state.

Is this statement incorrect?
Or Is it necessary due to some stability or performance concern?
Or the to config the HA cluster, sticky session is necessary somehow?

[Updated on: Wed, 18 July 2018 22:07]

Report message to a moderator

Re: RAP sticky session and High-availability clusters [message #1792522 is a reply to message #1792515] Thu, 19 July 2018 03:53 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
In JEE mode you can't use the Workbench or some SWT API's as the threading model is different
https://www.eclipse.org/rap/developers-guide/devguide.php?topic=application-setup.html
Re: RAP sticky session and High-availability clusters [message #1792523 is a reply to message #1792522] Thu, 19 July 2018 04:47 Go to previous messageGo to next message
Chao Shen is currently offline Chao ShenFriend
Messages: 3
Registered: July 2018
Junior Member
Thanks for the reply. Yes, we figured that out. And in our testing app, we already removed Workbench and removed all the blocking calls. And it is running in JEE mode now. We have not put it into a HA cluster yet. That is probably what our team will need to discuss and test later.

Just right now, without sticky session and HA cluster, it seems we will loose the person object when hitting another JVM.

Our service team has special requirement to not use sticky session. This requirement totally againsts the very first paragraph of the eclipse RAP/RWT cluster reference page.
https://wiki.eclipse.org/RAP/RWT_Cluster

But from we found on line and your previous reply, it seems all the nodes in a HA cluster share the same states. If that is the case, I feel it may work without sticky session.

But we are not sure why the above reference page says RAP needs sticky session for load balancing. It does not mention what mode. And later in page, it mentions it suggests to use JEE mode. So we assume the sticky session is also needed for JEE mode.

So we just want to confirm whether we understand it correctly or not. And if it could work without sticky session, is there any downside of not setting the sticky session when run in a HA cluster?
I feel it may impact the performance since it may take node2 some time to pick up the node1's person object in the shared storage, but I am not sure at this point.

We really appreciate if anybody can share the experience of running RWT standalone JEE mode in a HA cluster with/without sticky session!

Thanks.
Re: RAP sticky session and High-availability clusters [message #1792595 is a reply to message #1792523] Fri, 20 July 2018 03:43 Go to previous message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
Have a read of the 4th paragraph of that page
Additionally near the end is a section on clustering: https://wiki.eclipse.org/RAP/RWT_Cluster#How_to_setup_RWT_in_a_cluster
Previous Topic:Is it possible to override ClientResources by Theming?
Next Topic:Unresolved requirements issue since upgrade to RAP 3.5
Goto Forum:
  


Current Time: Sat Apr 20 04:00:05 GMT 2024

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

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

Back to the top