Overview
The III SDK automatically reconnects when the WebSocket connection drops, using exponential backoff with jitter to prevent thundering herd problems. All functions, triggers, and services are automatically re-registered after reconnection.Default Behavior
By default, the SDK reconnects indefinitely with these settings:Reconnection Algorithm
The SDK calculates retry delays using exponential backoff with jitter:- Attempt 1: ~1s (1000ms ± 300ms)
- Attempt 2: ~2s (2000ms ± 600ms)
- Attempt 3: ~4s (4000ms ± 1200ms)
- Attempt 4: ~8s (8000ms ± 2400ms)
- Attempt 5: ~16s (16000ms ± 4800ms)
- Attempt 6+: ~30s (30000ms ± 9000ms) - capped
Custom Configuration
Basic Configuration
OpenTelemetry Connection Reconnection
The OpenTelemetry telemetry system uses a separate WebSocket connection for traces, metrics, and logs. You can configure its reconnection independently:
Connection State Monitoring
1
Track connection state
Monitor the connection lifecycle to implement custom logic:
2
Query current state
Check the current connection state synchronously:
Automatic Re-registration
Invocation Behavior During Reconnection
Queuing Messages
Messages sent while disconnected are queued (up to 1000 messages) and sent when the connection is restored: