Thursday, November 12, 2009

FreeRADIUS with MySQL cluster

About:
This is all about deploying FreeRADIUS with MySQL cluster, understand about FreeRADIUS deployment options with MySQL cluster for high availability ease of database management.

Overview:
Few months ago, I was working on FreeRADIUS integration with MySQL cluster to provide a better alternative for high availability and scalability of the data store. The same is available as white paper for some time now, and the white papers are "The deployment of FreeRADIUS with MySQL cluster" and on "Strategy Guide for Building Highly Scalable & Available AAA Services".

Look here for how to configure MySQL cluster, or configure FreeRADIUS with mysql cluster database. Since the integration of FreeRADIUS with MySQL cluster and testing of the same is also carried out, this document highlights some of those areas too.

As well I ported the FreeRADIUS on Solaris 10, as I used Solaris Containers to simulate multiple systems as required. However I used 3 systems running Solaris 10 on it. The same could be used with Linux too, however we have to carefully manage co-location of MySQL clusters SQL node, Management node, and FreeRADIUS application itself.

Since mysql cluster needs minimum of 3 nodes for providing high availability of the data being stored. The stored data on both the nodes is replicated synchronously across the nodes, a third node is used as management node which also offers quorum vote in the event of node failure and also does the management of mysql cluster. This third node could be used to host the application as well as MySQL server. It becomes more easy if we have multiple systems, or multiple OS environments (high level abstraction providing virtual independent system) / solaris containers will ease the job.

When FreeRADIUS receives any request from it's clients either for authentication, authorization or accounting it looks up at it's configured data store option and sends the appropriate request to fetch the data from the data store. Based on the response from the data store FreeRADIUS takes the appropriate step. However since FreeRADIUS works with MySQL, it does lookup on the indexed columns which is very good for mysql cluster, this does not result in the any changes to FreeRADIUS data store mysql module, however there are few changes that are documented in the white paper for configuring the same. Once the request is landed on the mysql cluster either of data node would serve the request via SQL node (MySQL server).

Note: I ported the FreeRADIUS on Solaris, will share the learning of the same in my subsequent post.

Acknowledgment:
I would like to thank Alan Dekok for his help to walk me through the high level architecture and working of the modules and options available with FreeRADIUS.

FreeRADIUS with MySQL cluster

About: This is all about deploying FreeRADIUS with MySQL cluster , understand about FreeRADIUS deployment options with MySQL cluster for h...