Netflix / zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Apache License 2.0
13.38k stars 2.36k forks source link

Why zuul2 has a high delay under low pressure #627

Open weitongming opened 4 years ago

weitongming commented 4 years ago

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:

image

When I forwarded this request through zuul2 ,i got almost 48ms latency .

image

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

proxy from zuul: image

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.

JustyouLs commented 4 years ago

unbelievable!

carl-mastrangelo commented 4 years ago

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.

weitongming commented 4 years ago

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: image All the latency has gone , the jmeter pressure measurement data is as follows proxy from zuul: image tomcat: image I can reproduce it with zuul 2.1.3 and any tomcat , it is amazing.

carl-mastrangelo commented 4 years ago

@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.