Description: This is only a single server scenario. Docker Container are mapped to different ports, respectively. The Docker container provides services through Tomcat.
1. If the reverse proxy server sends a request, after the request arrives Nginx, the assumption is to match to service A's upstream, then according to nginx.conf in the corresponding distribution algorithm, assigns to port 10100 or 10101.
2. Assume that tomcat within the 10100 corresponding Docker container is hung (usually because container has insufficient available memory to cause Tomcat in the container to be killed.)
3. The request is now assigned to Port 10100, which results in 404.
4. If at this point, we make a copy of the traffic and add the timeout. Then when the request is sent to 10100, time-out or 404, the replicated traffic is sent to Port 10101.
The above describes the use of traffic replication to solve a service node does not respond to the problem, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.