The tomcat 8.0 server is used, nio mode. Others are default configurations.
Write an interface using rest of spring mvc, and then call it with resttemplate, through the connection pool implemented by httpclient. When 1,000 requests were made concurrently, some requests were found to have timed out. causing access failure. <But the application never hung up, because some requests timed out>.
The entire system architecture is like this
There are three applications A, B, and C
C is responsible for operating the database, providing interfaces, and returning JSON
B is responsible for processing business, providing interfaces, returning JSON, and calling C's interface, save/read data
A is responsible for the front desk, calling B's interface
When A calls B, complex balancing is done through nginx, and there are two B servers.
Excuse me, what are the situations that may cause timeout?
仅有的幸福2017-05-16 17:22:58
First determine which step the problem is, and then analyze it in detail. You can print out the time consumption of each interface call