High kong latency with large response sizes

We are seeing a huge kong latency (kong_latency_bucket{type=“kong”} from prometheus plugin) for one of our services which returns responses with payload size of over 100kb.

For response sizes below 10kb, the kong latency us under 5ms. For the ones over 10kb its starting to increase and goes all the way upto 50ms (800kb size).

We are using kong 0.14.0. I have tried the following,

  • Disabled all plugins
  • set nginx_proxy_proxy_buffers=10 1m in kong.conf
  • Enabled/Disabled gzip compression from the service end

None of these helped reducing the kong latency.

Community user here, I would say 50ms for 800kb-1mb is in line with normal behavior with modern API Gateways from what I have seen and with testing Kong too, the larger the size the longer it takes to push through a middleware node to backend services no matter the tech. Seen better performance out of other Gateways? If you do manage to reduce it let me know :slight_smile: .