<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hi Tina,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt; I enjoy reading your posts, thanks a lot for the great work you 
are<BR>&gt; doing for ser users!&nbsp;<BR></DIV>
<DIV>Thanks :-)</DIV>
<DIV>&nbsp;<BR>&gt; I am going to consider that kind of scenario as well (load 
balancer<BR>&gt; returning Virtual IP address). I think for such configuration 
server<BR>&gt; side has to keep session information and always forward a call to 
the<BR>&gt; right server.&nbsp;&nbsp;&nbsp;<BR></DIV>
<DIV>I believe the load balancer can be in front and&nbsp;transparantly 
translate addresses in the SIP messages:</DIV>
<DIV>User agent always sees a.b.c.d</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|</DIV>
<DIV>Load balancer with public IP a.b.c.d</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|</DIV>
<DIV>ser1 (10.0.0.2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ser2 
(10.0.0.3)</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>Paul: You have a similar load-balancing solution, right? Do you use a 
commerical load balancer that you can reveal the name of? :-)</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>The load balancer need to understand SIP (sort of) and use something (ex. 
IP address of user agent) to select SER server to send to and rewrite incoming 
to 10.0.0.2 and 10.0.0.3 respectively and outgoing to a.b.c.d.&nbsp; ser1 and 
ser2 will happily believe they are alone and communicate directly with user 
agent using their own private addresses.&nbsp; Both should know about all users 
(usrloc).&nbsp; Paul just recently posted a small patch for a setup where they 
use two-way replication between two mysql servers and where each SER instance 
will save all REGISTERs it receives from user agents, but only save to memory 
those replicated from the other SER peer. Klaus pointed out that the same can be 
done by not doing mysql replication, but have one DB for each SER and just use 
t_replicate() and save_noreply() (for two servers, for more than two you need to 
use forward_tcp()).</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have heard complaints that&nbsp;this approach will generate too much 
network traffic. Also, t_replicate()&nbsp;does not guarantee delivery of the 
replication (forward_tcp is better, but not fool proof).&nbsp; So, the "best" 
solution would probably&nbsp;be to hope that Paul's recent TCP/UDP patch for 
network access to FIFO commands get included in the CVS. Then, a new replication 
module should use XMLRPC or whatever protocol the patch is using to forward (in 
a guaranteed mode) the usrloc information, which then would be injected directly 
into SER's memory, just like save() would, and of course&nbsp;in whatever 
db_mode you would like.&nbsp; The replicaton module would have to keep a queue 
(of course, flushed to a DB or something) in case of network problems, so that 
the replication would be done (sooner or later) regardless of problems.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Of course, this is a major undertaking, so for most 
replication scenarioes, I would think the forward_tcp() + save_noreply() would 
work just fine.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; </DIV>
<DIV>g-)</DIV>
<DIV><BR>&gt; "Greger V. Teigre" &lt;greger@teigre.com&gt; wrote:<BR>&gt; I was 
thinking about a load balancing scenario where the load<BR>&gt; balancer will 
replace the IP addresses. <BR>&gt; g-)<BR>&gt; <BR>&gt; ---- Original Message 
----<BR>&gt; From: Tina<BR>&gt; To: Greger V. Teigre<BR>&gt; Sent: Wednesday, 
April 06, 2005 09:45 PM<BR>&gt; Subject: Re: [Serusers] still no help - usrloc 
synchronization<BR>&gt; <BR>&gt;&gt; Thank you for givingme the scenario with 
"restricted IP" NAT, I am<BR>&gt;&gt; starting to find some acceptable 
solution.<BR>&gt;&gt; Unfortunately, "one-public-IP" approach is not free from 
problems<BR>&gt;&gt; also. If your SIP router inserts this "one-public-IP" into 
the VIA<BR>&gt;&gt; header, the reply routing goes via wrong SIP 
server...<BR>&gt;&gt; If your SIP server inserts its real-IP-address - the 
scenario<BR>&gt;&gt; mentioned above is still not resolved.<BR>&gt;&gt; Any 
comments?<BR>&gt;&gt; Tina<BR>&gt;&gt; <BR>&gt;&gt; "Greger V. Teigre" 
&lt;greger@teigre.com&gt; wrote:<BR>&gt;&gt; See inline.<BR>&gt;&gt; 
<BR>&gt;&gt;&gt; If you use DNS server for load balancing... the client receives 
one<BR>&gt;&gt;&gt; of your domain IP addresses according to SRV. I don't see 
the<BR>&gt;&gt;&gt; problem <BR>&gt;&gt;&gt; with a call here, cause UAC asks t! 
he address only once (before<BR>&gt;&gt;&gt; sending INVITE). UAC already has 
the IP for BYE/reINVITEs. So why<BR>&gt;&gt;&gt; would you replicate 
INVITEs?<BR>&gt;&gt; <BR>&gt;&gt; I would never replicate INVITEs, I would just 
make sure that they are<BR>&gt;&gt; proxied through the correct SER server (i.e. 
IP).<BR>&gt;&gt; <BR>&gt;&gt; The problems depends on your setup. If you have 
SERs with different<BR>&gt;&gt; IPs, ex UA1 has registered with server&nbsp; A 
and UA2 has registered with<BR>&gt;&gt; server B: If UA2 wants to call UA1 and 
UA is behind an IP restricted<BR>&gt;&gt; NAT, server A is stored in the NAT 
table of the NAT in front of UA1.<BR>&gt;&gt; If server B sends an INVITE to 
UA1, the INVITE will be refused by<BR>&gt;&gt; UA1's 
NAT.<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; This is why a "one public IP" in front 
of a load balancing<BR>&gt;&gt; cluster probably is a good way to 
go.<BR>&gt;&gt; <BR>&gt;&gt;&gt; If you use IPVS/LVS... I believe you can force 
SER to insert it's<BR>&gt;&gt;&gt; public IP into VIA,! so there is no problem 
with replies. With<BR>&gt;&gt;&gt; regard <BR>&gt;&gt;&gt; to another requests, 
I believe load balancer keeps connection<BR>&gt;&gt;&gt; template, then when 
another request comes it would be forwarded to<BR>&gt;&gt;&gt; the same 
ser.<BR>&gt;&gt; <BR>&gt;&gt; Yes. There are different "keys" to use to load 
balance SIP messages.<BR>&gt;&gt; One good way from a NAT point of view is to 
use originating IP<BR>&gt;&gt; address.&nbsp; What you must remember is that the 
problem is not on the<BR>&gt;&gt; server side, but on the client side.&nbsp; The 
NAT will in many situations<BR>&gt;&gt; stop incoming UDP packets if the 
originating ip:port is not already<BR>&gt;&gt; stored in the NAT table.&nbsp; 
The Via header does not matter for the NAT.<BR>&gt;&gt; g-)<BR>&gt;&gt; 
<BR>&gt;&gt;&gt; Any comments?<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; "Greger V. 
Teigre" &lt;greger@teigre.com&gt; wrote:<BR>&gt;&gt;&gt; Yes, I believe that is 
so. But still you get a problem if the NAT is<BR>&gt;&gt;&gt; restricted, 
port-restricted or symmetric... The best would be to<BR>&gt;&gt;&gt; 
load&gt;&gt; balance and always make sure that a given client is 
handled<BR>&gt;&gt;&gt; through a given <BR>&gt;&gt;&gt; SER (REGISTER and 
INVITEs). That includes forwarding INVITEs from<BR>&gt;&gt;&gt; one 
<BR>&gt;&gt;&gt; SER to<BR>&gt;&gt;&gt; another... OR you must load balance in 
front of your servers with<BR>&gt;&gt;&gt; one <BR>&gt;&gt;&gt; 
common<BR>&gt;&gt;&gt; public IP.<BR>&gt;&gt;&gt; g-)<BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; Matt Schulte wrote:<BR>&gt;&gt;&gt;&gt; Ack, I didn't even 
think about NAT. Would these be added before it<BR>&gt;&gt;&gt;&gt; gets sent 
off to the second proxy? ie:<BR>&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; if 
(!src_ip==blah.netlogic.net) {<BR>&gt;&gt;&gt;&gt; 
add_rcv_param();<BR>&gt;&gt;&gt;&gt; t_replicate("blah.netlogic.net", 
"999");<BR>&gt;&gt;&gt;&gt; };<BR>&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; 
-----Original Message-----<BR>&gt;&gt;&gt;&gt; From: Greger V. Teigre 
[mailto:greger@teigre.com]<BR>&gt;&gt;&gt;&gt; Sent: Tuesday, April 05, 2005 
7:49 AM<BR>&gt;&gt;&gt;&gt; To: Matt Schulte; 
kramarv@yahoo.com<BR>&gt;&gt;&gt;&gt; ! ; Cc: 
serusers@lists.iptel.org<BR>&gt;&gt;&gt;&gt; Subject: ! Re: [Serusers] still no help - 
usrloc synchronization<BR>&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt; Well, you still have the NAT issues unless you do load 
balancing<BR>&gt;&gt;&gt;&gt; and your<BR>&gt;&gt;&gt;&gt; SER servers have the 
same public IP.<BR>&gt;&gt;&gt;&gt; Have you looked at 0.9.0 nathelper function 
add_rcv_param() ? It<BR>&gt;&gt;&gt;&gt; will add received info to the contact 
header for the other SER to<BR>&gt;&gt;&gt;&gt; process. Haven't really tried 
yet...<BR>&gt;&gt;&gt;&gt; g-)<BR>&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; Matt 
Schulte wrote:<BR>&gt;&gt;&gt;&gt;&gt; I'm starting to lean this direction, 
using t_replicate and all. I<BR>&gt;&gt;&gt;&gt;&gt; could never get usrloc (db 
mode) to function properly..<BR>&gt;&gt;&gt;&gt;&gt; t_replicate 
is<BR>&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt; a dirty but very effective 
workaround.<BR>&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt; -----Original 
Message-----<BR>&gt;&gt;&gt;&gt;&gt; From: Greger V. Teigre 
[mailto:greger@teigre.com]<BR>&gt;&gt;&gt;&gt;&gt; Sent: Saturday, April 02,! 
2005 1:33 AM<BR>&gt;&gt;&gt;&gt;&gt; To: 
kramarv@yahoo.com<BR>&gt;&gt;&gt;&gt;&gt; Cc: 
serusers@lists.iptel.org<BR>&gt;&gt;&gt;&gt;&gt; Subject: Re: [Serusers] still ! no 
help - usrloc synchronization<BR>&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt; Have a look at this thread:<BR>&gt;&gt;&gt;&gt;&gt; 
http://lists.iptel.org/pipermail/serusers/2005-January/014669.html<BR>&gt;&gt;&gt;&gt;&gt; 
g-)<BR>&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt; Java Rockx 
wrote:<BR>&gt;&gt;&gt;&gt;&gt;&gt; Tina,<BR>&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt; I thought I saw you post the other day that you did 
not want to<BR>&gt;&gt;&gt;&gt;&gt;&gt; use t_replicate(), however, this is 
probably your best bet to<BR>&gt;&gt;&gt;&gt;&gt;&gt; getting 
this<BR>&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt; to work, 
IMHO.<BR>&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt; 
Regards,<BR>&gt;&gt;&gt;&gt;&gt;&gt; Paul<BR>&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt; On Apr 1, 2005 4:08 PM, Tina 
wrote:<BR>&gt;&gt;&gt;&gt;&gt; ! &gt;&gt;<BR>&gt;&gt;&gt;&gt;&gt;&gt; ! ;&gt; 
Hi, please help me, I'm stuck with it!!!!!<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; I am 
trying to set up several sers with a shared MySQL 
database<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; for location 
service.<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; I set 
in each ser.cfg:<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; modparam("usrloc", "db_mode", 
2)<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
modparam("usrloc",<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
"db_url","sql://ser:heslo@192.168.25.163/ser")<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; and the servers are not 
synchronized.<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; The I 
set<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; modparam("usrloc", "db_mode", 
2)<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; made UAC (Xlite) register to one of the 
servers.<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; I see it via usrloc, but there is no 
record in "location" mySQL<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; table....So others do 
not see the client and I'm unable to make<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
calls....<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; Please help how to work with usrloc and 
mySQL...<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
Tina,<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; software 
engineer<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
________________________________<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; Do you 
Yahoo!?<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; Better first dates. More second dates. 
Yahoo! Personals<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
_______________________________________________<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
Serusers mailing list<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
serusers@lists.iptel.org<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
http://lists.iptel.org/mailman/listinfo/serusers<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt;&gt;&gt; 
_______________________________________________<BR>&gt;&gt;&gt;&gt;&gt;&gt; 
Serusers mailing list<BR>&gt;&gt;&gt;&gt;&gt;&gt; 
serusers@lists.iptel.org<BR>&gt;&gt;&gt;&gt;&gt;&gt; 
http://lists.iptel.org/mailman/listinfo/serusers <BR>&gt;&gt;&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt;&gt; 
_______________________________________________<BR>&gt;&gt;&gt;&gt;&gt; Serusers 
mailing list<BR>&gt;&gt;&gt;&gt;&gt; serusers@lists.iptel.org 
http://lists.iptel.org/mailman/listinfo/serusers<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; Yahoo! 
Messenger<BR>&gt;&gt;&gt; Show us what our next emoticon should look like. Join 
the fun.<BR>&gt;&gt; <BR>&gt;&gt; <BR>&gt;&gt; Do you Yahoo!?<BR>&gt;&gt; Better 
first dates. More second dates. Yahoo! Personals<BR>&gt; <BR>&gt; <BR>&gt; 
Yahoo! Messenger<BR>&gt; Show us what our next emoticon should look like. Join 
the fun.</DIV></BODY></HTML>