RAP sticky session and High-availability clusters [message #1792429] |
Tue, 17 July 2018 18:03 |
Chao Shen 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 #1792515 is a reply to message #1792514] |
Wed, 18 July 2018 20:38 |
Chao Shen 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 #1792523 is a reply to message #1792522] |
Thu, 19 July 2018 04:47 |
Chao Shen 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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03203 seconds