rlm_redis module "patch"

Gabriel Blanchard gabe at teksavvy.ca
Wed Jan 12 21:20:16 CET 2011


Attached is two new modules. Apologies ahead of time for submitting this as a tgz.

rlm_redis allows you to connect and query a redis key-store database. Basically same idea as memcached except the keys don't expire if you allow them to.

http://redis.io/

rlm_redis requires a redis server instance and the hiredis libraries to be installed https://github.com/antirez/hiredis

Preferably redis should be running version 2.2 as it allows you to expire keys.

rlm_rediswho is a module that is similar to rlm_radwho, it obviously uses the rlm_redis module. What it does is that it basically "dumps" all the accounting data/sessions into this key store database. Once a user has so many sessions (defined by trim-count) rlm_radwho will start trimming out old data. If there is no update for said user for expiry-time, the redis server itself will expire the key.

I anticipate the rlm_redis module could be used for something else, since it is _considerably_ faster than any sql module (about 100,000 queries per second) . But I thought that this was perfect for a radwho module as it allows you to expire stale sessions automatically, therefore the db won't grow an insane amount.


Obviously this is all work in progress, but it appears to run stable. It compiles clean on my Mac but may need some configure script magic to make it a little more portable.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: redis.tgz
Type: application/octet-stream
Size: 65850 bytes
Desc: redis.tgz
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20110112/39cb972c/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001..txt
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20110112/39cb972c/attachment.txt>


More information about the Freeradius-Devel mailing list