Nginx works with IIS to achieve simple load balancing and nginxiis Load Balancing
Deploy nginx in linux. This article mainly introduces how to implement load balancing with iis after nginx is deployed. java is not used, but the principle should be the same.
1. IIS deploys the following two site ports: 8081 and 80828081 sites and 8082 sites: [write a very ugly page without style]. I specifically added 111 and 222 to distinguish them. set the nginx configuration file to implement simple Server Load balancer [xshell recommended] 3. set the hosts in windows to point to the IP address of the linux virtual machine. open Port 80 of the linux Virtual Machine. Otherwise, iptables-I INPUT-p tcp -- dport 80-j ACCEPT 5 cannot be accessed on windows. on windows, enter the http://hupp.test.cn, as shown below after multiple Refresh: simple Load Balancing has been achieved, multiple refresh will switch between the 8081 and 8082 sites.