mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-07 05:13:12 +00:00
69cd230568
Garage RPC connections have no TCP keepalive enabled. When a connection dies silently (proxy pod restart, NAT timeout, network partition), it's only detected by application-level pings after ~60s (4 failed pings x 15s interval). During this window, the node appears connected but all RPC calls to it fail. Enable TCP keepalive on both outgoing and incoming RPC connections via socket2: - Idle time before first probe: 30s (TCP_KEEPALIVE_TIME) - Probe interval after first: 10s (TCP_KEEPALIVE_INTERVAL) A helper set_keepalive() function avoids duplicating the socket2 setup. Incoming connection keepalive failures are logged as warnings but don't reject the connection. Companion to #1345 (stale address pruning + connect timeout). Together they address both halves of the reconnection problem: faster detection (this PR) and faster recovery. Co-authored-by: Raj Singh <raj@tailscale.com> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/1348 Reviewed-by: maximilien <git@mricher.fr> Co-authored-by: rajsinghtech <rajsinghtech@noreply.localhost> Co-committed-by: rajsinghtech <rajsinghtech@noreply.localhost>
49 lines
1.0 KiB
TOML
49 lines
1.0 KiB
TOML
[package]
|
|
name = "garage_net"
|
|
version = "2.2.0"
|
|
authors = ["Alex Auvolat <alex@adnab.me>"]
|
|
edition = "2018"
|
|
license = "AGPL-3.0"
|
|
description = "Networking library for Garage RPC communication, forked from Netapp"
|
|
repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage"
|
|
readme = "../../README.md"
|
|
|
|
[lib]
|
|
path = "lib.rs"
|
|
|
|
[features]
|
|
default = []
|
|
telemetry = ["opentelemetry", "opentelemetry-contrib"]
|
|
|
|
[dependencies]
|
|
futures.workspace = true
|
|
pin-project.workspace = true
|
|
tokio.workspace = true
|
|
tokio-util.workspace = true
|
|
tokio-stream.workspace = true
|
|
|
|
serde.workspace = true
|
|
rmp-serde.workspace = true
|
|
hex.workspace = true
|
|
|
|
rand.workspace = true
|
|
socket2.workspace = true
|
|
|
|
log.workspace = true
|
|
arc-swap.workspace = true
|
|
thiserror.workspace = true
|
|
bytes.workspace = true
|
|
cfg-if.workspace = true
|
|
|
|
sodiumoxide.workspace = true
|
|
kuska-handshake.workspace = true
|
|
|
|
opentelemetry = { workspace = true, optional = true }
|
|
opentelemetry-contrib = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
pretty_env_logger.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|