How can I "sticky" load balance Rhconnect connections

J John Hadfield 3 years 6 months ago
4 2 0

Scenario.....

I have two primary Rhoconnect stacks installed installed at two sites.  For fail-over purposes, I have a stand-by of each rhoconnect stack at its opposite site.

Site A
Site B

Primary App Server A
Primary App Server B

Primary REDIS A
Primary REDIS B

Standby App server B
Standby App Server A

Slave REDIS B
Slave REDIS A

In addition to needing to promote the Slave instances of REDIS to masters, we are wanting to use a load balancer to fail-over the application servers to their stand-by.

The other issue is that I want to be able to use load balancing to route a user to either app server A or app server B in a sticky (but not permanent) fashion.

I was looking at allowing my load balancer using the rhoconnect_session cookie value to do this.  It seems to be sent with every call following the login.  The problem I have is that if the user logs out and back in, the session cookie does not seem to be sent along with the (second) login.  This in itself isn't hugely surprising, but what is odd is that the response to that second log in includes the rhoconnect_session id that was used previously.  I can't understand how it can do that - the only thing I think it could've used to identify me was my userid - which might be shared over devices (might it not?).

Anyway if anyone can explain to me how this works or how they've achieved a similar load balanced scenario (not sharing a REDIS instance), I'd be most grateful.

Many thanks

John

Please Register or Login to post a reply

2 Replies

M Mark Mayer

Moto, can you give some insight to setting up a clustered environment?  I'd like to see a write up of utilizing Sentinel for the Redis promotions / fail over along with using sticky cookie or something that will remember sessions other than an "ip_hash" config in Nginx.

Mark

K Kutir Mobility

Hi John
Just a quick shot.. Did you had chance to check this Rhomobile | Deploying RhoConnect with High Availability on Amazon Web Services ?
Thank you.
Kutir Mobility

CONTACT
Can’t find what you’re looking for?