spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

Question: What could be causing this latency?

Open joaquinjsb opened this issue 5 months ago • 0 comments

Hello, I'm having some latency issues with my SCG MVC, I'm running on 4.3.0, latency is pretty high in most of the requests that are routed through the gateway, the ping and the network between the two services is good, it's on the same LAN in DC, ping is <1ms.

the route is something as simple as


return  GatewayRouterFunctions.route(authService)
      .route(host(gatewayHostname).and(path("/service-path/**")), HandlerFunctions.http(uri))
				.before(BeforeFilterFunctions.stripPrefix(1))
                                .filter(tokenRelay())
      .build()

the upstream server takes 343ms, but the full gateway response takes 1.13s

same thing is happening on my local machine, may need to try with a reproducer if possible soon.

Image

I have attached a full grafana trace, with sensitive data redacted, follow this steps to visualize it:

  1. go to https://play.grafana.org/goto/EnS0xlyNR?orgId=1 (no need for account)
  2. click on Import trace
  3. upload the json trace Trace-d04d00-2025-07-09 15_57_06.json
  4. you should be able to visualize data
Image

do you guys have any tip / suggestion to what else could I check?

thanks

joaquinjsb avatar Jul 09 '25 14:07 joaquinjsb