Open weitongming opened 4 years ago
unbelievable!
Sorry, we don't know what your code is doing. You'll need to either provide a reproducible case, or gather profiling information on your server to debug this further.
Actually,i just found an incredible thing.
In my zuul project ,there are several different filters for different uses。
If i override the needsBodyBuffered method extend from HttpInboundFilter ,like:
All the latency has gone , the jmeter pressure measurement data is as follows
proxy from zuul:
tomcat:
I can reproduce it with zuul 2.1.3 and any tomcat , it is amazing.
@weitongming As I said, you'll need to bring some more evidence to debug this further. You can use YourKit, or Async Profiler, or another profiler to see what is happening differently in your server.
zuul version:2.1.3 architecture: zuul + tomcat7
solution 1:
Pressure measuring tool:jmeter with 1 thread An tomcat http interface request takes almost 7ms , and the jmeter pressure measurement data is as follows:
When I forwarded this request through zuul2 ,i got almost 48ms latency .
what happend to zuul and why the latency of zuul is so high?
Situation has changed under high pressure:jmeter with 100 thread
tomcat:![image](https://user-images.githubusercontent.com/15322040/65652575-ccce9780-e044-11e9-86fc-d35d2a103b4a.png)
proxy from zuul:![image](https://user-images.githubusercontent.com/15322040/65652652-07d0cb00-e045-11e9-8db2-6b52efd0fdf6.png)
It seems that zuul did not cause any delay. But why zuul2 has a high delay under low pressure?
Can anyone tell me why and how to resolve this problem ,thansk.