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 will no longer describe the configuration of Tomc
Original English version, Chinese versionTony TangTranslation Arrangement
In the first part, I briefly described the various factors that need to be taken into account during the design of a large J2EE system with upgrading and high reliability.
This article discusses Tomcat's support for cluster, Server Load balancer, fault tolerance, session replication, and other capabilities.
In this section, we will see the complete cluster architecture and insta
;(4) Security Protection: Hardware equalization equipment In addition to load balancing function, but also has a firewall, anti-DDoS attacks and other security functions;(5) Maintenance angle: Provide a good maintenance management interface, after-sales service and technical support;(6) Local tyrants company: F5 Big Ip Price: 15w~55w range; A10 Price: 55w-100w;Disadvantages(1) The price is expensive;(2) Poo
good experience. Fast-growing traffic and data flow have spawned a wide range of load-balancing products, and many professional load-balancing hardware provides good functionality, but is expensive, which makes load-balancing sof
spawned a wide range of load-balancing products, and many professional load-balancing hardware provides good functionality, but is expensive, which makes load-balancing software popular, and Nginx is one of them.
The first public
Nginx configuration system consists of a master configuration file and some other auxiliary configuration files. These configuration files are plain text files, all in the Conf directory under the Nginx installation directory.
The line starting with # in the configuration file, or a number of spaces or tabs in front of it, followed by the lines of # are considered comments, meaning that only the user who edits the file is meaningful, and the actual content of the program is ignored when it reads
Nginx/lvs/haproxy is currently the most widely used three load balancing software, I have been implemented in a number of projects, reference to some information, combined with some of their own experience, summed up.The general use of load balancing is to use different technologies depending on the stage of the site's
, "controller" Assign the controller name Jkmount/* to the load assigned in workers.propertise3, download mod_jk.so:http://mirror.bjtu.edu.cn/apache/tomcat/tomcat-connectors/jk/binaries/windows/, note download and Apache The same version of so is placed under the installatio
Internet to access different intranet host resources through different domain names, so that intranet hosts are protected from external host attacks, load balancing and caching functions, to a large extent, reduce the burden on Web servers? Improve access speed. A simple nginx is implemented as a reverse proxy for load balan
and data traffic have spawned a wide range of load-balancing products, and many professional load-balancing hardware provides good functionality, but it's expensive, which makes load-balancing software popular and Nginx is one of
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.
Nginx Primary server: 192.168.50.133
Nginx Standby server: 192.168.50.135
-growing traffic and data traffic have spawned a wide range of load-balancing products, and many professional load-balancing hardware provides good functionality, but it's expensive, which makes load-balancing software popular and
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 advantage of dealing with concurrency, this app
; "src=" http://s3.51cto.com/wyfs02/M00/6D/8E/wKioL1Vmiv3hsP8mAAC5viD1Yks685.jpg "title=" 2.jpg " alt= "Wkiol1vmiv3hsp8maac5vid1yks685.jpg"/>Tomcat2 only on Tomcat and the above steps, login configuration to point to 192.168.103.192 this database650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/8E/wKioL1Vmi4qj4elUAADZ4tEIoIc555.jpg "title=" 3.jpg " alt= "Wkiol1vmi4qj4eluaadz4teioic555.jpg"/> Three, installation Apache21 Installing Apache2A
The following summarizes a number of real nginx load balancing function, here we add a weight to judge the method is based on the state of the Nginx load allocation of access to the user to the weight of the machine, the specific configuration is as follows.
Nginx for back-end Web server (apache,nginx,
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 load
, therefore, when a heavy Web server is used as a cluster node service (such as an Apache server), the algorithm will have a discount on the load balancing effect. To reduce this adverse effect, you can set the maximum number of connections for each node (expressed by Threshold setting ).
3.4 least missing
In the least missing method, the balancer records request
solve the session sharing problem, you can use NFS shared session, the session to write MySQL or Memcache methods, when the machine size is larger, the general use of the session is written into the memcache inside.
How the backend Web server is configured we do not discuss this here, the backend server may be apache,nginx,tomcat,lighthttp and so on, the front-end does not care what the back end is.First
Load balancing, also known as load sharing, refers to load balancing by dynamically adjusting the load on the system, and performing the load on multiple operational nodes to reduce the
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.