Skip to main content

Configuration

Basic Reconnection Setup

Reconnection Configuration Options

Available Options

Option Descriptions

  • enableReconnect: Enable automatic reconnection and state management
  • stateSaveInterval: How often to save player states (seconds)
  • maxReconnectAttempts: Maximum reconnection attempts before giving up
  • infiniteReconnect: Keep trying to reconnect indefinitely
  • baseReconnectDelay: Initial delay between reconnection attempts (seconds)
  • maxReconnectDelay: Maximum delay between reconnection attempts (seconds)

Event Handling

Reconnection Events

Node Management

Check Node Status

Check Node Connection

Player State Preservation

Automatic State Management

Salada automatically saves and restores player states when the node disconnects and reconnects.

Manual State Operations

Connection Reliability

Circuit Breaker

The node implements a circuit breaker pattern to prevent overwhelming a failing server.

Exponential Backoff

Reconnection attempts use exponential backoff with jitter to avoid thundering herd problems.

Monitoring

Connection Metrics

Health Monitoring

Testing

Simulate Node Failure

Reconnection Test

Error Handling

Connection Error Recovery

Best Practices

Optimal Configuration

Monitoring Setup