Questions about session sessions in Apache load balancing

Source: Internet
Author: User
Tags http redirect sessions tomcat server

Here are the configuration for Apache load balancer and reverse proxy

<VirtualHost *:90>    #虚拟主机默认访问端口     ServerAdmin *     ServerName astg.vj.com   #服务器访问名            ServerAlias *.astg.vj.com  #服务器访问别名     proxyrequests off#        <IfModule mod_rewrite.c>#                RewriteEngine on#                rewritecond %{http_host} ^astg.vj\ .com$ [nc]#                rewriterule ^ (. *) $ http://astg.vj.com$1 [r=301,l]#        </IfModule>                  #wallet-vhr         <proxy balancer://wallet_vhr>                 balancermember http:// 192.168.10.18:60210/wallet-vhr loadfactor=1 route=s02  #loadfactor   Weights  route  Server Authentication Identification                  balancermember http://192.168.10.17:60210/wallet-vhr loadfactor=1 route=s01 #         </proxy>                     proxypass /wallet-vhr balancer://wallet_ vhr/ stickysession=jsessionid|jsessionid scolonpathdelim=on  #将远程服务器映射到本地服务器的URL空间   Keep Sticky session                    # stickysession=jsessionid|jsessionid scolonpathdelim=on                     proxypassreverse /wallet-vhr balancer://wallet_vhr/ # It is generally used in conjunction with the PROXYPASS directive, which enables Apache to adjust the URL of the Location, content-location, uri header in an HTTP redirect reply. This avoids the use of Apache as a reverse proxy. HTTP redirection of the backend server caused the problem of bypassing the reverse proxy.            #wallet-VHR

Choose Apache HTTP Server as the front-end load server, the backend select two tomcat for the cluster, this choice is configured in session Sticky (sticky session), this way to forward the same user's request to a specific Tomcat server, Avoid the replication of the session in the cluster, the disadvantage is that the user only with one of a server communication, if this server down, it is obsolete.


There is also a session mode is multiple server sharing mode, there is no more to say

This article is from the "Cubs blog" blog, make sure to keep this source http://9821177.blog.51cto.com/9811177/1788569

Questions about session sessions in Apache load balancing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.