Skip to main content

AFS_AETHER_TRANSPORT_CONN_WINDOW_BYTES

Deep-dive reference for:

  • AFS_AETHER_TRANSPORT_CONN_WINDOW_BYTES

Status

  • active

Audience

  • mixed

Type and Default

  • Type: unsigned integer bytes (u64 in config parsing; converted to u32 for endpoint tuning).
  • Default: 67108864 bytes (64 MiB).
  • Must be greater than 0.

What It Does

Sets the HTTP/2 connection-level flow-control window used when Aether builds bridge-mode gRPC channels.

Larger windows can improve throughput on high-latency/high-bandwidth links by allowing more in-flight data before flow-control stalls. Smaller windows reduce in-flight memory/pressure.

This is applied in remote mount channel setup and then passed to tonic endpoint tuning as:

  • .initial_connection_window_size(...)

Where It Applies

  • Applies to bridge/remote channel construction path (not standalone local-only paths).
  • Works with:
    • AFS_AETHER_TRANSPORT_STREAM_WINDOW_BYTES
    • AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS
    • AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS

Input Surfaces

  • Env: AFS_AETHER_TRANSPORT_CONN_WINDOW_BYTES=<bytes>
  • Config file (aether.toml):
    • [transport]
    • connection_window_bytes = <bytes>

Resolution and Validation

Resolution path:

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

Validation:

  • Env/file/overrides reject 0 with "value must be greater than zero".
  • Runtime channel construction rejects values above u32::MAX because tonic endpoint API requires u32.

Practical Guidance

  • Keep this at default unless you observe throughput bottlenecks on long-RTT links.
  • Increase together with stream window for bulk transfer patterns.
  • If set too low, you may see avoidable flow-control stalls; if set too high, you can increase in-flight buffering.

Example

  • Env:
    • AFS_AETHER_TRANSPORT_CONN_WINDOW_BYTES=134217728
  • TOML:
    • [transport]
    • connection_window_bytes = 134217728
  • AFS_AETHER_TRANSPORT_STREAM_WINDOW_BYTES
  • AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS
  • AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS

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/aether-remote/src/mount/transport_channel_tests.rs
  • packages/afs-grpc-utils/src/lib.rs