Skip to main content

AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS

Deep-dive reference for:

  • AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS

Status

  • active

Audience

  • mixed

Type and Default

  • Type: duration in milliseconds (u64 parsed, stored as Duration).
  • Default: 10000 ms (10s).
  • Must be greater than 0.

What It Does

Sets the HTTP/2 keepalive timeout used on bridge-mode gRPC channels.

In endpoint tuning this is applied as:

  • .keep_alive_timeout(...)

This is the timeout budget for keepalive responses. If the peer does not respond within this timeout window, the transport treats the connection as unhealthy and reconnect logic can take over.

Where It Applies

  • Bridge/remote channel setup path used by Aether remote mount orchestration.
  • Works with:
    • AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS (keepalive send cadence)
    • AFS_AETHER_TRANSPORT_CONN_WINDOW_BYTES
    • AFS_AETHER_TRANSPORT_STREAM_WINDOW_BYTES

Input Surfaces

  • Env: AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS=<ms>
  • Config file (aether.toml):
    • [transport]
    • idle_timeout_ms = <ms>

Resolution and Validation

Resolution path:

  1. Built-in default (10000ms)
  2. aether.toml transport block
  3. Environment override

Validation:

  • Env/file/overrides reject 0 with "value must be greater than zero".
  • Applied during endpoint tuning unless AFS_GRPC_DISABLE_KEEPALIVE disables keepalive behavior globally.

Practical Guidance

  • Keep timeout greater than heartbeat interval to avoid false positives.
  • Default pair (heartbeat=2000ms, timeout=10000ms) is a conservative baseline.
  • Lower timeout can detect dead connections faster but increases risk of noisy reconnects on unstable networks.

Example

  • Env:
    • AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS=15000
  • TOML:
    • [transport]
    • idle_timeout_ms = 15000
  • AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS
  • AFS_AETHER_TRANSPORT_CONN_WINDOW_BYTES
  • AFS_AETHER_TRANSPORT_STREAM_WINDOW_BYTES

Primary Implementation Sources

  • packages/aether/src/config/types/model_defaults.rs
  • packages/aether/src/config/types/file_config_loader.rs
  • packages/aether/src/config/types/apply_env.rs
  • packages/aether/src/config/types/config_resolution.rs
  • packages/aether-remote/src/mount/orchestrator.rs
  • packages/afs-grpc-utils/src/lib.rs