Re: Re: FreeRADIUS in failover - HA setup (question)(Arran Cudbard-Bell)
Aldo Zavala
aldo at cleartalk.net
Thu Jul 19 17:05:11 CEST 2012
Arran, many thanks for your reply. After read you reply I have two basic questions below:
1.- Although there are more options to achieve redundancy in MySQL I will choose either MySQL Cluster or MySQL Replication in which I believe (please
correct me any time if I am wrong) you have the option of have a floating IP address, all nodes will be master in Cluster, and Master/Slave combinations could be setup in Replication in any case I will always connect to one MySQL IP address so why would I need to call more than one instance of SQL module?
2.- Also, I think Sun (x86 or 64) with Solaris 10 OS will be my platform of choice for the MySQL Cluster or Replication setup, would you recommend me to compile the FreeRADIUS 3.0 (from Git), in other words:
- Is there any special document or list of tips to compile FreeRADIUS 3.0 it under Solaris 10?, I have seen many post of people having compilation issues.
- In general, is Solaris 10 a recommended platform to run FreeRADIUS 3.0 ?
Thanks again!
Aldo Zavala
----- Original Message -----
On 19 Jul 2012, at 01:11, Aldo Zavala wrote:
> Hi, everybody.
>
> I was reading the "Deploying FreeRADIUS with the MySQL Cluster Database" whitepaper downloaded from MySQL website, it mentions in "3.1 Deployment Topologies" section that MySQL cluster can be integrated with FreeRADIUS but it always mention FreeRADIUS to be installed in a single node, would be a way to setup FreeRADIUS to be also failover the same way MySQL is, and not run just in a single node always?
Yes. You use multiple instances of the SQL module and point them at different SQL nodes, the local node and then any other SQL node in the cluster.
You can then use the redundant construct to switch between them in case of failure:
redundant {
sql
sql_remote0
sql_remote1
sql_remoteN
}
The problem is (with 2.1x and 3.0) is that if all the connections in the SQL connection pool are down, the SQL module will only fail once its tried to establish a new connection and failed.
Only one thread can be modifying the contents of the connection pool at a given time because its protected by a mutex. Only one thread can try and open a new connection, and until that connection succeeds or fails all the other threads will block.
This causes a bottleneck where a bunch of threads block waiting for their turn to try and re-establish the connection before failing over. Because the server is largely stateless this happens on every request.
I believe a good fix would be to check the state of the pool and the mutex, and if were at 0 connections and the pool is locked, to fail instantly. I'll talk to Alan and see what he thinks, maybe it should be configurable.
If you're using SQL via a unix socket you should be fine, but as soon as you hit a remote server where you have to wait for the TCP connection to time out, I can almost guarantee that the server will just lock up completely.
So unlike the example above, i'd recommend you only specify one local node and one remote node. Or wait and we'll try and fix something for 3.0.
-Arran
>
> Note: Before reply saying that this question should be posted in MySQL forums please consider that I am not asking about MySQL configurations, I am asking about FreeRADIUS product, many thanks to everybody!
>
>
> Aldo Zavala
More information about the Freeradius-Users
mailing list