sticky session with apache web server and tomcat servers

前端 未结 6 558
我在风中等你
我在风中等你 2021-02-01 21:33

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

6条回答
  •  离开以前
    2021-02-01 22:10

    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.

提交回复
热议问题