[Users] Register Replication Example

Lenir lenirsantiago at yahoo.com
Thu Mar 16 17:03:50 CET 2006


Thanks Andreas, this was really helpful.

I'm using radius based authentication, so no DB on my side. Would this still
be able to handle that?

What problems did you encounter when you were using this method?

Lenir

-----Original Message-----
From: Andreas Granig [mailto:andreas.granig at inode.info] 
Sent: Wednesday, March 15, 2006 1:07 PM
To: lenirsantiago at yahoo.com
Cc: users at openser.org
Subject: Re: [Users] Register Replication Example

Lenir wrote:
> Does anybody have any working configs/examples that they can share to get
> registration replication working?

We used replication for quite some time, but then switched to MySQL
cluster in combination with cacheless usrloc for scalability and
consistency reasons. However, replication works like follows:


if(method == "REGISTER") {
  # if replication from other SER nodes:
  if(src_ip =~ "192\.168\.100\..*") {
    save_noreply("location");
  }
  # if from UACs:
  else {
    # authorization and stuff like that goes here...
    # ...
    save("location");

    # replicate to other SER nodes:
    forward_tcp("192.168.100.10", 5060);
    forward_tcp("192.168.100.11", 5060);
    forward_tcp("192.168.100.12", 5060);
  }
  break;
}

That's it. Note that you will always have a small inconsistency if you
restart one of the nodes, even if you perform a mysql dump of locations
from another node just before startup.

Andy






More information about the Users mailing list