Skip to main content

AFS_AETHER_TRANSPORT_STREAM_WINDOW_BYTES

Deep-dive reference for:

  • AFS_AETHER_TRANSPORT_STREAM_WINDOW_BYTES

Status

  • active

Audience

  • mixed

Type and Default

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

What It Does

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

Larger stream windows can improve throughput for large per-stream transfers. Smaller stream windows can reduce per-stream in-flight buffering.

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

  • .initial_stream_window_size(...)

Where It Applies

  • Bridge/remote channel construction path (not standalone local-only paths).
  • Works with:
    • AFS_AETHER_TRANSPORT_CONN_WINDOW_BYTES
    • AFS_AETHER_TRANSPORT_HEARTBEAT_INTERVAL_MS
    • AFS_AETHER_TRANSPORT_IDLE_TIMEOUT_MS

Input Surfaces

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

Resolution and Validation

Resolution path:

  1. Built-in default (16 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 near default unless you are tuning for specific network/throughput behavior.
  • For balanced behavior, tune connection and stream windows together.
  • Very large values increase in-flight buffering; very small values can increase flow-control stalls.

Example

  • Env:
    • AFS_AETHER_TRANSPORT_STREAM_WINDOW_BYTES=33554432
  • TOML:
    • [transport]
    • stream_window_bytes = 33554432
  • AFS_AETHER_TRANSPORT_CONN_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