Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: mod_backhand: users

Index | Next | Previous | View Flat

rob at exitexchange

Jan 25, 2006, 1:57 PM

Views: 9350

I would really love to figure out how this directive is supposed to be

I'm setting up backhand, and I have set up a pair of servers to share
the load of the machine that's getting backhand on it.

(I'm already using mod_log_spread, presently I'll be setting up wackamole).

The problem I have, which I'm not sure will be solved until I get
wackamole going, is that doing backhand by proxy keeps my "main" server
too busy, because instead of just handling (too many) requests, It's
handling the same number, but also proxying some of them via backhand.
So when I discovered HTTPRedirectoToName, I thought, this is cool, I can
just redirect instead of proxy!

Only... it doesn't.

I have count1, count3, count4 boxen in my backhand cluster. count1 is
the "main" box that I'm trying to load balance. I want count1 to
redirect requests over to count3/count4 based on load, etc. So I have:

<LocationMatch "/backhanded/.+">

Backhand byAge 2
# Backhand removeSelf
Backhand byLoad

Backhand HTTPRedirectToName %1S.%1H

# Backhand HTTPRedirectToIP
BackhandLogLevel +netall,+mbcsall,+dcsnall
# BackhandLogLevel +dcsnall

Now, looking at the surface, this should work great. However:

[Wed Jan 25 13:42:31 2006] [notice] Func executed for (null)
[HTTPRedirectToName(%1S.%1H)] (3 -> 0)
[Wed Jan 25 13:42:31 2006] [notice] New server list: [ ]
[Wed Jan 25 13:42:31 2006] [notice] All funcs executed -> local

I went ahead and looked at the source of builtins.c. From what I can
tell, it takes the incoming Host: header and uses it to assemble a hostname.

HOWEVER, the logic in HTTPRedirectToName() says:
1. do hostname stuff with *ME*, first. (%1S.%1H) if the name matches
my actual hostname, never mind.
2. do hostname stuff with the server we selected to backhand to.
assemble a hostname out of server plus the domain, (%1S.%1H) and then
redirect to that host.

point 2 is what I was shooting for.

as far as point 1:
What?????? It will *always* match, and then clear the server list,
unless the request contains a Host: header that... what, refers to a
different machine? Is that even possible?

... Instead of seeing whom to redirect to and using HTTPRedirectToName()
to assemble a full hostname to send to, the logic says, if I am me, and
the Host: header is to me, then I don't backhand.

It falls off and prevents doing anything useful before the actual,
desired behavior: pick a host that's not me (if conditions are met) and
redirect to it (instead of proxying).

Have I completely missed the point of this directive, or used it wrong?

Or should I just wait until I get wackamole going and eliminate the
issue from that direction?

Thanks very much in advance.


backhand-users mailing list
backhand-users [at] lists

Subject User Time
HTTPRedirectoToName rob at exitexchange Jan 25, 2006, 1:57 PM
    Re: HTTPRedirectoToName jesus at omniti Jan 25, 2006, 2:16 PM
        Re: HTTPRedirectoToName rob at exitexchange Jan 25, 2006, 3:04 PM
            Re: HTTPRedirectoToName rob at exitexchange Jan 25, 2006, 5:30 PM
                Re: HTTPRedirectoToName jesus at omniti Jan 25, 2006, 5:35 PM

  Index | Next | Previous | View Flat

Interested in having your list archived? Contact Gossamer Threads
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.