Preface
Reprint please indicate the source: http://blog.csdn.net/wlwlwlwl015/article/details/48160433
For Web sites or Web applications with high traffic, high concurrency, the most common solution is to use load balancing for server clusters, such as the more popular nginx+memcache+tomcat. After the cluster, for example, we have n Tomcat, the user may visit our website the first request to distribute und
Basic Environment:redis-2.8apache-tomcat-6.0.41nginx1.6.21.redis configuration 1.1 Configuring the Redis access passwordFind the redis.conf in the Redis directory and unpack the Requirepass comment (this property is used to set the password).Such as:Requirepass Root1.2 Starting RedisStart Redis in a way that Redis's directory is runningRedis-server/root/redis-2.8.9/redis.conf 2,tomcat ready to work 2.1 prep
to the/usr/local/lnmp/tomcat/lib/directory to support Java language compilation.# mv Asm-3.2.jar Minlog-1.2.jar Memcached-session-manager-tc7-1.6.3.jar Kryo-1.04.jar Reflectasm-1.01.jar Kryo-serializers-0.10.jar Msm-kryo-serializer-1.6.3.jar Memcached-session-manager-1.6.3.jar spymemcached-2.7.3.jar/usr/local/tomcat/l
://localhost:8443, the server sends a digital certificate (public key) to the browser to encrypt the data that needs to be sent, but this digital certificateis generated by the Sun Company Command, and is not registered with the CA, so the browser will have the following prompt:Continue to install the certificate here.5: Install digital certificateClick Continue to browse the siteThen always "next" until the "import certificate" finishes and the installation succeeds.Close the browser and open t
Basic Environment:redis-2.8apache-tomcat-6.0.41nginx1.6.21,redis configuration 1, configuring the Redis access passwordFind the redis.conf in the Redis directory and unpack the Requirepass comment (this property is used to set the password).Such as:Requirepass Root2, Start RedisStart Redis in a way that Redis's directory is runningRedis-server/root/redis-2.8.9/redis.conf 2,tomcat Preparing for Work 1, prepa
The biggest difference between a session and a cookie is: 1. Save in different locationsThe session is stored in the server's memory, and the cookie is stored in the browser or client file;2. Different life cycleSession is an access-based process that records the start-to-finish of an access, when the browser or process is closed, the session "disappears", and t
This article mainly describes the Nginx load Scheduler + dual Tomcat load and session sharing +mysql back-end database, has a certain reference value, now share to everyone, the need for friends can refer to
Nginx Load Scheduler + dual Tomcat load and session replication +mysql backend database
Environment:
View the console# tail-f Catalina.outScript Execution Permissionschmod u+x *.sh#看是否已经有tomcat在运行了Ps-ef |grep Tomcat#如果有, use kill;Kill-9 pid #pid for the corresponding process numberFor example Ps-ef |grep tomcat output is as followsSun 5144 1 0 10:21 pts/1 00:00:06/java/jdk/bin/java-djava.util.logging.manager=org.apache.juli.classloaderlogmanager -djava.endorsed.
A Tomcat profile:Tomcat server is a free development of the source code of the Web application server, is a lightweight application server, in small and medium-sized systems and concurrent access users are not widely used, is the first choice to develop and debug JSP programs. The main application scenario is to parse the dynamic program code (JAVA) JSP program to handle the Tomcat interfaceInstallation of
browser, destroy the session with Session.invalidate (), Session expirationManage session ExpirationThe session expires 30 minutes by default.1 Setting the expiration time in seconds by using a function methodSession.setmaxinactiveinterval (60); // Unit is Seconds2 Configuring Web. XML, in minutes
In the distributed multi-tomcat Web cluster environment, the first thing to solve is the session sharing problem, the general implementation ideas are:(1) Session replication: Session synchronization between multiple Tomcat, Tomcat
Comparison of the advantages and disadvantages between Apache and Nginx nginxtomcat cluster 1 jdktomcat installation 2 Boot Nginx 3 Modify Tomcat configuration tomcat61 Configuration 4 configuration conf nginxconf 5 test Nginx Configuration and restart 6 test load 61 Access Http127001test 62 If the Tomcat serverxml inside the context path is direct access to http127001 Serverxml context W Orkdir Apachetomca
Because of the need for work, I need to do an Apache load-balanced HTTP request on this machine, to the Tomcat cluster processing, and the session will be replicated on different Tomcat demo. The process is posted as follows:
Http://wenku.baidu.com/link?url=1Wy1oeJDLaBxnSTPLH0NPyYy0EGP1JokrYQfQhFj_ Uot4dhyh8kg-q3n1tzhemu8otihuk5jprtopxhaau9fd1q9swft-mhmm73n3uez9k
Nginx-tomcatLoad Balancingredis-sessionshared, static resource separationBasic Environment:redis-2.8apache-tomcat-6.0.41nginx1.6.21,RedisConfiguration1, configureRedisAccess PasswordFind the redis.conf in the redis directory and unpack the requirepass Comment (this property is used to set the password). Such as:Requirepass Root2, startRedisStart Redis in a way that Redis 's directory is runningRedis-server/root/redis-2.8.9/redis.conf 2,Tomcatpreparato
: This article mainly introduces Tomcat cluster and Session sharing + Nginx load. For more information about PHP tutorials, see. Although I have done it before, I often forget it. I will record it for future reference.
Related information:
Linux Tomcat running environment to build see another blog: http://blog.csdn.net/xiadi934/article/details/50911175
Tomcat7.0
I. Node information 192.168.1.133Nginx192.168.211.133|----------------------------------| |Tomcata (211.40) TOMCATB (211.132)Memcachea (211.136) Memcachb (211.137)Configure fixed IPTurn off SELinuxTurn off iptables, boot does not startTwo. Principlethrough Nginx proxy access back end Tomcat , and achieve memcache the same browser as the one accessed by the Session is the same.Three. DeploymentInstallation o
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.