The role of load balancing
1, forwarding
According to a certain algorithm [weight] polling, the client forwards the request to a different application server, a single server reduce stress and improve system concurrency.
2, failure to remove
By way of heartbeat, the application server determines whether the current operating normally, the server of the shoot down, automatically sends a request to another application server.
3, add recovery
As the server application detects a failure recovery, automatically added to the team process user requests.
LINUX (CENTOS7) NGINX installation Address: https://www.cnblogs.com/kawhileonardfans/p/10966581.html
After nginx ready, because I only have a server here, so I am here to prepare a server on top of two simple tomcat, as shown below
Find nginx configuration files, configuration files I have here in / usr / local / nginx / conf below, the increase in http:
Then modify the server as follows:
The results after revision as follows:
Restart nginx
After the restart, and then use the address: http://139.199.203.169/test/index.html can look after the effect of configuration, and constantly refresh the page you can see sometimes tomcat1, sometimes tomcat2.