Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59196

Add support for Redis Cluster

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.3, 3.7.3, 3.8
    • Caching, Libraries
    • None
    • MOODLE_33_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE

      Hi,

       

      In the following issues, Redis support was added for caching and for sessions:

      https://tracker.moodle.org/browse/MDL-53599

      https://tracker.moodle.org/browse/MDL-58311

       

      One of the mentioned advantages was the better clustering support, see here:

      https://tracker.moodle.org/browse/MDL-53599?focusedCommentId=403459&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-403459

      With the Memcached handler, it is possible to define multiple IPs so some sort of clustering was possible and there was no single-point-of-failure in a moodle cluster.

      However, it seems that with Redis currently there is only support for a single IP/Port to be defined for sessions and for caching.

      I have configured a Redis Cluster server side and hoped to resolve it that way. However, a Redis Cluster uses MOVED / ASK redirection to send clients to another Redis node where the data should be saved / retrieved. See the Redis Cluster Spec

      However, currently Moodle does not appear to support this. I tried this out and when debugging I see the ASK / MOVED responses but they are not being followed. As a result, the connection fails.

      The used phpredis extension does in fact support this. Phpredis claims the Cluster support is mostly a drop-in replacement, and from what I can see on the documentation page there's a minor difference in the way the connection is established. See the documentation here.

      One important thing to note is that phpredis currently does not appear to support AUTH. It seems that this is planned for in the future however, but for now it does not appear to be possible. See this issue.

      It would be great if the cluster support can be added. Thanks!

       

            Votes:
            27 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.