Mailing List Archive

Forwarding a request based on file name not load
Hi,

I need to forward request using the Direct Routing method to a server.
However I determine which server to send the request to depending on the
file it has requested in the HTTP GET not based on it's load. For this I am
going to have to modify LVS to suite my requirements.

I am stuck on one design issue I was hoping someone could help me out with.
I cannot determine which machine to forward the request to untill I have
done a full TCP handshake with the client and recieved the packet containing
the real request. At this point I know which server to forward the request
to however the client has already esatblished a TCP connection to me but I
really want it to have a TCP connection with the server that has the file.
Any ideas?

Thanks in advance!!
Re: Forwarding a request based on file name not load [ In reply to ]
On Mon, 25 Dec 2000, Sean wrote:

> Hi,
>
> I need to forward request using the Direct Routing method to a server.
> However I determine which server to send the request to depending on the
> file it has requested in the HTTP GET not based on it's load. For this I am

Use LVS to balance the load among several servers set up to reverse-proxy
your real-servers, set up the proxy servers to load-balance to
real-servers based upon content.
--
Michael Brown
Re: Forwarding a request based on file name not load [ In reply to ]
Michael E Brown wrote:
>
> On Mon, 25 Dec 2000, Sean wrote:
>
> > Hi,
> >
> > I need to forward request using the Direct Routing method to a server.
> > However I determine which server to send the request to depending on the
> > file it has requested in the HTTP GET not based on it's load. For this I am
>
> Use LVS to balance the load among several servers set up to reverse-proxy
> your real-servers, set up the proxy servers to load-balance to
> real-servers based upon content.
> --

On the LVS servers you can run apache with mod_proxy comiled in, then
redirect traffic with it.
Example

ProxyPass /files/downloads/ http://internaldownloadserver/ftp/
ProxyPass /images/ http://internalimagesserver/images/

more on Proxy pass:
http://www.linuxfocus.org/English/March2000/article147.html

or you can use mod_rewrite, in that case, your REAL servers should be
reachable from the net.

there is also a transparent proxy module for apache
http://www.stevek.com/projects/mod_tproxy/

Merry XMAS



--
Atif Ghaffar
Internet Development Manager
4unet AG/SA

-------------------------.
+41 78 787 51 45 ¦ voice
+41 24 441 09 03 ¦ fax
http://www.4unet.net ¦ www
http://atif.developer.ch ¦ homepage
atif.ghaffar@4unet.net ¦ email

Do you speak Unix?