Linux-Nginx simple Load Balancing (1), linux-nginx
Here we will perform simple nginx load first, and we will not talk about nginx installation here. We assume that
If you do not know how to install Nginx under Linux, please refer to the previous article.
Nginx load Balancing configuration is much simpler than Apache, where load balancing with Nginx
Comparison of haproxy lvs nginx Load Balancing
For the software that implements load balancing, let's take a look at it in detail. In terms of performance and stability, LVS is the best, basically reaching 60% of the performance of F5 hardware equipment, and other 10% are a
.
modify Nginx
The result of the modified configuration file conf/nginx.conf is:
Here is a detailed explanation:
A area , c38> here the upstream is added, must be added to the server {} before the node configuration
12>
c22> This indicates that there are 2 Machine to do load
Resources to use:
Nginx Primary server One, Nginx standby server, use keepalived for downtime switching.
Tomcat server two, by Nginx reverse proxy and load balancing, here can build server cluster.
Redis server, used for session separation and sharing.
: This article mainly introduces load balancing for Nginx + Tomcat. For more information about PHP tutorials, see. Nginx load balancing
Recently, the project has to be designed with concurrency. Therefore, when designing the proj
BACKUP State
APR 17:44:06 localhost keepalived_vrrp:vrrp_instance (vi_1) removing protocol VIPs.
APR 17:44:06 localhost keepalived_vrrp:netlink reflector reports IP 192.168.207.140 removed
APR 17:44:06 localhost keepalived_healthcheckers:netlink reflector reports IP 192.168.207.140 removed
APR 17:44:06 localhost avahi-daemon[4204]: Withdrawing address record for 192.168.207.140 on eth0.
indicates that the original master-slave result has been restored.
in the production envi
Summary : For a large web site, load Balancing is an eternal topic. With the rapid development of hardware technology, more and more load balancing hardware devices emerge, such as F5 big-IP, Citrix NetScaler, Radware and so on, although can solve the problem, but its high price is often prohibitive, So
For a large web site, load Balancing is an eternal topic. With the rapid development of hardware technology, more and more load balancing hardware devices emerge, such as F5 big-IP, Citrix NetScaler, Radware and so on, although can solve the problem, but its high price is often prohibitive, So
Load balancing is an eternal topic for a large web site. With the rapid development of hardware technology, more and more load balancing hardware devices emerge, such as F5 Big-ip, Citrix netscaler, Radware, etc., although it can solve the problem, but its high price is often prohibitive, So
/images.confserver { listen 8080; server_name nginx.bgx.com; location / { root /code; index index.html; }}2.Nginx Load BalancingWebServer, direct user-oriented, often to be hosted 大量并发请求 , a single server 难以负荷 , I use a number of servers, the WEB front- 集群 End use Nginx``负载均衡 , will be requested 分散 to hit our back-end server cluster, imp
Test environment is local, test software is:Nginx-1.6.0,apache-tomcat-7.0.42-1. Apache-tomcat-7.0.42-2. Apache-tomcat-7.0.42-3Using Nginx to do load balancing, three Tomcat do web-detailed business processing.Nginx Configuration nginx.conf:#Nginx所用用户和组. #user NIUMD NIUMD is not specified under window; #user Nobody, #工
accordingly. 2048 should be satisfied for most people, but to be honest, if your traffic increases, it should be clear about the number of workers.CPU priority
Setting the CPU priority basically means that you tell each program to use the CPU core, and they will only use this CPU core. I don't want to say a lot about this one, but you need to know that if you are going to do this, you mustVeryBe careful. You must know that the CPU scheduler of your operating system can process
absrtact : For a large web site, load Balancing is the eternal topic. With the rapid development of hardware technology, more and more load balancing hardware devices emerge, such as F5 Big-ip, Citrix netscaler, Radware, etc., although it can solve the problem, but its high price is often prohibitive, So
The static and dynamic separation in this paper is mainly realized by Nginx+tomcat, in which the nginx handles the images, HTML, JS, CSS and so on, and Tomcat handles the dynamic requests such as JSP and servlet. Server Name System version pre-installed software IP addressNginx Server CentOS 7 Minimum installation Nginx 192.168.22.228 Web Server A CentOS 7 minimu
: This article mainly introduces the Nginx series (thirteen nginx server load balancer). For more information about PHP tutorials, see. I. server load balancer configuration
# Server load balancer upstream webserver {server192.168.27.134: 8080; server192.168.27.135: 80; ser
: This article mainly introduces nginx + keepalived high-availability server load balancer. if you are interested in the PHP Tutorial, refer to it. Let's just talk about nginx installation and configuration, as well as server load balancer. you can refer to another article I
Nginx InstallationNginx is a lightweight Web server/reverse proxy server and e-mail (IMAP/POP3) proxy server, and is distributed under a bsd-like protocol. Developed by the Russian program designer Igor Sysoev, it is used by Russia's large portal and search engine Rambler (Russian: Рамблер). Its features are less memory, concurrency is strong, in fact, Nginx's concurrency ability indeed in the same type of Web server performance better, the Chinese ma
properties. The contents of the document are as follows:
[Root@node1 bin]# Vim/etc/httpd/extra/workers.properties
Worker.list = TOMCAT1,STAT1
Worker.tomcat1.type = ajp13
Worker.tomcat1.host = 192.168.0.1
Worker.tomcat1.port = 8009
Worker.tomcat1.lbfactor=1
Worker.stat1.type = Status
Restart the HTTPD service and test
[Root@node1 bin]# Service httpd restart
The test page is as follows
With the above configuration and testing, now that Apache is implemented based on Mod
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.