Virtual hosts, existing apache and some more
marksmith at danga.com
Mon Mar 14 15:12:09 PST 2005
> I use a few virtualhosts now. Depending on (part of the) hostname requests
> go to different backend mod_perl apaches. I would like to use Perlbal to
> balance the connections to the backend servers, but since I really need the
> frontends virtualhosts the setup would be:
> frontend apache -> perlbal -> mod_perl
> But thats looks rather silly. Any suggestions? (Besides using real ipnumbers in
> stead of virtualhosts)
LiveJournal uses a BIG-IP hardware load balancer in front of the Perlbals
in order to split requests by hostname. We then define different ports on
Perlbal to go to diferrent sets of backend nodes.
There's no way right now to say "this hostname goes to this service", but
that's not a terribly difficult thing to do. Hmm, it could probably be
added fairly easily.
> In the oscon2004 presentation (which is quite readable even without the talk :)
> there is a example of a GET request for a FotoBilder image. (http://www.danga.com/words/2004_oscon/oscon2004.pdf, page 50 on my pdfreader)
> The requests goes like this:
> perlbal -> mod_perl -> mogile tracker -> redirects to a storage node via
> perlbal -> serving of the actual image by perlbal.
> This does look like quite a lot of work for a simple image :)
> Do 'last-modified' headers get added to the reply somewhere so a client will
> cache it, or does the livejournal setup do that somewhere?
Lot of work, but we do set last-modified dates -- when the MogileFS storage
node (really a Perlbal in web_server mode with put/delete turned on)
returns the file, it adds a Last-Modified header. LiveJournal/FotoBilder
just pass it on to the user.
> (Hmm, I see wikipedia uses it between squid and mod_perl...)
Yep, last I heard they're using it to balance among the mod_perls.
> [...] mogile [...]
And for your MogileFS questions, you should email the MogileFS mailing
list. I'd be happy to answer any questions asked there. :)
junior at danga.com
More information about the perlbal