[ic] question on mod_interchange socket closing (different from previous question)

John Young interchange-users@icdevgroup.org
Sun Nov 3 14:25:01 2002


Kevin wrote in response to Jeff Dafoe:

> Well, that's the idea.  Mod_interchange also has failover support for
> clustered environments, allowing Interchange to be taken offline on one
> machine while still allowing mod_interchange, on the same machine, to
> process requests via another machine.  It's not a lot of use, except if
> Interchange fails for some reason, but it's a start.

But perhaps a round-robin load-balancing option might be...

That's something I was thinking of a while ago in looking over your
mod_interchange code (and futiley struggling to write an Apache v2 mod
without documentation or C programming experience).  I'm thinking that it
would only be minor changes to perhaps:

* Have a config setting in httpd.conf of RoundRobin or somesuch,
  and list the hosts to be used (sort of like InterchangeServerBackup
  in a list context).
* Mod_interchange would just cycle through that list of hosts as
  it processed requests.

You could even introduce some sort of weighting factor if you wanted
to get clever, whereby hostA is handed twice as many requests as
hostB, or whatever.  Of course, it would be sweet if mod_ic was able
to determine server load a little more dynamically.  While I hate to see
application bloat, in this case I wonder about an IC config setting enabling
IC to reply to mod_interchange with a load average (like w provides),
and mod_interchange responding to that load average by dynamically
adjusting this proposed weighting factor.

The round-robin idea, even if static, might be a neat little enhancement.
That, combined with mod_interchange's existing ConnectTries and
ConnectRetryDelay, would be pretty good.  I'm not sure about session,
logging, and other issues, though.  And I worry about adding latency
for something that might only be useful in rare circumstances.

I'll be away until Friday, but I look forward to hearing what you think
about this.

Thanks for keeping mod_interchange in top shape, Kevin!

-John Young