I am using apache web server as a load balancer for two tomcat instances behind apache. When the first request goes to node A and second request from the same client goes to no
For apache httpd to keep your sessions tied to the same backend, it needs to know which cookie keeps the session ID. For java, this is (usually) JSESSIONID.
If you're using the ProxyPass
directive, use
ProxyPass /example http://backend.example.com stickysession=JSESSIONID
To be found in the excellent apache httpd documentation.