Detail reader concurrency

Nathan Ward lists+freeradius at daork.net
Mon May 21 13:41:11 CEST 2018



> On 21/05/2018, at 1:14 PM, Alan DeKok <aland at deployingradius.com> wrote:
> 
> 
>> I have considered a detached subrequest, and relaying to the slow backend server immediately and not using the detail writer unless the backend is broken - but, I don’t want to respond to the client unless the data is either on the backend server, OR, is written to disk on the frontend.
>> I have also considered writing to many detail files based on some sort of hash, and having many readers.. but that is not very elegant.
> 
>  Nope.
> 
>  TBH, the only real solution here is to use the v4.0.x branch from github.  It's still a work in progress, but you can do things like:
> 
> 	parallel {
> 		redundant {
> 			radius1
> 			detail1
> 		}
> 		redundant {
> 			radius2
> 			detail2
> 		}
> 		redundant {
> 			radius3
> 			detail3
> 		}
> 		...
> 	}
> 
>  Where it (a) spawns 3 sub requests that run in parallel.  Then for each sub request, runs a "redundant" section.  That section tries to proxy to the home server (e.g. "radius1").  If that fails, it writes to a detail file specifically for that home server (e.g. "detail1").
> 
> You will still have to configure each back-end, along with the detail writers and readers.  But it *will* work.
> 
> And v4 also supports more than one packet outstanding at a time.  So it should be much better than v3 for this kind of configuration.

Got it, ok. I probably won’t jump to v4 right yet, but good to know there might be a way to make it work. I’ve had a need for this in the past and we just fell back to doing proxy with detail file fallback and accepting the latency in responding to the NAS. Once v4 is out I will see about testing the above and writing it up as an example, I can’t be the only person wanting to do it :-)

So, I found out overnight that the vendor of the slow backend server had left debug mode on, so, going to see if disabling it has fixed the latency.. hopefully don’t need to get too creative with solutions ! So, you know, “fix the not-freeradius thing” is probably the solution, heh.

Thanks for your comprehensive response :-)

--
Nathan Ward




More information about the Freeradius-Users mailing list