See my inline comments.<br>
<br>
Regards,<br>
Paul<br><br><div><span class="gmail_quote">On Apr 8, 2005 1:08 PM, <b class="gmail_sendername">Greger V. Teigre</b> &lt;<a href="mailto:greger@teigre.com">greger@teigre.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">






<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 (<a href="http://10.0.0.2" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.0.0.2</a>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ser2 
(<a href="http://10.0.0.3" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.0.0.3</a>)</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></blockquote><div><br>
Our platform is 100% open source. Our load balancer is LVS. I have no
idea how it actually works. One if our engineers from RedHat set all
that networking stuff up and it's way beyond me.<br>
&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><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 <a href="http://10.0.0.2" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.0.0.2</a> and <a href="http://10.0.0.3" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">10.0.0.3</a> 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</div></blockquote><div><br>
That small patch will need a slight revision. We discovered through
further testing that that patch only fixed attempts to INSERT into the
location table. We didn't cover the UPDATE route, unfortunately. I
believe Andrew has that patch done and is testing it. So&nbsp; I'll
post it to serdev as soon as we know it works - possibly later today.<br>
&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div> 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 &quot;best&quot; 
solution would probably&nbsp;be to hope that Paul's</div></blockquote><div><br>
I fully agree. Replication at the sip proxy level, IMHO, is not a good
idea. From a purist point of view, replication is not a function of a
SIP router - nor should it be. It is a function of the database and we
believe that the MySQL replication is a better approach from a speed
and reliabilty point of view - not to mention that it simplifies the
tasks of the sip router.<br>
&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div> 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; &quot;Greger V. Teigre&quot; &lt;<a href="mailto:greger@teigre.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">greger@teigre.com</a>&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 
&quot;restricted IP&quot; NAT, I am<br>&gt;&gt; starting to find some acceptable 
solution.<br>&gt;&gt; Unfortunately, &quot;one-public-IP&quot; approach is not free from 
problems<br>&gt;&gt; also. If your SIP router inserts this &quot;one-public-IP&quot; 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; &quot;Greger V. Teigre&quot; 
&lt;<a href="mailto:greger@teigre.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">greger@teigre.com</a>&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 &quot;one public IP&quot; 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 &quot;keys&quot; 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; &quot;Greger V. 
Teigre&quot; &lt;<a href="mailto:greger@teigre.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">greger@teigre.com</a>&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==<a href="http://blah.netlogic.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">blah.netlogic.net</a>) {<br>&gt;&gt;&gt;&gt; 
add_rcv_param();<br>&gt;&gt;&gt;&gt; t_replicate(&quot;<a href="http://blah.netlogic.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">blah.netlogic.net</a>&quot;, 
&quot;999&quot;);<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:<a href="mailto:greger@teigre.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">greger@teigre.com</a>]<br>&gt;&gt;&gt;&gt; Sent: Tuesday, April 05, 2005 
7:49 AM<br>&gt;&gt;&gt;&gt; To: Matt Schulte; 
<a href="mailto:kramarv@yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">kramarv@yahoo.com</a><br>&gt;&gt;&gt;&gt; ! ; Cc: 
<a href="mailto:serusers@lists.iptel.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">serusers@lists.iptel.org</a><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:<a href="mailto:greger@teigre.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">greger@teigre.com</a>]<br>&gt;&gt;&gt;&gt;&gt; Sent: Saturday, April 02,! 
2005 1:33 AM<br>&gt;&gt;&gt;&gt;&gt; To: 
<a href="mailto:kramarv@yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">kramarv@yahoo.com</a><br>&gt;&gt;&gt;&gt;&gt; Cc: 
<a href="mailto:serusers@lists.iptel.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">serusers@lists.iptel.org</a><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; 
<a href="http://lists.iptel.org/pipermail/serusers/2005-January/014669.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.iptel.org/pipermail/serusers/2005-January/014669.html</a><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(&quot;usrloc&quot;, &quot;db_mode&quot;, 
2)<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
modparam(&quot;usrloc&quot;,<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
&quot;db_url&quot;,&quot;<a>sql://ser:heslo@192.168.25.163/ser</a>&quot;)<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(&quot;usrloc&quot;, &quot;db_mode&quot;, 
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 &quot;location&quot; 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; 
<a href="mailto:serusers@lists.iptel.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">serusers@lists.iptel.org</a><br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
<a href="http://lists.iptel.org/mailman/listinfo/serusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.iptel.org/mailman/listinfo/serusers</a><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; 
<a href="mailto:serusers@lists.iptel.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">serusers@lists.iptel.org</a><br>&gt;&gt;&gt;&gt;&gt;&gt; 
<a href="http://lists.iptel.org/mailman/listinfo/serusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.iptel.org/mailman/listinfo/serusers</a> <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; <a href="mailto:serusers@lists.iptel.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">serusers@lists.iptel.org</a> 
<a href="http://lists.iptel.org/mailman/listinfo/serusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.iptel.org/mailman/listinfo/serusers</a><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>

<br>_______________________________________________<br>Serusers mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.iptel.org/mailman/listinfo/serusers" target="_blank">http://lists.iptel.org/mailman/listinfo/serusers</a><br><br><br></blockquote></div><br>