Skip to content

Commit

Permalink
proxy: Set TCP_NODELAY for compute connections (#10240)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneable authored Jan 2, 2025
1 parent 26600f2 commit ee22d4c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions proxy/src/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,15 @@ impl ConnCfg {

let connect_once = |host, port| {
debug!("trying to connect to compute node at {host}:{port}");
connect_with_timeout(host, port).and_then(|socket| async {
let socket_addr = socket.peer_addr()?;
connect_with_timeout(host, port).and_then(|stream| async {
let socket_addr = stream.peer_addr()?;
let socket = socket2::SockRef::from(&stream);
// Disable Nagle's algorithm to not introduce latency between
// client and compute.
socket.set_nodelay(true)?;
// This prevents load balancer from severing the connection.
socket2::SockRef::from(&socket).set_keepalive(true)?;
Ok((socket_addr, socket))
socket.set_keepalive(true)?;
Ok((socket_addr, stream))
})
};

Expand Down

1 comment on commit ee22d4c

@github-actions
Copy link

@github-actions github-actions bot commented on ee22d4c Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7274 tests run: 6964 passed, 1 failed, 309 skipped (full report)


Failures on Postgres 16

  • test_storage_controller_many_tenants[github-actions-selfhosted]: release-x86-64
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_storage_controller_many_tenants[release-pg16-github-actions-selfhosted]"
Flaky tests (3)

Postgres 17

Postgres 15

Code coverage* (full report)

  • functions: 31.3% (8405 of 26881 functions)
  • lines: 48.0% (66697 of 139074 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
ee22d4c at 2025-01-02T17:42:25.830Z :recycle:

Please sign in to comment.