You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Shrikant Patel <SP...@pdxinc.com> on 2017/09/07 17:12:21 UTC

Design question on the Ignite Web Session Clustering.

Hi All,

I have design question about Ignite web session clustering.


I have springboot app with UI. It clustered app ie multiple instance of springboot app behind the load balancer. I am using org.apache.ignite.cache.websession.WebSessionFilter()to intercept request and create\manage session for any incoming request.



I have 2 option



1.      Embed the ignite node inside springboot app. So have these embedded ignite node (on each springboot JVM) be part of cluster. This way request session is replicated across the entire springboot cluster. On load balancer I don't have to maintain the sticky connection. The request can go to any app in round robin or least load algorithm.



Few considerations

a.      Architect is simple. I don't have worry about the cache being down etc.

b.      Now the cache being embedded, its using CPU and memory from app jvm. It has potential of starving my app of resources.



2.      Have ignite cluster running outside of app JVM. So now I run client node in springboot app and connect to main ignite cluster.



Few considerations



a.      For any reason, if the client node cannot connect to main ignite cluster. Do I have to manage the session manually and then push those session manually at later point to the ignite cluster??

b.      If I manage session locally I will need to have sticky connection on the load balancer. Which I want to avoid if possible.

     *   I am leaning to approach 2, but want to make it simple. So if client node cannot create session (override org.apache.ignite.cache.websession.WebSessionFilter()) it redirects user to page indicating the app is down or to another app node in the cluster.


Are there any other design approach I can take?
Am I overlooking anything in either approach?

If you have dealt with it, please share your thoughts.

Thanks in advance.
Shri

This e-mail and its contents (to include attachments) are the property of National Health Systems, Inc., its subsidiaries and affiliates, including but not limited to Rx.com Community Healthcare Network, Inc. and its subsidiaries, and may contain confidential and proprietary or privileged information. If you are not the intended recipient of this e-mail, you are hereby notified that any unauthorized disclosure, copying, or distribution of this e-mail or of its attachments, or the taking of any unauthorized action based on information contained herein is strictly prohibited. Unauthorized use of information contained herein may subject you to civil and criminal prosecution and penalties. If you are not the intended recipient, please immediately notify the sender by telephone at 800-433-5719 or return e-mail and permanently delete the original e-mail.

Re: Design question on the Ignite Web Session Clustering.

Posted by Michael Cherkasov <mi...@gmail.com>.
Hi,

I answered in SO, I copy it here:
"""
if you have a local cache for sessions and sticky sessions why do you need
to use ignite at all?

However, It's better to go with ignite, your app will have HA, if some node
is failed, the whole app still will work fine. I agree you should split app
cluster and ignite cluster, however, I think you shouldn't care about
connection problem about the server and client. This kind of problems
should lead to 500 error, would you emulate main storage if you DB go down
or you can't connect to it?
"""
Thanks,
Mikhail.

2017-09-07 20:12 GMT+03:00 Shrikant Patel <SP...@pdxinc.com>:

> Hi All,
>
>
>
> I have design question about Ignite web session clustering.
>
>
>
> I have springboot app with UI. It clustered app ie multiple instance of springboot app behind the load balancer. I am using org.apache.ignite.cache.websession.WebSessionFilter()to intercept request and create\manage session for any incoming request.
>
>
>
> I have 2 option
>
>
>
> 1.      Embed the ignite node inside springboot app. So have these embedded ignite node (on each springboot JVM) be part of cluster. This way request session is replicated across the entire springboot cluster. On load balancer I don’t have to maintain the sticky connection. The request can go to any app in round robin or least load algorithm.
>
>
>
> Few considerations
>
> a.      Architect is simple. I don’t have worry about the cache being down etc.
>
> b.      Now the cache being embedded, its using CPU and memory from app jvm. It has potential of starving my app of resources.
>
>
>
> 2.      Have ignite cluster running outside of app JVM. So now I run client node in springboot app and connect to main ignite cluster.
>
>
>
> Few considerations
>
>
>
> a.      For any reason, if the client node cannot connect to main ignite cluster. Do I have to manage the session manually and then push those session manually at later point to the ignite cluster??
>
> b.      If I manage session locally I will need to have sticky connection on the load balancer. Which I want to avoid if possible.
>
>
>    1. I am leaning to approach 2, but want to make it simple. So if
>       client node cannot create session (override org.apache.ignite.cache.websession.WebSessionFilter())
>       it redirects user to page indicating the app is down or to another app node
>       in the cluster.
>
>
>
>
>
> Are there any other design approach I can take?
>
> Am I overlooking anything in either approach?
>
>
>
> If you have dealt with it, please share your thoughts.
>
>
>
> Thanks in advance.
>
> Shri
>
>
> This e-mail and its contents (to include attachments) are the property of
> National Health Systems, Inc., its subsidiaries and affiliates, including
> but not limited to Rx.com Community Healthcare Network, Inc. and its
> subsidiaries, and may contain confidential and proprietary or privileged
> information. If you are not the intended recipient of this e-mail, you are
> hereby notified that any unauthorized disclosure, copying, or distribution
> of this e-mail or of its attachments, or the taking of any unauthorized
> action based on information contained herein is strictly prohibited.
> Unauthorized use of information contained herein may subject you to civil
> and criminal prosecution and penalties. If you are not the intended
> recipient, please immediately notify the sender by telephone at
> 800-433-5719 or return e-mail and permanently delete the original e-mail.
>

