Constants§
- CONNECTION_
TTL_ SECS - DynamoDB TTL buffer for cleanup of old connections (2 hours)
- HEARTBEAT_
INTERVAL_ SECS - Heartbeat interval to keep WebSocket connection alive (5 minutes)
- MAX_
BODY_ SIZE_ BYTES - Maximum request/response body size (2 MB per API Gateway limit)
- MAX_
CONNECTION_ LIFETIME_ SECS - Maximum connection lifetime before requiring reconnection (2 hours)
- OPTIMIZED_
POLL_ FINAL_ INTERVAL_ MS - Optimized polling: final polling interval (400ms) - for edge cases
- OPTIMIZED_
POLL_ FIRST_ INTERVAL_ MS - Optimized polling: first check interval (200ms) - covers fast responses
- OPTIMIZED_
POLL_ SECOND_ INTERVAL_ MS - Optimized polling: second check interval (300ms) - cumulative 500ms
- PENDING_
REQUEST_ TTL_ SECS - Pending request TTL in DynamoDB (30 seconds)
- POLL_
BACKOFF_ MULTIPLIER - Polling backoff multiplier
- POLL_
INITIAL_ INTERVAL_ MS - Initial polling interval when waiting for response (50ms)
- POLL_
MAX_ INTERVAL_ MS - Maximum polling interval (500ms)
- RECONNECT_
MAX_ DELAY_ MS - Maximum delay for exponential backoff reconnection (60 seconds)
- RECONNECT_
MIN_ DELAY_ MS - Minimum delay for exponential backoff reconnection (1 second)
- RECONNECT_
MULTIPLIER - Multiplier for exponential backoff reconnection
- REQUEST_
TIMEOUT_ SECS - Request timeout waiting for response from agent (under API Gateway’s 29s limit)
- WEBSOCKET_
IDLE_ TIMEOUT_ SECS - API Gateway WebSocket idle timeout (10 minutes)