<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Blue Coat ProxySG Appliances Load Balancing &amp; High Availability</title>
	<atom:link href="http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/</link>
	<description>technology, networking and IP telephony</description>
	<lastBuildDate>Tue, 07 Feb 2012 12:06:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Michael McNamara</title>
		<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/#comment-4964</link>
		<dc:creator>Michael McNamara</dc:creator>
		<pubDate>Wed, 05 Oct 2011 23:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.michaelfmcnamara.com/?p=272#comment-4964</guid>
		<description>Hi Russell,

As you probably know you can&#039;t achieve a true active/active configuration but you can get pretty close by utilizing a PAC file with the appropriate JavaScript. In my example script above I evaluate the fourth octet of the client IP address to make a decision regarding which proxy server to return. This helps provide some &quot;load-balancing&quot; between the clients but assures that the same client always queries the same proxy server - easier for troubleshooting and caching of site related information.

You can achieve redundancy by returning two proxy servers in the string. Internet Explore will try the first and if unable to connect will try the second.

&lt;pre&gt;return &quot;PROXY proxy.example.com:8080; DIRECT&quot;;&lt;/pre&gt;

In the example above I&#039;m using proxy.example.com but if that does not respond the browser will attempt a direct connection.

Good Luck!</description>
		<content:encoded><![CDATA[<p>Hi Russell,</p>
<p>As you probably know you can&#8217;t achieve a true active/active configuration but you can get pretty close by utilizing a PAC file with the appropriate JavaScript. In my example script above I evaluate the fourth octet of the client IP address to make a decision regarding which proxy server to return. This helps provide some &#8220;load-balancing&#8221; between the clients but assures that the same client always queries the same proxy server &#8211; easier for troubleshooting and caching of site related information.</p>
<p>You can achieve redundancy by returning two proxy servers in the string. Internet Explore will try the first and if unable to connect will try the second.</p>
<pre>return "PROXY proxy.example.com:8080; DIRECT";</pre>
<p>In the example above I&#8217;m using proxy.example.com but if that does not respond the browser will attempt a direct connection.</p>
<p>Good Luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russell</title>
		<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/#comment-4950</link>
		<dc:creator>Russell</dc:creator>
		<pubDate>Tue, 04 Oct 2011 06:56:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.michaelfmcnamara.com/?p=272#comment-4950</guid>
		<description>For one of my deployment, i want Active / Active configuration in two location Data center and Disaster recovery site. I don&#039;t have much idea about this scripting. Can you please give me some idea? DC and DR are not in same broadcast or multicast domain. I just saw your wpad conf and write mine.

will my below wpad conf work?



BackupRoute=&quot;DIRECT&quot;;
UseDirectForLocal=true;
function MakeIPs(){
this[0]=&quot;172.16.102.20&quot;;
this[1]=&quot;255.255.255.255&quot;;
this[2]=&quot;172.25.61.50&quot;;
this[3]=&quot;255.255.255.255&quot;;
this[4]=&quot;10.10.10.100&quot;;
}
DirectNames=new MakeNames();
cDirectNames=24;
cNodes=1;
function MakeProxies(){
this[0]=new Node(&quot;172.16.1.236:8080&quot;,0,1.000000);
}
Proxies = new MakeProxies();
function Node(name, hash, load){
 this.name = name;
 this.hash = hash;
 this.load = load;
 this.score = 0;
 return this;
}
function FindProxyForURL(url, host){
 var urlhash, ibest, bestscore, list, i, j;
 var DCVIP1 = &quot;PROXY 172.16.1.236&quot;;
 var DRVIP1 = &quot;PROXY 172.16.20.222&quot;;

 if (UseDirectForLocal &amp;&amp; isPlainHostName(host))
  return &quot;DIRECT&quot;;
 if (cDirectNames &gt; 0)
  for (i = 0; i  0)
  for (i = 0; i &lt; cDirectIPs; i += 2)
   if (isInNet(host, DirectIPs[i], DirectIPs[i+1]))
    return &quot;DIRECT&quot;;
 urlhash = HashString(url);
 for (i = 0; i &lt; cNodes; i++)
  Proxies[i].score = Proxies[i].load * Scramble(MakeInt(urlhash ^ Proxies[i].hash));

if ( (ipSubs[3] % 2) == 0 ) 
	{
            return DCVIP1 + &quot;:8080&quot;;
        } else 
	{
            return DRVIP1 + &quot;:8080&quot;;
        }

 list = &quot;&quot;;
 for (j = 0; j &lt; cNodes; j++) {
  for (bestscore = -1, i = 0; i  bestscore) {
    bestscore = Proxies[i].score;
    ibest = i;
   }
  }
  Proxies[ibest].score = -1;
  list = list + &quot;PROXY &quot; + Proxies[ibest].name + &quot;; &quot;;
 }
 list = list + BackupRoute;
 return list;
}
function HashString(url){
 var h = 0;
 var slashes = 0;
 for (var i = 0; i &lt; url.length; i++) {
  var c = url.charAt(i);
  if (c == &#039;/&#039;)
   slashes++;
  if (slashes &lt; 3)
   c = c.toLowerCase();
  h += (((h &amp; 0x1fff) &lt;&gt; 13) &amp; 0x7ffff)) + CharToAscii(c);
  h = MakeInt(h);
 }
 return h;
}
function Scramble(h){
 h += ((h &amp; 0xffff) * 0x1965) + ((((h &gt;&gt; 16) &amp; 0xffff) * 0x1965) &lt;&lt; 16) + (((h &amp; 0xffff) * 0x6253) &lt;&lt; 16);
 h = MakeInt(h);
 h += (((h &amp; 0x7ff) &lt;&gt; 11) &amp; 0x1fffff));
 return MakeInt(h);
}
var Chars =&quot; !\&quot;#$%&amp;\&#039;()*+,-./0123456789:;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{&#124;}~??????????????????????????????????????????????????????????????????a??????????????????????? &quot;;
function CharToAscii(c){
 return Chars.indexOf(c) + 32;
}
function MakeInt(x){
 if (x = 4294967296) {
  return x - 4294967296;
 }
 return x;
}</description>
		<content:encoded><![CDATA[<p>For one of my deployment, i want Active / Active configuration in two location Data center and Disaster recovery site. I don&#8217;t have much idea about this scripting. Can you please give me some idea? DC and DR are not in same broadcast or multicast domain. I just saw your wpad conf and write mine.</p>
<p>will my below wpad conf work?</p>
<p>BackupRoute=&#8221;DIRECT&#8221;;<br />
UseDirectForLocal=true;<br />
function MakeIPs(){<br />
this[0]=&#8221;172.16.102.20&#8243;;<br />
this[1]=&#8221;255.255.255.255&#8243;;<br />
this[2]=&#8221;172.25.61.50&#8243;;<br />
this[3]=&#8221;255.255.255.255&#8243;;<br />
this[4]=&#8221;10.10.10.100&#8243;;<br />
}<br />
DirectNames=new MakeNames();<br />
cDirectNames=24;<br />
cNodes=1;<br />
function MakeProxies(){<br />
this[0]=new Node(&#8220;172.16.1.236:8080&#8243;,0,1.000000);<br />
}<br />
Proxies = new MakeProxies();<br />
function Node(name, hash, load){<br />
 this.name = name;<br />
 this.hash = hash;<br />
 this.load = load;<br />
 this.score = 0;<br />
 return this;<br />
}<br />
function FindProxyForURL(url, host){<br />
 var urlhash, ibest, bestscore, list, i, j;<br />
 var DCVIP1 = &#8220;PROXY 172.16.1.236&#8243;;<br />
 var DRVIP1 = &#8220;PROXY 172.16.20.222&#8243;;</p>
<p> if (UseDirectForLocal &amp;&amp; isPlainHostName(host))<br />
  return &#8220;DIRECT&#8221;;<br />
 if (cDirectNames &gt; 0)<br />
  for (i = 0; i  0)<br />
  for (i = 0; i &lt; cDirectIPs; i += 2)<br />
   if (isInNet(host, DirectIPs[i], DirectIPs[i+1]))<br />
    return &quot;DIRECT&quot;;<br />
 urlhash = HashString(url);<br />
 for (i = 0; i &lt; cNodes; i++)<br />
  Proxies[i].score = Proxies[i].load * Scramble(MakeInt(urlhash ^ Proxies[i].hash));</p>
<p>if ( (ipSubs[3] % 2) == 0 )<br />
	{<br />
            return DCVIP1 + &quot;:8080&quot;;<br />
        } else<br />
	{<br />
            return DRVIP1 + &quot;:8080&quot;;<br />
        }</p>
<p> list = &quot;&quot;;<br />
 for (j = 0; j &lt; cNodes; j++) {<br />
  for (bestscore = -1, i = 0; i  bestscore) {<br />
    bestscore = Proxies[i].score;<br />
    ibest = i;<br />
   }<br />
  }<br />
  Proxies[ibest].score = -1;<br />
  list = list + &#8220;PROXY &#8221; + Proxies[ibest].name + &#8220;; &#8220;;<br />
 }<br />
 list = list + BackupRoute;<br />
 return list;<br />
}<br />
function HashString(url){<br />
 var h = 0;<br />
 var slashes = 0;<br />
 for (var i = 0; i &lt; url.length; i++) {<br />
  var c = url.charAt(i);<br />
  if (c == &#039;/&#039;)<br />
   slashes++;<br />
  if (slashes &lt; 3)<br />
   c = c.toLowerCase();<br />
  h += (((h &amp; 0x1fff) &lt;&gt; 13) &amp; 0x7ffff)) + CharToAscii(c);<br />
  h = MakeInt(h);<br />
 }<br />
 return h;<br />
}<br />
function Scramble(h){<br />
 h += ((h &amp; 0xffff) * 0&#215;1965) + ((((h &gt;&gt; 16) &amp; 0xffff) * 0&#215;1965) &lt;&lt; 16) + (((h &amp; 0xffff) * 0&#215;6253) &lt;&lt; 16);<br />
 h = MakeInt(h);<br />
 h += (((h &amp; 0x7ff) &lt;&gt; 11) &amp; 0x1fffff));<br />
 return MakeInt(h);<br />
}<br />
var Chars =&#8221; !\&#8221;#$%&amp;\&#8217;()*+,-./0123456789:;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~??????????????????????????????????????????????????????????????????a??????????????????????? &#8220;;<br />
function CharToAscii(c){<br />
 return Chars.indexOf(c) + 32;<br />
}<br />
function MakeInt(x){<br />
 if (x = 4294967296) {<br />
  return x &#8211; 4294967296;<br />
 }<br />
 return x;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Century</title>
		<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/#comment-964</link>
		<dc:creator>Century</dc:creator>
		<pubDate>Mon, 22 Jun 2009 13:05:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.michaelfmcnamara.com/?p=272#comment-964</guid>
		<description>Hy Michael,

you wrote &quot;If you wanted geographic redundancy you could alter the “return” statement like so;
&quot;PROXY 10.1.127.62:8080; 10.2.127.62:8080&quot;
In this case the browser will attempt to contact the proxy server at 10.1.127.62:8080 and if the browser is unable to contact that proxy it will then try the proxy server at 10.2.127.62:8080. You’ll need to make sure that you include the (semicolon) “;” between each proxy server.&quot;

How does the browser check that theres no proxy on 10.1.127.62. Does it check how long the proxy is unavaible or is it possible to check errors like http404 if the proxy is unavaiable ?

thanks
tom</description>
		<content:encoded><![CDATA[<p>Hy Michael,</p>
<p>you wrote &#8220;If you wanted geographic redundancy you could alter the “return” statement like so;<br />
&#8220;PROXY 10.1.127.62:8080; 10.2.127.62:8080&#8243;<br />
In this case the browser will attempt to contact the proxy server at 10.1.127.62:8080 and if the browser is unable to contact that proxy it will then try the proxy server at 10.2.127.62:8080. You’ll need to make sure that you include the (semicolon) “;” between each proxy server.&#8221;</p>
<p>How does the browser check that theres no proxy on 10.1.127.62. Does it check how long the proxy is unavaible or is it possible to check errors like http404 if the proxy is unavaiable ?</p>
<p>thanks<br />
tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael McNamara</title>
		<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/#comment-701</link>
		<dc:creator>Michael McNamara</dc:creator>
		<pubDate>Tue, 24 Mar 2009 22:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.michaelfmcnamara.com/?p=272#comment-701</guid>
		<description>Hi Dean,

There are a number of ways you could host the PAC file in a high availability fashion. You could placed the PAC file on two servers in a server farm that are front-ended by a Layer 7 load balancing switch. You could placed the PAC file on a Windows server that belongs to a Microsoft Cluster. 

In my case I&#039;m currently hosting the PAC file on my Intranet website. Since the Intranet is already in a high-availability configuration (two redundant Nortel Application Switch 2216s) it didn&#039;t cost me anything. If you already have a similar solution you might want to host the PAC file within that solution and save yourself the effort and cost of building out a dedicated solution.

Good Luck!</description>
		<content:encoded><![CDATA[<p>Hi Dean,</p>
<p>There are a number of ways you could host the PAC file in a high availability fashion. You could placed the PAC file on two servers in a server farm that are front-ended by a Layer 7 load balancing switch. You could placed the PAC file on a Windows server that belongs to a Microsoft Cluster. </p>
<p>In my case I&#8217;m currently hosting the PAC file on my Intranet website. Since the Intranet is already in a high-availability configuration (two redundant Nortel Application Switch 2216s) it didn&#8217;t cost me anything. If you already have a similar solution you might want to host the PAC file within that solution and save yourself the effort and cost of building out a dedicated solution.</p>
<p>Good Luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean Fuller</title>
		<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/#comment-700</link>
		<dc:creator>Dean Fuller</dc:creator>
		<pubDate>Tue, 24 Mar 2009 16:23:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.michaelfmcnamara.com/?p=272#comment-700</guid>
		<description>How do you get over the PAC file hosting being the single point of failure now?</description>
		<content:encoded><![CDATA[<p>How do you get over the PAC file hosting being the single point of failure now?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael McNamara</title>
		<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/#comment-237</link>
		<dc:creator>Michael McNamara</dc:creator>
		<pubDate>Wed, 03 Sep 2008 00:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.michaelfmcnamara.com/?p=272#comment-237</guid>
		<description>Thanks for the comment Jim.</description>
		<content:encoded><![CDATA[<p>Thanks for the comment Jim.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://blog.michaelfmcnamara.com/2008/08/blue-coat-proxysg-appliances-load-balancing-high-availability/#comment-236</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Wed, 03 Sep 2008 00:35:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.michaelfmcnamara.com/?p=272#comment-236</guid>
		<description>Thanks for the information this should really help me out!</description>
		<content:encoded><![CDATA[<p>Thanks for the information this should really help me out!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Served from: blog.michaelfmcnamara.com @ 2012-02-08 21:27:52 by W3 Total Cache -->
