? ? ? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
27 Jun 2015

This PR implements Redis session manage.

It works with redis server in TCP or Unix Socket.

Test Instructions

  • Install Redis server.
  • Install Redis PHP pecl.
  • Configure Redis server with tcp and/or unix socket.

redis.conf example for only TCP:

port 6379

redis.conf example for only Unix Socket:

port 0
unixsocket /var/run/redis/redis.sock
unixsocketperm 777

redis.conf example for TCP and Unix Socket:

port 6379
unixsocket /var/run/redis/redis.sock
unixsocketperm 777
  • Restart redis and php services
  • Check if redis is accepting connections

For TCP: redis-cli ping
For Unix Socket: redis-cli -s /var/run/redis/redis.sock ping

For TCP:

Host: Redis server ipv4 or localhost or domain (ex: localhost)
Port: Redis server port (ex: 6379)
Persist: Yes or No
Auth: Empty or password
Database: integer

For Unix Socket:

Host: Redis socket path (ex: /var/run/redis/redis.sock)
Port: 0 or -1
Persist: Yes or No
Auth: Empty or password
Database: integer
  • Try admin and frontend login and logout

Tested in:

  • CentOS Linux 7.1
    • redis v2.8.19-2 (epel repository)
    • php56 v5.6.9-1 (webtatic repository)
    • php56 pecl redis v2.2.7-1 (webtatic repository)
  • Joomla 3.4.1

More information

avatar andrepereiradasilva andrepereiradasilva - open - 27 Jun 2015
avatar andrepereiradasilva andrepereiradasilva - change - 27 Jun 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2015
Labels Added: ? ?
avatar andrepereiradasilva andrepereiradasilva - change - 27 Jun 2015
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 27 Jun 2015
The description was changed
avatar zero-24 zero-24 - change - 27 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 27 Jun 2015
Category Cache Libraries
avatar andrepereiradasilva
andrepereiradasilva - comment - 28 Jun 2015

This PR is not about this, but one thing important you should discuss is how to configure object/session cache handlers that are configured in clusters (for instance, for redundancy).

If you have 2 or more redis servers working in cluster, let's call it rediscluster01.local and rediscluster02.local and they have different weights, the "session.save_path" should be something like:
tcp://rediscluster01.local:6379?persistent=1&auth=passwordserver1&database=0&weight=1, tcp://rediscluster02.local:6379?persistent=1&auth=passwordserver2&database=0&weight=2

But joomla global config form doesn't allow more than one server.

This is also a problem in cluster with memcache, memcached, etc, not only redis.

I see two solutions for this:
1. Revision of the object/session cache handlers code to allow multiple servers
2. For each object/session cache handlers that allow multiservers, add a new text form field, for instance, "Custom", by default empty, where the user could write the string like the one above that would overwrite all config setting for the object/session cache handler in question.
IMHO this is an option because who needs to configure a object/session cache cluster is an advanced user and knows how to do this.

Of course since i don't have a full knowledge how joomla works you should know better if this makes sense.

avatar andrepereiradasilva andrepereiradasilva - change - 28 Oct 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-10-28 20:30:55
Closed_By andrepereiradasilva

Add a Comment

Login with GitHub to post a comment