Skip to main content

AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS

Deep-dive reference for:

  • AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS

Status

  • active

Audience

  • mixed

Type and Default

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

What It Does

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

In endpoint tuning this is applied as:

  • .http2_keep_alive_interval(...)

Shorter intervals detect broken/idle links faster but send more keepalive traffic. Longer intervals reduce keepalive traffic but take longer to detect dead peers.

Where It Applies

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

Input Surfaces

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

Resolution and Validation

Resolution path:

  1. Built-in default (2000ms)
  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

  • Start with default 2000ms.
  • Increase if keepalive chatter is too aggressive for your environment.
  • Decrease only when you need faster dead-link detection and can tolerate more periodic traffic.
  • Tune together with AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS; timeout should generally be longer than interval.

Example

  • Env:
    • AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS=3000
  • TOML:
    • [transport]
    • heartbeat_interval_ms = 3000
  • AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_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