We recently configured Kong Gateway 3.x in front of our backend services and client-facing website to handle dynamic payload routing, automated version checks, and API rate limiting under peak user traffic. While standard request volume works without issue, we have started encountering intermittent 502 Bad Gateway responses during high-concurrency spikes when both the rate-limiting and proxy-cache plugins are active simultaneously.
A related problem is that upstream connection timeouts seem to trigger sporadically even though our origin server resource utilization remains well below normal thresholds. We also noticed that when clients query update endpoints in rapid succession, Kong occasionally drops the upstream keepalive connection, which temporarily increases latency and causes handshake failures across several edge nodes.
Could this be related to how the upstream keepalive pool or proxy buffers are configured when handling bursty traffic toward the website? Any advice on best practices for tuning upstream connection timeouts and DNS resolver caching to stabilize these high-throughput routes would be greatly appreciated.