spring-cloud-gateway
spring-cloud-gateway copied to clipboard
[Performance Question] Is there a official benchmark available?
Hi, I am exploring gateway application for our project. Wondering if there is any official benchmarks numbers published.
While exploring had few questions around netty reactor
- Why can't we increase the no of acceptor thread? Referring to this code
* Default selector thread count, fallback to -1 (no selector thread)
* <p><strong>Note:</strong> In most use cases using a worker thread also as a selector thread works well.
* A possible use case for specifying a separate selector thread might be when the worker threads are too busy
* and connections cannot be accepted fast enough.
* <p><strong>Note:</strong> Although more than 1 can be configured as a selector thread count, in reality
* only 1 thread will be used as a selector thread.
*/
public static final String IO_SELECT_COUNT = "reactor.netty.ioSelectCount";
- Is there any benefit i will get out of this?
- When i run a benchmark as follows (ex, send 100 Request Per Second to gateway) Client(wrk2) -> Spring Cloud Gateway -> Upstream Server (NGINX) observing the tail latencies are higher (requests above 93 percentile are getting higher latencies compared to other gateways) I am using just route configuration and no code changes.
Any suggestions or thoughts how to identify/resolve the higher tail latency issues?
In reactive programming, no thread should be blocked,so we can assume that all threads are always processing things, and most IO events are processed in a timely manner, so in theory there is no need for a full-time accepted thread, although it is fine to set up an accepted thread. But there is little point in accepting too much in theory.
There is not
To locate the destination with Spring Cloud Gateway, it's essential to traverse the collection of routes. As a result, the tail latencies will be higher.