Re: Design question on the Ignite Web Session Clustering.

Posted by Alison Mullan <al...@gridgain.com>.
Hi Shri,

The very best way to get answers and advice on these kinds of questions is
to use the Apache Ignite Forum.
It is a very lively community and very supportive - register here
https://ignite.apache.org/

Let me know how you get on and if/when you would like to discuss
deployment/pricing/support issues for your end-users.
Best regards
Ali

On Thu, Sep 7, 2017 at 6:12 PM, Shrikant Patel <SP...@pdxinc.com> wrote:

> Hi All,
>
>
>
> I have design question about Ignite web session clustering.
>
>
>
> I have springboot app with UI. It clustered app ie multiple instance of springboot app behind the load balancer. I am using org.apache.ignite.cache.websession.WebSessionFilter()to intercept request and create\manage session for any incoming request.
>
>
>
> I have 2 option
>
>
>
> 1.      Embed the ignite node inside springboot app. So have these embedded ignite node (on each springboot JVM) be part of cluster. This way request session is replicated across the entire springboot cluster. On load balancer I don’t have to maintain the sticky connection. The request can go to any app in round robin or least load algorithm.
>
>
>
> Few considerations
>
> a.      Architect is simple. I don’t have worry about the cache being down etc.
>
> b.      Now the cache being embedded, its using CPU and memory from app jvm. It has potential of starving my app of resources.
>
>
>
> 2.      Have ignite cluster running outside of app JVM. So now I run client node in springboot app and connect to main ignite cluster.
>
>
>
> Few considerations
>
>
>
> a.      For any reason, if the client node cannot connect to main ignite cluster. Do I have to manage the session manually and then push those session manually at later point to the ignite cluster??
>
> b.      If I manage session locally I will need to have sticky connection on the load balancer. Which I want to avoid if possible.
>
>
>    1. I am leaning to approach 2, but want to make it simple. So if
>       client node cannot create session (override org.apache.ignite.cache.websession.WebSessionFilter())
>       it redirects user to page indicating the app is down or to another app node
>       in the cluster.
>
>
>
>
>
> Are there any other design approach I can take?
>
> Am I overlooking anything in either approach?
>
>
>
> If you have dealt with it, please share your thoughts.
>
>
>
> Thanks in advance.
>
> Shri
>
>
> This e-mail and its contents (to include attachments) are the property of
> National Health Systems, Inc., its subsidiaries and affiliates, including
> but not limited to Rx.com Community Healthcare Network, Inc. and its
> subsidiaries, and may contain confidential and proprietary or privileged
> information. If you are not the intended recipient of this e-mail, you are
> hereby notified that any unauthorized disclosure, copying, or distribution
> of this e-mail or of its attachments, or the taking of any unauthorized
> action based on information contained herein is strictly prohibited.
> Unauthorized use of information contained herein may subject you to civil
> and criminal prosecution and penalties. If you are not the intended
> recipient, please immediately notify the sender by telephone at
> 800-433-5719 <(800)%20433-5719> or return e-mail and permanently delete
> the original e-mail.
>



-- 
*Alison Mullan*
Business Development EMEA
GridGain systems
alison.mullan@gridgain.com
Phone: +44 7903 365482
www.gridgain.com