LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: lvs for special application

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: lvs for special application
From: Todd Lyons <tlyons@xxxxxxxxxx>
Date: Wed, 14 Dec 2005 10:55:26 -0800
Andrés Cañada wanted us to know:

>Once the cluster node gets the request it looks to apache configuration and 
>whatever to serve this request.
>So when a Director node receives a request for a special web application that 
>is only in one cluster node (for example node35) there should be something 
>inside it that send that request to a "special node" (not the next one if 
>it's using round robin, but the node35).

You should consider setting up a reverse proxy.  This is a machine that
sits in front of your apache boxen that examines urls and sends them to
various private apache servers, and sends the reply back.  The outside
world doesn't talk directly to the private apache servers.

In our case, we have several different machines that handle different
types of requests.  We have 3 rp's sitting in front of them getting load
balanced by two LVS boxen.  The load balanced rp's receive the GET or
POST from the outside world, examine it, and send the request to the
appropriate private machine, waits for the reply, and sends that to the
requesting client.

>Sorry by this stupid annoying question.

It's not stupid, it's just not quite seeing the whole picture.  The best
way to learn is to fight a problem for a while and then figure out it.
Usually you find that some assumption you made led you down the wrong
path.  In your case, you just needed to be told that LVS balances by
IP:port only, it doesn't examine the content that's traveling on that
port.  For that you need an application layer solution, which Apache's
reverse proxying modules handle beautifully (after you figure out the
cryptic proxying scripting :-).
-- 
Regards...              Todd
we're off on the usual strange tangents.  next will be whether
it is ethical to walk in your neighbor's open house if they're
running ipv6:-).                                  --Randy Bush
Linux kernel 2.6.12-12mdksmp   2 users,  load average: 0.05, 0.05, 0.04

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