[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: Using different MySQL server with freeradius 3.x ?
From:       Alan DeKok <aland () deployingradius ! com>
Date:       2018-02-27 14:52:32
Message-ID: 7F258440-10C4-4933-9740-ECD6A38386C7 () deployingradius ! com
[Download RAW message or body]

On Feb 26, 2018, at 9:43 PM, philippe2.legoff@orange.com wrote:
> 
> With Freeradius 3.0.16, I store accountings in a MySQL 5.7 database. \
> Authorize_checks and replies are also using this db. As I receive more than 3000 \
> accountings/sec,  I search a way to reduce the load on the db.

  The main way to make DBs faster is to (a) not use the DB, or (b) batch up \
insertions, or (c) shard the data across multiple DBs.

> 1/ Does it possible to use different MySQL servers to store accountings  depending \
> on the Framed-IP-Address ? As an example, could I have this logic with FR :
> If Framed-IP-Address starts with "10"  Then use the MySQL1 server and store \
> accounting on it, If Framed-IP-Address starts with "171" then use the MySQL2 server \
> and store accounting on it

  Yes.

	if (Framed-IP-Address < 10/8) {
		sql1
	}
	elsif (Framed-IP-Address < 171/8) {
		sql2
	}

> Etc..
> 
> 
> 2/ Another point concerns the log.
> I have a huge quantity of lines in radius.log :
> Info: [sql] stop packet with zero session length….
> 
> Does it exist a way to drop silently these lines ?

  Yes.  At the top of the "accounting" section, do:

	if (Acct-Session-Time == 0) {
		ok
		return
	}

  Though if you're running 3.0.16, that message doesn't appear in the source or in \
the logs.

  Are you sure that you don't gave two copies of FreeRADIUS installed?  i.e. one \
which is v2, and another v3?

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic