Solve the problem of unresponsiveness of a service node through traffic replication

WBOY
Release: 2016-07-28 08:25:49
Original
1005 people have browsed it

 通过流量复制解决某个服务节点无响应的问题

Note: This only describes the situation of a single server. Docker Container is mapped to different ports. Docker Container provides external services through tomcat.

1. As shown in the figure, if the reverse proxy server sends a request, After the request reaches Nginx, assuming it matches the Upstream of Service A, it will be assigned to port 10100 or 10101 according to the corresponding distribution algorithm in nginx.conf.

2. Assume that the tomcat in the docker container corresponding to 10100 hangs ( Usually it is because the available memory held by the container is insufficient, causing the tomcat in the container to be killed.)

3. At this time, the request is assigned to port 10100, which will result in 404.

4. If At this time, we make a copy of the traffic and add a timeout. Then when the request is sent to 10100, after timeout or 404, the copied traffic is sent to port 10101.

The above has introduced how to solve the problem of unresponsiveness of a certain service node through traffic replication, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template