. Installation of MSMC1 and c2 to download the jar packages required by MSM[[emailprotected]~]#wgethttp://repo1.maven.org/maven2/de/javakaffee/msm/ Memcached-session-manager/1.9.4/memcached-session-manager-1.9.4.jar[[emailprotected]~]#wget http://repo1.maven.org/maven2/de/javakaffee/msm/memcached-session-manager-tc8/1.9.4/ memcached-
There are many ways to share the session, for the technical implementation of the Web application cluster, the biggest difficulty is how to maintain the consistency of data between multiple nodes in the cluster, session sessions are the most important piece of these data, there are basically two ways to achieve this:One is to put all the session data into a serve
. Of course, you will soon think, how do customers change this information? We also have measures to stamp each deposit/withdrawal record behind. No stamp is counterfeit information. But if the customer is really going to forge, of course the seal can also be forged. ------------- This way is to keep the state on the client .
How to use a bank card
using a bank card, issued to each bank User a bank card, the bank card has a unique card number, no other information, when the custom
In the Tomcat5.5 version, if the user role is not configured, the Administration page is [Url]http://localhost:port/manager/html[/url] and [url]http:// Localhost:8080/admin[/url] will not be able to log in because of a user name and password error. Although we see the correct username and password in the Tomcat-users.xml file in the Tomcat installation directory, we still cannot log in. The reason is the co
using Redis to store the session of the Tomcat cluster
Some time ago, I spent a lot of time looking for a way to push the newly developed code to the production system to be able to 0 downtime, and 0 impact on the use of users.
My idea is to use the cluster to fix it by notifying the load balancing Nginx, removing the Tomcat nodes from the cluster, and then upg
for the file configuration to be modified by the cluster1. Modify the Conf/server.xml configuration fileA. Locate the engine tag and add the attribute jvmroute= "Worker1"B. Locate the cluster tag, remove the comment, and modify the tcplistenaddress to native IP 172.23.254.2 (Note: This section of cluster must be placed inside the hosts)2. Modify the application's Web. xmlModify the Web. xml file in the Web-inf directory, add tagsJust add it to This is to join the
The first two need to use memcached or Redis storage session, the last one to use terracotta server sharing. Redis is recommended, not only because it can persist cached content, but also because it supports a larger single object and has a rich data type, not just a cache session, but also other uses that can be used for a few clicks.1, using the filter method to store this method is recommended, because i
Using session management to resolve session loss issues steps1. Enter the command in CMDCD C:\Windows\Microsoft.NET\Framework\v4. 0.30319Re-executeSyntax: aspnet_regsql.exe-s server ip-u Database login-p database password-D to put the database-ssadd-sstype CExample: Aspnet_regsql.exe-s localhost-u sa-p 123456-d zsz-ssadd-sstype CThe result of successful execution
The first two need to use memcached or Redis storage session, the last one to use terracotta server sharing.Redis is recommended not only because it can persist cached content, but also because it supports a larger single object and has a rich data type.Not only the cache session, but also can do other purposes, a few at a stroke.1. Use the filter method to storeThis method is recommended, because it uses a
: $ path
[[Email protected] Tomcat] # source/etc/profile. d/tomcat. Sh
[[Email protected] Tomcat] # Catalina. Sh version # view the version
[[Email protected] Tomcat] # Catalina. Sh start # Start
Modify the tomcat configuration file (A and B are the same)
Configure
Virtual Host forwarded by the master must use localhost. Otherwise, nginx cannot forward data through the Intranet IP address, but only through domain name forwarding. D. Test Open http: // ip: 8080 Page access is normal 2. Other Tomcat servers use the same configuration. 3. Create a tomcat Cluster Two machines: 172.23.254.2 172.23.254.3 The file configuration to be modified for the cluster is in th
Tomcat sharing session with Memcache is very simple, just test a jar, modify an XML file basically can. But in Windows Daoteng days without fruit, unsuccessful. The online tutorial is basically Linux, which should be used under Linux.MSM (Memcached-session-manager) supports TOMCAT6 and TOMCAT7 and uses the Value (Tomcat
Use the httpd reverse load Balancer backend Tomcat,tomcat to implement the session cluster using the own cluster service;Implementing the Environment:node1:172.18.11.111 Tomcatanode2:172.18.11.112 TOMCATBnode3:172.18.11.113 anti-generational scheduler httpd650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/82/B5/wKiom1deydWhuhoMAABcpOSvHto380.png "title="
Environmental preparedness
1, prepare a nginx server ip192.168.1.133 port 81
Installation process:
Prepare a Tomcat server, prepare the Java environment First, install JDK steps to omit
Then install 3 Tomcat server IP addresses separately: 192.168.1.143,TOMCAT1 8080 ports, tomcat2 8081 ports, TOMCAT3 8082 ports.
Apache-tomcat-7.0.64/conf/server.xml
Deep into the Tomcat source analysis session is what!
What a session is.
As we all know, the HTTP protocol itself is stateless (stateless), which is sufficient and unaffected for some simple page displays. And for the increasingly complex dynamic pages, applications, all kinds of need to login authentication scenes, it is powerless. Think of a logged in user is
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.