https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8331

            Bug ID: 8331
           Summary: Redis.pm: separate read/write server handling
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: dev@spamassassin.apache.org
          Reporter: j...@excello.cz
  Target Milestone: Undefined

With this patch, the basic Redis replication can be used in order to increase
availability. The main motivation for this patch was our setup, where we use
spamassassin on multiple nodes and also multiple Redis-like instances (Redict
in our case). As we need consistent Bayes results across all nodes, the most
reasonable setup is having one master (write_server) and multiple replicas
(read_servers). We also want to ensure that Bayes results are gathered in case
the write_server is unavailable.


New Configuration Parameters:

    bayes_redis_read_servers: Comma-separated list of read servers
    bayes_redis_write_server: Single write server configuration
    bayes_redis_database: Redis database index
    bayes_redis_password: Authentication password
    bayes_redis_prefix: Key prefix for namespacing

Backward Compatibility:

    Maintains support for the legacy bayes_sql_dsn parameter
    Legacy configuration will be used if no new parameters are specified

Key Namespacing:

    All Redis keys are prefixed with key_prefix to allow multiple instances
    to share a Redis database
    Added a helper method key() to consistently apply the prefix

Read Server Failover:

    Automatic failover between read servers if one becomes unavailable
    Tries each read server in sequence until successful connection
    Remembers last successful read server to optimize future connections

Connection Management:

    Clear separation of read vs. write connections
    Proper cleanup during fork operations (prefork_init and
    spamd_child_init)
    Improved error handling with detailed error messages

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to