Performance Settings

Optimize session performance for your workload.

Compression

Enable compression for large session data:

Session.configure do |config|
  config.compress_data = true
  config.compression_threshold = 256  # Bytes
end

Sliding Expiration

Extend session lifetime on each request:

Session.configure do |config|
  config.sliding_expiration = true
  config.timeout = 30.minutes
end

Retry Configuration

Configure retry behavior for transient failures:

Session.configure do |config|
  config.enable_retry = true
  config.retry_config = Session::RetryConfig.new(
    max_attempts: 3,
    base_delay: 100.milliseconds,
    max_delay: 5.seconds,
    backoff_multiplier: 2.0,
    jitter: 0.1
  )
end

Circuit Breaker

Prevent cascading failures:

Clustering Performance

Optimize for multi-node deployments:

Performance Properties

Property
Type
Default
Description

compress_data

Bool

false

Enable compression

compression_threshold

Int32

256

Min bytes to compress

sliding_expiration

Bool

false

Extend on access

enable_retry

Bool

true

Enable retry logic

circuit_breaker_enabled

Bool

false

Enable circuit breaker

Last updated

Was this helpful?