Description
Operating system: CentOS 5.X 64-bit
Web server: 192.168.21.127, 192.168.21.128
Sites: Bbs.111cn.net and Sns.111cn.net deployed on two Web servers
To achieve the purpose:
Add two servers (main main mode) to achieve Web server load balancing through nginx+keepalived
Architecture Planning:
The advantages of Nginx:Good performance, can load more than 10,000 of the concurrency.Many functions, in addition to load balancing, can be used as a Web server, but also through the GEO module to achieve traffic distribution.Community active, third-party patches and modules manySupport for Gzip ProxyDisadvantages:Session hold is not supported.The health check f
; # youliaoo system service address, lan address, I still use 10 machines, you can also configure other addresses in the LAN Proxy_redirect off ; Proxy_set_header Host $ Host ; Proxy_set_header x - Real - IP $ remote_addr ; Proxy_set_header x - Forwarded - For $ Proxy_add_x_forwarded_for ; } }
In this way, all requests using 10.10.10.10 will be forwarded to the system running on 10.10.10.10: 8800. Requests using www.youliaoo.com or other domain names will be forwarded to 10
The purpose of building load balancing and service discovery ServicesAs the business of the website continues to improve, the performance of individual servers becomes increasingly difficult to meet the customer's business needs, so in many cases, multiple server instances and load balancers are needed to meet business needs.Nginx What is NginxNginx is a high-per
/VI Server.xmlUnpackwars= "true" autodeploy= "true" >This line is added.See if the Tomcat page will be accessed properlyhttp://192.168.254.131:8080/Configuring Nginx and Tomcat load balancing/reverse Proxiescd/usr/local/nginx/conf/VI nginx.confUser www www;Worker_processes 4;Error_log/usr/local/
external port, the Internet user can access the service through this port, and as the software of load Balancer forwards the user's request to the backend intranet server, the intranet server returns the request response to the load balancer, The load balancer then sends the response to the user, which hides the intranet structure from the Internet user, prevent
main nginx . now Nginx can indeed load balance the backend web services, but if the Nginx service fails,the keepalived service is still running, unable to The VIP is transferred to the standby server. This can be accomplished using the following script:vim/etc/keepalived/nginx_pid.sh#!/bin/bashWhile:DoNginxpid= ' ps-c
CentOS 7 implements Multi-Tomcat Load Balancing through Nginx reverse proxy, centosnginx
System Environment: CentOS 7.3 64-bit + JDK 1.8
Software Version: Nginx 1.8.1, Tomcat 8
I have always been interested in Nginx. I have learned Nginx
Nginx instance//************ Description *************//This article is based on Nginx load balancing for multiple tomcat serversPreparation Work *************//Nginx installation package Download: http://nginx.org/en/download.htmlNginx Online Brochure: http://shouce.jb51.ne
Directly as HTTP server (in place of Apache, requires fastcgi processor support for PHP);Another feature is load balancing as a reverse proxy serverHere's an example of how to use Nginx for load balancing. Because Nginx has the ad
The commercial license version of Nginx Plus is beginning to feature TCP load balancing. Starting with Nginx version 1.7.7, it is now a commercial fee version that you want to try and apply on the website. In other words, nginx in addition to the usual HTTP
First, download NginxHttp://nginx.org/download/nginx-1.2.5.zip
Extract to C:\nginx directory
Second, on the two servers to build a website:
s1:192.168.16.35:8054
s2:192.168.16.16:8089
Second, find the directory
C:\nginx\conf\nginx.conf
Open nginx.conf
The configuration is as follows:
Copy Code code as follows:
#使用的用户和组, not specified under window
The default nginx does not support TCP load balancing, need to be patched, (connect by: Receive a connection from the client, will initiate a new connection from the local to the back-end server), the specific configuration is as follows:
I. Installation of Nginx1. Download Nginx
# wget http://nginx.org/downlo
In the article, using Nginx load Balancing to build High-performance. Netweb application One, let's have a preliminary understanding of Nginx, and we'll use the Nginx demo cluster below the Windows platform to deploy our Web applications.
First, download
Nginx This lightweight, High-performance Web server can mainly do two things:
Directly as HTTP server (instead of Apache, PHP requires fastcgi processor support);
Another function is to implement load balancing as a reverse proxy server
Here's an example of how you can use Nginx to achieve
This article is about the PHP surface test seven of the nginx load balance How to configure, has a certain reference value, now share to everyone, the need for friends can refer to
Load Balancing
There are 4 modes of load Balancing
An example of implementing Load Balancing using nginx as a reverse proxy:Reprinted please indicate the original link: http://blog.csdn.net/omohe/archive/2009/07/09/4335765.aspxVersion: V1.0 Author: Omo last modification time: 2009.07.091) Environment: A. We use a local Windows system, and then use virutalbox to install a virtual Linux system. Install
In order to achieve server upgrades without affecting user use, it is necessary to configure two tomcat on one or more servers. The following procedure describes configuring two tomcat on the same server. The steps are as follows: 1, copy the original tomcat to another directory, such as: tomcat-8090, clear Logs Directory2, modify the Server.xml file in Tomcat, the shutdown and connector port modified to another value, such as 8006/80903. Modify startup.sh and shutdown.sh files and add in the fi
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.