display, which means that Nginx has loaded two tomcat, The request can be forwarded to a different tomcat.6. Now we're going to solve the session problem.The following jar packages need to be placed in the Tomcat Lib fileThese jar packages I have uploaded,: Http://files.cnblogs.com/mouseIT/nginx%2Cmemcached%EF%BC%8Ctomcat%E9%9B%86%E7%BE%A4%E7%9A%84jar%E5%8C%85.rarThen add the following data in Tomcat's con
A Brief introductionOur system often to save user login information, there areCookiesand theSessionmechanism toCookiesthe client saves the user information,SessionSave user information on the server, if the browser does not supportCookiesor the userCookiesIt's forbidden,CookiesIt's not going to work, there are different browsers that don't saveCookies,so we useSessionService side to save, the previous section we have introducedTomcatcluster deployment, how to cluster theTomcatall requests to the
Iv. Environmental testing of Memcache
Run the following PHP file, if the output is a test!, it means that the environment has been built successfully. Start your memcache journey!
Copy Code code as follows:
$mem = new Memcache;
$mem->connect ("202.207.177.177", 11211);
$mem->set (' key ', ' This is a test! ', 0, 60);
$val = $mem->get (' key ');
Echo $val;
?>
The famous phpcms also supports memcached extensi
System Implementation Documentationnginx+tomcat+memcached Cluster Configuration BrochuresDirectoryThe 1th chapter outlines 1.1 goalsThe rapid development of the Internet has brought high load and high availability of the Internet system, which requires us to design the system architecture with a lot of high-performance products, this article mainly describes the Internet architecture in the Portal application cluster configuration work, and ultimately
1 causeRecently, a stress test was conducted on the newly developed web system, and it was found that the response speed of concurrent logon home pages under tomcat's default configuration pressure to 600 people was severely affected, more than 2000 errors of 500 and 502 occur in one round. I made a look at the logon time statistics and printed out the total server processing time. I saw that some responses were indeed within 20 seconds, however, the average time is far from the lr test. Therefo
capability. First, increase the number of tomcat threads to 1000, and find that the number of errors 500 and 502 has dropped to dozens, but the response time has not improved yet. Later, two tomcat servers were started, and nginx was used for load balancing. the response time dropped by 40%. the processing duration of the two tomcat servers was kept at about 1 second.It seems that tomcat performance is indeed a bottleneck of the system. it is necessa
Introduction: This is a detailed page for compiling and installing nginx, PHP 11.04, MySQL, MongoDB, memcached, SSL, and SMTP in Ubuntu 5.3. It introduces the knowledge, skills, and experience related to PhP, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 339660 'rolling = 'no'>Manually compile and install
server IP under WCF. Such as At present, the socket server, or a server, if the merchant and the distribution staff reached a certain amount, a single server is unable to support, I think the next step is to consider the socket load balancing things, if any friends understand, also please enlighten under ha.ConclusionI was the first to deploy, before this is really not sure whether I can complete the matter, halfway also want to give up (nothing is difficult, as long as willing to give up),
. 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/ me
Test environment:
Test client A:HP dl380g4,2 dual-core CPU,4G ram,2 Block 10k RPM SAS disk for RAID 1,EXT3
Nginx Server B:dell r710,e5620 * 2,32g ram,6 block disk 15K RPM SAS disk RAID 1+0,XFS
memcached Server C:dell r710,e5620 * 2,32g ram,6 block disk 15K RPM SAS disk RAID 5,EXT4
Nginx setting: KeepAlive 8192
PHP fpm Settings: List
Architecture ( a total of 3 hosts, with the Nginx host running 2 memcached instances, the ports are 11211,11212 )650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/7F/17/wKiom1cTNb7T2e_eAABhFO3HtQQ489.jpg "title=" ng.jpg "alt=" Wkiom1ctnb7t2e_eaabhfo3htqq489.jpg "/>Environment Configuration Description:Software: Centos6.7,tomcat8.0,memcached1.4.4,nginx1.4.7,jdk-8u65-linux-x64, to achieve the Msm+kry
Test environment:
Test client A:HP dl380g4,2 dual-core CPU,4G ram,2 Block 10k RPM SAS disk for RAID 1,EXT3
Nginx Server B:dell r710,e5620 * 2,32g ram,6 block disk 15K RPM SAS disk do raid 1+0,XFS
memcached Server C:dell r710,e5620 * 2,32g ram,6 block disk 15K RPM SAS disk do raid 5,EXT4
Nginx setting: KeepAlive 8192
PHP fpm Settings: listen.backlog =-1
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 in the cluster stores the same session information(2) Shared session storage: The session is stored centrally in the same place, such as redis/memcached, or even db. The session is not stored in Tomcat's own memory(3) sessi
, increase the number of tomcat threads to 1000, and find that the number of errors 500 and 502 has dropped to dozens, but the response time has not improved yet. Later, two tomcat servers were started, and nginx was used for load balancing. the response time dropped by 40%. the processing duration of the two tomcat servers was kept at about 1 second.It seems that tomcat performance is indeed a bottleneck of the system. it is necessary to assume that
1 causeRecently, a stress test was conducted on the newly developed web system, and it was found that the response speed of concurrent logon home pages under tomcat's default configuration pressure to 600 people was severely affected, more than 2000 errors of 500 and 502 occur in one round. I made a look at the logon time statistics and printed out the total server processing time. I saw that some responses were indeed within 20 seconds, however, the average time is far different from that teste
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.