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

Implement persistent connections in Redis cache and session store

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Configuration

      Assuming an existing Redis installation...

      For sessions:

      1. Add $CFG->session_redis_persistent = true; and $CFG->session_redis_persistent_id = 'sess'; to /config.php.

      For MUC:

      1. Browse to /cache/admin.php and modify your Redis store instance with Use persistent connection? checked and Persistent connection ID as muc.

      Testing

      1. Loading the site for a few minutes to ensure that all workers in the SAPI have connected.
      2. Verify that netstat -ntap (for TCP connection) or netstat -nxap (for socket connection) shows at most 2 * the number of workers connections.
      Show
      Configuration Assuming an existing Redis installation... For sessions: Add $CFG->session_redis_persistent = true; and $CFG->session_redis_persistent_id = 'sess'; to /config.php . For MUC: Browse to /cache/admin.php and modify your Redis store instance with Use persistent connection? checked and Persistent connection ID as muc . Testing Loading the site for a few minutes to ensure that all workers in the SAPI have connected. Verify that netstat -ntap (for TCP connection) or netstat -nxap (for socket connection) shows at most 2 * the number of workers connections.
    • Affected Branches:
      MOODLE_35_STABLE
    • Pull Master Branch:
      MDL-63642-redis-persistent-master

      Description

      Persistent connections can, in some configurations, save setup time by eliminating the overhead of opening a connection to the server, allowing pooling of open connections. The MUC and session stores don't currently expose this option though the PHP Redis extension supports it.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lukecarrier Luke Carrier
                Reporter:
                lukecarrier Luke Carrier
                Peer reviewer:
                Víctor Déniz Falcón
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: