<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I think that Pound is more suitable for what you are trying to achieve.
Although I don't know if Pound can handle a 1000 domain/backend
combinations.<br>
No matter what you throw at it, 1000 stays a large number.<br>
<br>
Martin<br>
<br>
<br>
On 08/05/2010 04:33 PM, Tony Primerano wrote:
<blockquote
 cite="mid:AANLkTin1dpewNZUf1i9FUb7-FxKkE-JivNm_+WkjPbwX@mail.gmail.com"
 type="cite">I suspect what I am trying to do here falls outside of
Varnish's intended purpose but here is what I am trying to do...<br>
  <br>
Instead of using Varnish to cache content for a single site with
several backends,  I want to use it to allow me to serve existing sites
on different domains.   <br>
  <br>
For example I can run varnish on <a moz-do-not-send="true"
 href="http://test.com">test.com</a> and serve content from <a
 moz-do-not-send="true" href="http://example.com">example.com</a> using
this configuration.<br>
  <br>
backend test {<br>
  .host = "<a moz-do-not-send="true" href="http://example.com">example.com</a>";<br>
  .port = "80";<br>
}<br>
  <br>
sub vcl_recv {<br>
  set req.http.host = "<a moz-do-not-send="true"
 href="http://example.com">example.com</a>";<br>
  set req.backend = test;<br>
  return(pass);<br>
}<br>
  <br>
But what if I have 1000s of backends and I choose them based on the
domain that user's hit varnish with.   Is this something Varnish
handles or is it only intended to work with a handful of backends?<br>
  <br>
Also, it would be really cool if I could do something like this..  <br>
sub vcl_recv {<br>
  set req.http.host = "<a moz-do-not-send="true"
 href="http://example.com">example.com</a>";<br>
  set req.backend.host  = req.http.host;   <br>
  return(pass);<br>
}<br>
  <br>
I'm guessing backends are defined ahead of time for connection pooling
but maybe not.   <br>
  <br>
Anyway, this is long enough,  tell me if I would be nuts to try to do
this with Varnish and if so what would be better.   I'm tempted to
write my own proxy but that seems like such a waste.  :-)<br>
  <br>
Tony<br>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
varnish-misc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a>
<a class="moz-txt-link-freetext" href="http://lists.varnish-cache.org/mailman/listinfo/varnish-misc">http://lists.varnish-cache.org/mailman/listinfo/varnish-misc</a></pre>
</blockquote>
<br>
</body>
</html>