Now you need to run two Tomcats, listen to different ports, let Nginx be loaded into load balancing.
Tomcat version:apache-tomcat-7.0.69-windows-x64.zip
To run two Tomcats in a machine, we must solve the conflict of the port, we only needD:\green\tomcat_cluster\apache-tomcat-7.0.69-server-1\conf\server.xmlinportwithredirectPortThe port modifies the different ports that do not occupy.
<Server port="8005" shutdown="SHUTDOWN">To turn off the port of the server listening.<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />, Port = "8080", HTTP connection listener port; redirectport = "8443", encountered an SSL request, the port requesting the jump.<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />, AJP listening ports and ports that have a SSL turn. Regarding AJP, I don't understand, please refer to:Summary and analysis of AJP protocolNginx version:nginx-1.10.1.zip
Nginx supports several formive equilibrium allocation:
Among them, IP hash load balancing is viscous, that is, the request of the same client in the session will always be assigned to a server. If you do not implement session sharing, you can use IP hash.
The following is the easiest way to configure:
Add the following configuration:
http {
......
upstream myweb_proxy {
server 127.0.0.1:18080;
server 127.0.0.1:28080;
}
......
server {
......
location /myweb {
proxy_pass http://myweb_proxy;
}
......
}
}
Other configuration, reference:Using nginx as HTTP load balancer
1. Prepare two Tomcat Configuring two Tomcat One port is 8080 another port is 8081, adding a test-added web project to WebApps, modify the index.jsp file, the 8080 port of the INDEX.JSP page to join: ...
1. Construct NGINX + KeepaliveD high availability cluster based on CENTOS. Note: Nginx itself provides health detection (load scheduler), while LVS health test is implemented by Keepalived Preparation...
If Nginx does not only proxy one server, it is impossible to be like today, Nginx can configure multiple servers, while a server is downtime, keep the system available. The specific configuration proc...
First, configure TCP load balancing Second, configure UDP load balancing Third, configure WebSocket load balancing Fourth, configure mysql load balancing V. Configure HTTP load balancing...
Introduction I believe that many people have heard Nginx, this small thing slowly swallowing the share of Apache and IIS. What role is there? Picking a section of Baidu Encyclopedia: Reverse Proxy met...
Whether the load balancing of Nginx detail in the Windows system A. Download Nginx Download path:http://nginx.org/en/download.html Download this: nginx-1.10.3 B. Unzip to the C disk and start configur...
Nginx five load balancing strategies 1, polling The polling is the default assignment mode of UPStream, ie each request is assigned to a different backend server according to the time sequence, and if...
Configuring NGINX load balancing under Windows Nginx's UPSTream currently supports the five ways of support 1, polling (default) Each request is assigned to a different backend server one by one in th...
2019 Unicorn Enterprise Heavy Recruitment Python Engineer Standard >>> This brief map describes how to build high-availability load balancing environments in the Ubuntu Server environment, wh...
Modify the \ conf \ nginx.conf file, the modified content is as follows:...