Cluster InstanceID vs JsessionID (load balancer issues)

Posted on

Hi guys,

I´m having a lot of problems since switch from standalone mode to standalone-full-ha mode with the load balancer (it´s a HW out of the jboss configuration).

My app needs that load balancer have set configured by cookie persistence based on JSESSIONID as we have been working from since about 20 years in that way!

So, now we move to a cluster configuration on JBoss 7.2, and we are having troubles with how JSESSIONID travels on http headers.It´s have been passed from JSESSIONID value only, to JSESSIONID.NODE.

My app, uses the browser to mainly most requests from client, but sometimes uses little jnlp apps that uses JSESSIONID value from the HttpSession class to make request to my app, and here is the problem.

  1. Browser request to Jboss and JSESSIONID and JBoss send an InstanceID on headers (JSESSIONID.NODE) --> To the balancer JSESSIONID=JSESSIONID.NODE

  2. A jnlp request a JSESSIONID from HttpSession object (HttpSession.getID function) and gets only JSESSIONID --> To the balancer this is a totally diferent from previous value and his behavior is manage it like a new request.

So the result is that I could have from same client a request from browser on node 1 and a request from jnlp program on node 2, and this is not correct, because they must be use only JSESSIONID value and not JSESSIONID.NODE.

Any Ideas to solve?

When one node left the cluster and the next request from client must be resolved by a new one node ¿How this node asks to the cluster for the serialized objects? It´s ask for JSESSIONID or JSESSIONID.NODE?

Thanks in advance!

Regards!

Responses