From bff919b27152c2768511e8d36a41e445800c3c38 Mon Sep 17 00:00:00 2001 From: Theo Butler Date: Tue, 17 Oct 2023 09:01:13 -0500 Subject: [PATCH] fix: disable Nagel's algorithm (#406) We do not expect to flood the network with small packets, so Nagel's algorithms likely results in intermittent latency issues that can be very difficult to debug --- graph-gateway/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graph-gateway/src/main.rs b/graph-gateway/src/main.rs index eebdeaeb..091dd13f 100644 --- a/graph-gateway/src/main.rs +++ b/graph-gateway/src/main.rs @@ -277,6 +277,8 @@ async fn main() { IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), metrics_port, )) + // disable Nagel's algorithm + .tcp_nodelay(true) .serve(router.into_make_service()) .await .expect("Failed to start metrics server"); @@ -354,6 +356,8 @@ async fn main() { IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), api_port, )) + // disable Nagel's algorithm + .tcp_nodelay(true) .serve(router.into_make_service_with_connect_info::()) .await .expect("Failed to start API server");