Memcached session backend

Presentation

Memcached is distributed object caching system. You can download it here: http://memcached.org/.

By default, Memcached do not replicate data, so you cannot do failover with Memcached. A patch is available here to have replication in Memcached: http://repcached.lab.klab.org/.

To use Memcached with LemonLDAP::NG, you have to install Apache::Session::Memcached: http://search.cpan.org/~enrys/Apache-Session-Memcached/.

Caveats

Memcached will work with LemonLDAP::NG except for these functionalities : Indeed, Memcached does not provide any mean to get all sessions (without knowning each ID of each session). This is mandatory to display all sessions in Session Explorer, to purge sessions and to find a corresponding session when testing session uniqueness.

To disable sessions explorer, you can forbid access in apache configuration:

<Location /sessions.pl>
Order deny, allow
Deny from all
</Location>

To disable session uniqueness control, use Manager or lemonldap-ng.ini, and edit these parameters:

singleSession = 0
singleIP = 0
singleUserByIP = 0
notifyOther = 0

For sessions purge, a solution can be to patch Apache::Session::Memcached, with this patch: https://rt.cpan.org/Ticket/Display.html?id=56429.

LemonLDAP::NG configuration

Go to the Manager and go in General Parameters > Session Storage. Then change Apache::Session module to "Apache::Session::Memcached" and in Apache::Session parameters configure the following options: Example:

globalStorage = Apache::Session::Memcached
globalStorageOptions = { Servers => '127.0.0.1:11211 192.168.1.1:11211', }

Other options are listed here: http://search.cpan.org/~enrys/Apache-Session-Memcached/lib/Apache/Session/Memcached.pm.