[prev in list] [next in list] [prev in thread] [next in thread] 

List:       backhand-users
Subject:    [m_b_users] mod_rewrite, mass vhosting - not distributing?
From:       "Abe Schwartz" <sloween () hotmail ! com>
Date:       2002-03-14 4:35:35
[Download RAW message or body]

backhanders,

I've successfully installed mod_backhand 1.2.1 and am having some issues 
getting requests to distribute.

My setup -
Two linux (rh 6.2-based x86) boxes, running Apache/1.3.19

The primary machine (we'll call this one PRI) answers http requests on both 
the vhost virtual IP (210.x.x.1) and it's physical IP (210.x.x.70).

The secondary machine (called SEC) only listens for http on it's physical IP 
(210.x.x.71)

I planned on using the virtual IP (210.x.x.1) when it came time to scale, so 
as not to deal with DNS later on.

They both have a shared disk, and mount|serve pages from 
/home/htdocs/{alpha}/{domain} using mod_rewrite. They currently use 
round-robin DNS, and my intent is to replace this with a more intelligent 
mod_backhand.
The shared disk is mounted via the internal interface|IP of each of the two 
webserving boxes. This private network (192.168.0.0/24) is not on the 
internet.

[shared disk]
   |     |
   |     |
   |_____|   192.168.0.0/24
   |     |
[PRI]  [SEC]
   |     |
  [internet] 210.0.0.0/24

(Serving of pages via mod_rewrite currently works. I'm simplifying the 
example below to cut directly to the chase. For example, requests to 
prefix.domain.com are being pulled from /home/htdocs/d/domain.com/prefix, 
regardless of which server the request hits.)

From reading the docs, suggestions are made that broadcasts should be done 
on the internal network, (this section exists on both PRI and SEC's 
httpd.conf) e.g. -

<IfModule mod_backhand.c>
UnixSocketDir /var/backhand/backhand
MulticastStats 192.168.0.{ip} 192.168.0.255:4445
AcceptStats 192.168.0.0/24
</IfModule>

<NameVirtualHost {external ip}>
<VirtualHost {external ip}>
ServerName {PRI|SEC}
RewriteEngine on

<Files ~ "(\.htm|\.html)$">
    Backhand byLoad
    Backhand byAge
    Backhand byRandom
    Backhand byLogWindow
</Files>

[several RewriteMap, RewriteCond and RewriteRule directives]

VirtualDocumentRoot /home/htdocs/{alpha}/{domain}
</VirtualHost>

We'll assume the /backhand/ handler is also present. I am able to browse to 
either http://PRI/backhand/ or http://SEC/backhand/ and see both machines, 
as well as all their information.

The load of PRI is considerably higher than SEC. But for the life of me, I 
can't seem to get mod_backhand to pass the requests to SEC. I've also tried 
removing the <Files>-backhand section from SEC's httpd.conf.

Should I be doing the MulticastStats|AcceptStats on the external interfaces 
of PRI and SEC? Are the rewrites overriding mod_backhand's directives? I 
have the LoadModule|AddModule directives listed first before any other 
modules (though mod_backhand.c is preceded by ClearModuleList).

I'm not sure what to refer to next. Unfortunately, the primary mod_backhand 
lists aren't searchable, so I'm somewhat stuck. Can anyone offer any 
suggestions or had experience with a similar setup? Pointers to another FAQ 
or HOWTO would also be appreciated - I've read the docs on the site, as well 
as the PDFs from ApacheCon.

Please let me know if you need more details. I wanted to get to the core of 
the problem above without listing the full contents of every config file. ;)

Thanks very much for any assistance you can offer!

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


_______________________________________________
backhand-users mailing list
backhand-users@lists.backhand.org
http://lists.backhand.org/mailman/listinfo/backhand-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic