I have configured apache2.4 http load balancer as :
ProxyPass /nuxeo balancer://sticky-balancer stickysession=JSESSIONID|jsessionid nofailover=On
<Proxy balancer://sticky-balancer >
BalancerMember xxxxxxx.40:8080/nuxeo route=nxworker1
BalancerMember xxxxxxx.41:8080/nuxeo route=nxworker2
</Proxy >
ProxyPreserveHost On
On nuxeo instances I have done config as suggested on nuxeo docs at 40:
nuxeo.server.jvmRoute=nxworker1 and nuxeo.server.jvmRoute=nxworker2 at 41
When one of instances goes down for ex 40, during a user is connected and working on it, it needed to do login again because session seems is not replicated for node 41
Have any body any suggestion?
Thanks
That is expected: the session is sticky, not replicated. As stated in the documentation, you will have to authenticate again or not, depending on your configuration and architecture:
The Nuxeo Platform requires all calls to be authenticated. Depending on your architecture, authentication can be stateless (ex: Basic Auth) or stateful (ex: Form + Cookie). Either way, you probably don't want to replay authentication during all calls.
That's why having a session based authentication + session affinity can make sense: you don't have to re-authenticate each time you call the server.
If the session affinity can not be restored, for example because the target server has been shutdown:
- stateless authentication will be automatically replayed (ex: Basic Auth)
- for stateful authentication:
- if you have a SSO this will be transparent
- if you don't have a SSO, user will have to authenticate again.