LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Realserver selection based on URL

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Realserver selection based on URL
From: "Scott J. Henson" <scotth@xxxxxxxxxxxx>
Date: Wed, 20 Jul 2005 12:08:45 -0400
Tony Requist wrote:

We currently have a LVS configuration with 2 directors and a set of web
servers using LVS-DR and keepalived between the directors (and a set of
MySql servers also).  This is all working well using the standard RR
scheduling without persistence.

We will be adding functionality that will be storing data on some but not
all web servers.  For this, we need to be able to route requests to specific
web servers according to the URL.

Ideally I would generate URLs like:

    stuff.domain.com://KEY

and I could have a little code in LVS (or called from LVS) where I could
decode KEY to find that the data is on server A, B and C -- then have LVS
route to one of these three servers.

I've looked through the HOWTO and searched around but I have not been able
to find anything.

Any help would be appreciated.


I would personally use apache proxy statements on the servers that don't have the information. This will increase load slightly, but is probably the easiest. If you really want to go the LVS route, there are some issues, I believe. If my memory serves, the current version of LVS is a level 4 router and to do what you want, you would need a level 7 router. I have heard of some patches floating around to turn ip_vs into a level 7 router, but Ive not seen them personally, nor tried them.

<Prev in Thread] Current Thread [Next in Thread>