Skip to content

Commit

Permalink
perf(listener): set TCP_NODELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys3 committed Apr 2, 2024
1 parent e45fe56 commit 8ac4aaa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ async fn main() {

let listener = tokio::net::TcpListener::bind(sock_addr).await.unwrap();

axum::serve(listener, app.into_make_service_with_connect_info::<SocketAddr>()).await.unwrap();
axum::serve(listener, app.into_make_service_with_connect_info::<SocketAddr>())
.tcp_nodelay(true)
.await
.unwrap();
}

// see https://kubernetes.io/docs/reference/using-api/health-checks/
Expand Down

0 comments on commit 8ac4aaa

Please sign in to comment.