Module constants

Module constants 

Source

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)