<!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>After my last email, I looked at ktcpvs and realized I ignored a couple of 
things: ktcpvs only supports tcp (http is obviously tcp-based, but I thought it 
supported udp for other protocols).&nbsp; I don't know how much work 
implementing udp would be.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Here is a discussion of SIP and LVS that I found useful 
(though not encouraging).</DIV>
<DIV><A 
href="http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.services_that_dont_work_yet.html">http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.services_that_dont_work_yet.html</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>Paul: I'm starting to get really curious on the standard LVS components 
used for your stickiness!&nbsp; I'm not aware (also after searching now) of an 
LVS balancing mechanism that allows correct stickness on SIP udp...!</DIV>
<DIV>And I found other too who are looking for it:</DIV>
<DIV><A 
href="http://archive.linuxvirtualserver.org/html/lvs-users/2005-02/msg00251.html">http://archive.linuxvirtualserver.org/html/lvs-users/2005-02/msg00251.html</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>My understanding is that ipvs must be extended (according to the developer) 
with a call-id based scheduler and that this work has several people willing to 
fund development, but that this has not(?) started yet.&nbsp; The problem is 
that ipvs is based on ip header analysis and extending the hashing algorithms to 
also include payload-based analysis is not straight-forward. </DIV>
<DIV>g-)</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt; With regards to stickiness: Have you looked at ktcpvs?&nbsp; SIP is 
an<BR>&gt; "http-like" protocol and I'm pretty sure that you can use the<BR>&gt; 
http-based regex hashing to search for Call-Id.&nbsp; If you cannot use 
it<BR>&gt; right out of the box, I'm pretty sure the modifications are minimal. 
<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; The user location problem: With a cluster 
back-end, I also only<BR>&gt; see save_memory() as the only option. <BR>&gt; 
g-)<BR>&gt; <BR>&gt;&gt; "Greger V. Teigre" &lt;greger@teigre.com&gt; 
wrote:<BR>&gt;&gt;&gt; Greger, thanks a lot.<BR>&gt;&gt;&gt; The problem with 
load balancer is that replies goes to the wrong<BR>&gt;&gt;&gt; server due to 
rewriting outgoing a.b.c.d . BTW, as Paul pointed, if<BR>&gt;&gt;&gt; you define 
some dummy interface with Virtual IP (VIP), there is no<BR>&gt;&gt;&gt; need to 
rewrite outgoing messages (I tested this a little).<BR>&gt;&gt; <BR>&gt;&gt; 
<BR>&gt;&gt; Yes, if you use LVS with direct routing or tunneling, that is 
what<BR>&gt;&gt; you experience.<BR>&gt;&gt; ===Of course. That why I 
implemented small "session" stickness.<BR>&gt;&gt; However, it causes additional 
internal traffic.<BR>&gt;&gt; <BR>&gt;&gt;&nbsp; What I described was a 
"generic" SIP-aware load balancer where SIP<BR>&gt;&gt; messages would be 
rewritten and stickiness implemented based on ex.<BR>&gt;&gt; UA IP address (or 
call-id like vovida's load balancer).<BR>&gt;&gt; ====Sure, it's better 
solution; I think we'll go this way soon (in<BR>&gt;&gt; our next 
version).<BR>&gt;&gt; <BR>&gt;&gt;&gt; Why DNS approach is bad (except 
restricted NAT - let's say I am<BR>&gt;&gt;&gt; solving this)?<BR>&gt;&gt; 
<BR>&gt;&gt; Well, IMO, DNS SRV in itself is not bad. It's just that many 
user<BR>&gt;&gt; clients do not support DNS SRV yet.&nbsp; Except that, I like 
the concept<BR>&gt;&gt; and it will give you a geographical redundancy and load 
balancing.<BR>&gt;&gt; ===I am trying to build the following 
architecture:<BR>&gt;&gt; <BR>&gt;&gt; DNS (returns domain's public 
IP)-&gt;LVS+tunneling (Virtual IP)-&gt;ser<BR>&gt;&gt; clusters (with private 
IPs)<BR>&gt;&gt; <BR>&gt;&gt;&gt; <BR>&gt;&gt; <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&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;&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; 
DB<BR>&gt;&gt; (MySQL 4.1 cluster)<BR>&gt;&gt; <BR>&gt;&gt;&gt; I guess, Paul 
utilizes load-balancer scenario you have described.<BR>&gt;&gt;&gt; Believe 
there are only proprietary solutions for<BR>&gt;&gt;&gt; "the-replies-problem". 
We tried Vovida call-id-persistence package,<BR>&gt;&gt;&gt; unfortunately it 
didn't work for us.<BR>&gt;&gt; <BR>&gt;&gt; Are you referring to the load 
balancer proxy? IMHO, the SIP-aware<BR>&gt;&gt; load balancer makes things a bit 
messy.&nbsp; It sounds to me that the LVS<BR>&gt;&gt; + tunneling/direct routing 
+ virtual IP on dummy adapter is a better<BR>&gt;&gt; solution.<BR>&gt;&gt; 
<BR>&gt;&gt;&gt; In my configuration I use shared remote DB cluster 
(with<BR>&gt;&gt;&gt; replication). Each ser see it as one-public-IP (exactly 
the approach<BR>&gt;&gt;&gt; you named for SIP). May be it's good idea to use 
local DB clusters,<BR>&gt;&gt;&gt; but if you have more than 2 servers your 
replication algorythm gonna<BR>&gt;&gt;&gt; be complex. Additional problem - it 
still doesn't solve usrloc<BR>&gt;&gt;&gt; synchronization - you still have to 
use t_replicate()...<BR>&gt;&gt; <BR>&gt;&gt; <BR>&gt;&gt; I'm not sure if I 
understand.<BR>&gt;&gt; ===Oh, probably I expressed myself not well 
enough...<BR>&gt;&gt; <BR>&gt;&gt; So, you have 2 servers at two location, each 
location with a shared<BR>&gt;&gt; DB and then replication across an IPsec 
tunnel??<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; IMHO, mysql 3.23.x two-way 
replication is quite shaky and<BR>&gt;&gt; dangerous to rely on.&nbsp; With no 
locking, you will easily get<BR>&gt;&gt; overwrites and you have to be very sure 
that your application doesn't<BR>&gt;&gt; mess up the DB.&nbsp; I haven't looked 
at mysql 4.1 clustering, but from<BR>&gt;&gt; the little I have seen, it looks 
good. Is that what you use?<BR>&gt;&gt; <BR>&gt;&gt; ===We have 2 or more 
servers with MysQL 4.1 virtual server (clusters<BR>&gt;&gt; balanced by LVS). We 
use MySQL for maintaining subscribers' accounts,<BR>&gt;&gt; not for location. 
User location is still in-memory only so far. I am<BR>&gt;&gt; afraid I have to 
switch to ser 09 in order to use save_memory (thanks<BR>&gt;&gt; Paul!) and 
forward_tcp() for replication.<BR>&gt;&gt; <BR>&gt;&gt;&gt; With regard to 
t_replicate() - it doesn't work for more than 2<BR>&gt;&gt;&gt; servers, so I 
used exactly forward_tcp() and save_noreply() (you're<BR>&gt;&gt;&gt; absolutely 
right - this works fine so far); all sers are happy. Of<BR>&gt;&gt;&gt; course, 
this causes additional traffic. Interesting whether Paul's<BR>&gt;&gt;&gt; FIFO 
patch reduces traffic between sers?<BR>&gt;&gt; <BR>&gt;&gt; I believe Paul uses 
forward_tcp() and save_memory() to save the<BR>&gt;&gt; location to the 
replicated server's memory, while the<BR>&gt;&gt; save("location") on the 
primary server will store to the DB (which<BR>&gt;&gt; then replicates on the DB 
level).<BR>&gt;&gt; g-)<BR>&gt;&gt; <BR>&gt;&gt; <BR>&gt;&gt; <BR>&gt;&gt; 
<BR>&gt;&gt; <BR>&gt;&gt; Do you Yahoo!?<BR>&gt;&gt; Yahoo! Small Business - Try 
our new resources site!</DIV></BODY></HTML>