<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:st1 = 
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<META content="Microsoft Word 11" name=Originator><LINK 
href="cid:filelist.xml@01C53E70.B65A07E0" rel=File-List><LINK 
href="cid:editdata.mso" rel=Edit-Time-Data><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name="PersonName" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]--><!--[if !mso]>
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<![endif]-->
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US style="tab-interval: .5in" vLink=blue link=blue bgColor=white>
<DIV>Alex,</DIV>
<DIV>I'm not really knowledgable enough about anycast to say anything 
useful.&nbsp; The only is that in your described setup, I cannot really see how 
you get around the UA behind restricted (or worse) NAT.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; I have never tried to configure SER as a forking proxy, 
but I wouldn't be surprised if it was possible.</DIV>
<DIV>g-)</DIV>
<DIV>&nbsp;</DIV>
<DIV>---- Original Message ----<BR>From: Alex Vishnev<BR>To: 
serusers@lists.iptel.org<BR>Sent: Monday, April 11, 2005 02:30 PM<BR>Subject: RE: LVS, 
load balancing, and stickness was ==&gt; Re: [Serusers]<BR>moreusrloc 
synchronization <BR><BR>&gt; Greger and Paul,<BR>&gt; <BR>&gt; I think you 
understood me correctly regarding forking proxy. It is<BR>&gt; the proxy that 
will fork out the requests to all available peering<BR>&gt; proxies. This 
approach does not require stickiness based on Call-id.<BR>&gt; AFAIK, once the 
forking proxy receives an acknowledgement from one of<BR>&gt; its peers, then 
the rest of the session will be done directly to that<BR>&gt; peer without the 
use of the forking proxy. I am considering 2 <BR>&gt; approaches to resolve 
availability of forking proxy. 1 – using<BR>&gt; ANYCAST (good high level 
article:<BR>&gt; http://www.kuro5hin.org/story/2003/12/31/173152/86). 2 – using 
dns<BR>&gt; srv. I am still trying to determine if ANYCAST is a good solution 
for<BR>&gt; creating local RPs with forking proxy. However, I think that dns 
srv<BR>&gt; records can easily be implemented to allow simple round robin 
between<BR>&gt; multiple forking proxies. 
Thoughts?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&gt; <BR>&gt; Alex<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; From: 
serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org]<BR>&gt; On Behalf 
Of Greger V. Teigre <BR>&gt; Sent: Monday, April 11, 2005 4:47 AM<BR>&gt; To: 
kramarv@yahoo.com<BR>&gt; Cc: serusers@lists.iptel.org<BR>&gt; Subject: LVS, load 
balancing, and stickness was ==&gt; Re: [Serusers]<BR>&gt; more usrloc 
synchronization <BR>&gt; <BR>&gt; After my last email, I looked at ktcpvs and 
realized I ignored a<BR>&gt; couple of things: ktcpvs only supports tcp (http is 
obviously<BR>&gt; tcp-based, but I thought it supported udp for other 
protocols).&nbsp; I<BR>&gt; don't know how much work implementing udp would 
be.&nbsp;&nbsp; <BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Here is a discussion of SIP and 
LVS that I found useful (though<BR>&gt; not encouraging). <BR>&gt; 
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.services_that_dont_work_yet.html<BR>&gt; 
<BR>&gt; Paul: I'm starting to get really curious on the standard LVS<BR>&gt; 
components used for your stickiness!&nbsp; I'm not aware (also after<BR>&gt; 
searching now) of an LVS balancing mechanism that allows correct<BR>&gt; 
stickness on SIP udp...!&nbsp;&nbsp; <BR>&gt; And I found other too who are 
looking for it:<BR>&gt; 
http://archive.linuxvirtualserver.org/html/lvs-users/2005-02/msg00251.html<BR>&gt; 
<BR>&gt; My understanding is that ipvs must be extended (according to 
the<BR>&gt; developer) with a call-id based scheduler and that this work 
has<BR>&gt; several people willing to fund development, but that this has 
not(?)<BR>&gt; started yet.&nbsp; The problem is that ipvs is based on ip header 
analysis<BR>&gt; and extending the hashing algorithms to also include 
payload-based<BR>&gt; analysis is not straight-forward.&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&gt; g-)<BR>&gt; <BR>&gt;&gt; With regards to stickiness: Have you looked at 
ktcpvs?&nbsp; SIP is an<BR>&gt;&gt; "http-like" protocol and I'm pretty sure 
that you can use the<BR>&gt;&gt; http-based regex hashing to search for 
Call-Id.&nbsp; If you cannot use it<BR>&gt;&gt; right out of the box, I'm pretty 
sure the modifications are minimal.<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; The user 
location problem: With a cluster back-end, I also only<BR>&gt;&gt; see 
save_memory() as the only option.<BR>&gt;&gt; g-)<BR>&gt;&gt; <BR>&gt;&gt;&gt; 
"Greger V. Teigre" &lt;greger@teigre.com&gt; wrote:<BR>&gt;&gt;&gt;&gt; Greger, 
thanks a lot.<BR>&gt;&gt;&gt;&gt; The problem with load balancer is that replies 
goes to the wrong<BR>&gt;&gt;&gt;&gt; server due to rewriting outgoing a.b.c.d . 
BTW, as Paul pointed, if<BR>&gt;&gt;&gt;&gt; you define some dummy interface 
with Virtual IP (VIP), there is no<BR>&gt;&gt;&gt;&gt; need to rewrite outgoing 
messages (I tested this a little).<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; Yes, if you use LVS with direct routing or tunneling, that is 
what<BR>&gt;&gt;&gt; you experience.<BR>&gt;&gt;&gt; ===Of course. That why I 
implemented small "session" stickness.<BR>&gt;&gt;&gt; However, it causes 
additional internal traffic.<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt;&nbsp; What I 
described was a "generic" SIP-aware load balancer where SIP<BR>&gt;&gt;&gt; 
messages would be rewritten and stickiness implemented based on 
ex.<BR>&gt;&gt;&gt; UA IP address (or call-id like vovida's load 
balancer).<BR>&gt;&gt;&gt; ====Sure, it's better solution; I think we'll go this 
way soon (in<BR>&gt;&gt;&gt; our next version).<BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt; Why DNS approach is bad (except restricted NAT - let's say 
I am<BR>&gt;&gt;&gt;&gt; solving this)?<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; Well, 
IMO, DNS SRV in itself is not bad. It's just that many user<BR>&gt;&gt;&gt; 
clients do not support DNS SRV yet.&nbsp; Except that, I like the 
concept<BR>&gt;&gt;&gt; and it will give you a geographical redundancy and load 
balancing.<BR>&gt;&gt;&gt; ===I am trying to build the following 
architecture:<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; DNS (returns domain's public 
IP)-&gt;LVS+tunneling (Virtual IP)-&gt;ser<BR>&gt;&gt;&gt; clusters (with 
private IPs)<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt;&gt; 
<BR>&gt;&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;&gt; (MySQL 4.1 cluster)<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; I 
guess, Paul utilizes load-balancer scenario you have 
described.<BR>&gt;&gt;&gt;&gt; Believe there are only proprietary solutions 
for<BR>&gt;&gt;&gt;&gt; "the-replies-problem". We tried Vovida 
call-id-persistence package,<BR>&gt;&gt;&gt;&gt; unfortunately it didn't work 
for us.<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; Are you referring to the load balancer 
proxy? IMHO, the SIP-aware<BR>&gt;&gt;&gt; load balancer makes things a bit 
messy.&nbsp; It sounds to me that the<BR>&gt;&gt;&gt; LVS + tunneling/direct 
routing + virtual IP on dummy adapter is a<BR>&gt;&gt;&gt; better 
solution.<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; In my configuration I use shared 
remote DB cluster (with<BR>&gt;&gt;&gt;&gt; replication). Each ser see it as 
one-public-IP (exactly the<BR>&gt;&gt;&gt;&gt; approach you named for SIP). May 
be it's good idea to use local DB<BR>&gt;&gt;&gt;&gt; clusters, but if you have 
more than 2 servers your replication<BR>&gt;&gt;&gt;&gt; algorythm gonna be 
complex. Additional problem - it still doesn't<BR>&gt;&gt;&gt;&gt; solve usrloc 
synchronization - you still have to use<BR>&gt;&gt;&gt;&gt; t_replicate()... 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; I'm not sure if I 
understand.<BR>&gt;&gt;&gt; ===Oh, probably I expressed myself not well 
enough...<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; So, you have 2 servers at two 
location, each location with a shared<BR>&gt;&gt;&gt; DB and then replication 
across an IPsec tunnel??<BR>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; IMHO, mysql 
3.23.x two-way replication is quite shaky and<BR>&gt;&gt;&gt; dangerous to rely 
on.&nbsp; With no locking, you will easily get<BR>&gt;&gt;&gt; overwrites and 
you have to be very sure that your application<BR>&gt;&gt;&gt; doesn't mess up 
the DB.&nbsp; I haven't looked at mysql 4.1 clustering,<BR>&gt;&gt;&gt; but from 
the little I have seen, it looks good. Is that what you<BR>&gt;&gt;&gt; use? 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; ===We have 2 or more servers with MysQL 4.1 
virtual server (clusters<BR>&gt;&gt;&gt; balanced by LVS). We use MySQL for 
maintaining subscribers'<BR>&gt;&gt;&gt; accounts, not for location. User 
location is still in-memory only<BR>&gt;&gt;&gt; so far. I am afraid I have to 
switch to ser 09 in order to use<BR>&gt;&gt;&gt; save_memory (thanks Paul!) and 
forward_tcp() for replication.<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt;&gt; With regard 
to t_replicate() - it doesn't work for more than 2<BR>&gt;&gt;&gt;&gt; servers, 
so I used exactly forward_tcp() and save_noreply() (you're<BR>&gt;&gt;&gt;&gt; 
absolutely right - this works fine so far); all sers are happy. 
Of<BR>&gt;&gt;&gt;&gt; course, this causes additional traffic. Interesting 
whether Paul's<BR>&gt;&gt;&gt;&gt; FIFO patch reduces traffic between 
sers?<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; I believe Paul uses forward_tcp() and 
save_memory() to save the<BR>&gt;&gt;&gt; location to the replicated server's 
memory, while the<BR>&gt;&gt;&gt; save("location") on the primary server will 
store to the DB (which<BR>&gt;&gt;&gt; then replicates on the DB 
level).<BR>&gt;&gt;&gt; g-)<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; Do you 
Yahoo!?<BR>&gt;&gt;&gt; Yahoo! Small Business - Try our new resources 
site!<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; 
_______________________________________________<BR>&gt; Serusers mailing 
list<BR>&gt; serusers@lists.iptel.org<BR>&gt; 
http://lists.iptel.org/mailman/listinfo/serusers</DIV></BODY></HTML>