Skip to content

Redis connection: add TLS, auth, Sentinel, and Cluster support #10

@jerry7991

Description

@jerry7991

Problem

lib/nebula_queue/connection.rb:26:

Redis.new(url: config.redis_url)

Only a URL is supported. Production Redis deployments typically require one or more of:

  • TLS (rediss:// + CA bundle / client cert).
  • Password / ACL auth (separate from the URL for secret-store injection).
  • Redis Sentinel (high availability via sentinels: + name: options).
  • Redis Cluster (redis-clustering gem, different client class).
  • Read/write timeouts (connect_timeout, read_timeout, write_timeout).

Fix

  1. Expose config.redis_options as a hash passed through to Redis.new, merged on top of { url: redis_url }.
  2. Document recommended production settings (timeouts, TLS).
  3. Add a config.sentinels shortcut and document the Sentinel topology.
  4. Consider a config.client_class override for users on Redis Cluster / redis-client.

Acceptance

  • config.redis_options = { ssl_params: {...}, password: ENV['REDIS_PASSWORD'], connect_timeout: 2 } works end-to-end.
  • README has a "Production Redis" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions