Load Balancing
In a high-load system, a single server generally fails to meet the requirements. In this case, the session status issue needs to be solved when multiple servers are distributed to the Server Load balancer.
The following are some references:
SessionstateConfigurationHttp://blog.csdn.net/nihongyuan/ar
busy servers. # Upstream app1 {# least_conn; # server 192.168.14.132: 8080; # server 192.168.14.timeout: 80 ;#}# [configuration 4] # session persistence configuration, using ip-hash, the IP address of the client is used as the hash key # To determine which server in the server group should be selected for the client request. # This method ensures that requests from the same client are always directed to the same server unless the server is unavailable. # Upstream app1 {# ip_hash; # server 192.1
Original http://nginx.org/en/docs/http/load_balancing.html
This article is translated according to your own understanding
Load Balancing among multiple applications is a commonly used technology to improve resource utilization, increase server throughput, reduce latency, and ensure application fault tolerance. Nginx can serve as an efficient HTTP
: 192.168.207.131 port 8080
2. customize the nginx configuration file
Operate on 192.168.207.130 and 192.168.207.131
[Plain] view plaincopy
Useradd nginx
Vi/usr/local/nginx/conf/nginx. conf
The content is as follows:
[Plain] view plaincopy
# Running user
User
Nginx + keepalived for dual-machine hot standby and tomcat Load Balancing
Environment Description:
nginx1:192.168.2.47nginx2:192.168.2.48tomcat1:192.168.2.49tomcat2:192.168.2.50vip:192.168.2.51
I. nginx Configuration1. Install the PCRE Library required by nginxWget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
requires two features, the first being high performance, and the second being highly available.1. Test High PerformanceWhen the client uses the browser to open http://172.16.10.30/test.html, the browser displays information:Refresh and display the message:You can see that the cluster's load-balancing schedule takes effect to meet the high-performance requirements of the cluster.2. Test High AvailabilityDea
/{# root HTML; # index index.html index.htm; # } #}}Second, set up the Tomcat cluster session sharing1.Modify the Conf/server.xml port in three tomcat directoriesand Tomcat 123 for JVM 123, respectively.2.Launched Tomcat 123 and Nginx, respectively, to access the IP:80 entry project is successfulSession whether the shared Success Test JSP page code is: Refresh session unchanged description success.@ Page ContentType="text/html; CHARSET=GBK" %
Nginx ("Engine X") is a high-performance HTTP and reverse proxy server, also a IMAP/POP3/SMTP proxy server. Nginx was developed by Igor Sysoev, the second-most visited rambler.ru site in Russia, which has already run more than 2.5 of the site. Igor release the source code in the form of a BSD-like license. Although still beta, Nginx has been known for its stabili
not respond, and the DNS cache time is longer, even if the removal of DNS server resolution does not take effect immediately, another problem load imbalance, because it does not reflect the health and performance of the individual servers, At the same time, the DNS cache causes the parsing to be on the same server. 2.3 Four/seven-layer load balancing This 47 lay
Understanding of Nginx Load BalancingNginx is a lightweight, high-performance webserver, he can mainly do the following two things:
As an HTTP server (as with Apache)
Load balancing as a reverse proxy server
Now Nginx everywhere can be seen, often see the p
=" Wkiol1fzmjuqip-taabfmvcs1yw809.png-wh_50 "/>Modify configuration file: /usr/local/lnmp/nginx/conf/nginx.conf server{} is a virtual host650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/87/45/wKiom1fZMNjQBi46AACgt_HUy4U447.png-wh_500x0-wm_3 -wmp_4-s_3359430874.png "title=" image 9.png "alt=" Wkiom1fzmnjqbi46aacgt_huy4u447.png-wh_50 "/> enter directive make Cert.pem ( the CA Certificate you want to generate ) under/etc/pki/tls/certs/ Enter
First, the toolnginx-1.8.0apache-tomcat-6.0.33II. ObjectivesA tomcat cluster for high-performance load balancing: Third, step1, first download nginx, to download stable version: 2. Then extract two tomcat, named Apache-tomcat-6.0.33-1 and Apache-tomcat-6.0.33-2, respectively: 3. Then modify the two Tomcat boot ports, 18080 and 28080, respectively, to change th
5 scheduling algorithms for Nginx load balancing:1) Polling (default): Each request according to the order of request to a different back-end server, if the back end of a server down, nginx because it has a back-end health check function, so can automatically eliminate;2) Weight: Weighted polling, weight is proportiona
Nginx load balancing, multi-site sharing Session
Common practices for sharing sessions with multiple sites are as follows:
Use. net Automatic Status Service (Asp.net State Service );
Use the. net Session database;
Use Memcached.
Use cookies to share multiple sites (this method is only applicable when multiple sites are under the same domain name );
Here we
Deploy a robust high-availability layer-7 Load Balancing solution based on keepalived + nginx 20151214
High Availability is a common topic. Open-source high availability software has been developed quite well. Previously, it has done lvs + heartbeat 4-layer LB In debian, it has been very stable (unfortunately, the traffic is not large). Now, due to business needs
Nginx load balancing,Test Environment
In this test, the host directly specifies the domain name, and then three CentOS instances are installed on the virtual machine.
Test Domain Name: a.com
Server a ip Address: 192.168.0.108 (master)
Server B IP Address: 192.168.0.27
IP address of the C server: 192.168.0.131
Deployment ideasServer A serves as the master server,
Centos6.2 do the Nginx and Tomcat the integration and load balancing---------------------------------------------------------JDK------------------------------------------------------------- ------1 : CentOS Install JDK6 onJDK:Jdk-6u34-linux-i586.bin installation command:./jdk-1_5_0_06-linux-i586.binThe configuration environment variables are as follows :Open/etc/
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.