Closed GaelGirodon closed 4 years ago
Performance degradation seemed to be linked to having a reverse proxy (Nginx) in front of the gateway, on the same machine (see https://github.com/reactor/reactor-netty/issues/1038#issuecomment-603877063). Results are much better when Nginx is bypassed:
Req/s / Workers | 1 / 1 | 10 / 1 | 50 / 10 | 100 / 20 | 500 / 50 | 1000 / 100 |
---|---|---|---|---|---|---|
Mean latency (ms) | 1.7 | 1.5 | 1.3 | 1 | 0.9 | 2.1 |
Any explanation about this behavior is welcome!
Doesn't it suggest that nginx is the bottleneck?
Closing, see https://github.com/reactor/reactor-netty/issues/1038 for a similar closing.
@tony-clarke-amdocs
Doesn't it suggest that nginx is the bottleneck?
Yes and no. It would be a bit pretentious to say that Nginx is having (or is causing) performance issues 😉 It seems that my problem was to have a reverse proxy (Nginx) and the Spring Cloud Gateway app on the same machine. But why is this causing problems? Too many opened connections within the same machine, I/O limitations? I don't know exactly how to explain this behavior.
Description
During a load testing using vegeta, when I try to send 500 requests/sec with up to 50 concurrent workers, the latency becomes much higher and I get some connection timeouts (
504 Gateway Time-out
):PrematureCloseException
errors and500
HTTP responses (see reactor/reactor-netty#1038)fixed
pool, it's getting even worseMaybe I'm doing something wrong but I've done approximatively the same test with an old Camel/CXF stack running on Apache Karaf and I don't have these performance drops.
Sample
0.9.6.RELEASE
Environment
2.2.1
(with Reactory Netty0.9.6
)OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
CentOS Linux release 7.7.1908