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

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] using LVS on the director with a local VIP directing to realserver ?

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


sylvain at easyrencontre

Apr 17, 2008, 8:52 AM

Post #1 of 9 (625 views)
Permalink
[lvs-users] using LVS on the director with a local VIP directing to realserver ?

Hi,

I'm not sure it's possible in fact, I explain.

I've a box on which I would like to run LVS for load balancing purpose
only + ldirectord for health check

Incoming traffic --> box + LVS : VIP 10.0.10.1 => lobalance to
10.0.2.150, 10.0.2.150

The box is not a router nor a loadbalancer, it as squid reverse proxy in
accelerator configuration.
The purpose of the LVS is to correct squid reverse proxy wrong weighted
loadbalancing.

I've something like :

ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.0.10.1:8081 rr
-> 10.0.2.151:80 Masq 0 0 0
-> 10.0.2.150:80 Masq 0 0 0

the box has also an incoming IP address 10.0.1.1

What I would like is to :

* incoming 10.0.1.1:80
* redirecting to local 0.0.10.1:8081

When I'm on the director, on DirectRouting, it doesn't work, I'm trying
on NAT...

Can it works?

Regards,
Sylvain.
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


jmack at wm7d

Apr 17, 2008, 9:02 AM

Post #2 of 9 (600 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

On Thu, 17 Apr 2008, Sylvain Viart wrote:

to answer the subject line

http://www.austintek.com/LVS/LVS-HOWTO/mini-HOWTO/LVS-mini-HOWTO.html#gotchas

as for the rest of your posting - I don't undertand what
you're doing. I don't know what "box" is for instance

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


sylvain at easyrencontre

Apr 17, 2008, 10:18 AM

Post #3 of 9 (600 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

Hi Joseph,

Joseph Mack NA3T a écrit :
> On Thu, 17 Apr 2008, Sylvain Viart wrote:
>
> to answer the subject line
>
> http://www.austintek.com/LVS/LVS-HOWTO/mini-HOWTO/LVS-mini-HOWTO.html#gotchas
>
Yes great, seems to answer my question.
> as for the rest of your posting - I don't undertand what
> you're doing. I don't know what "box" is for instance
a box is one physical server, sorry ;-)

But your link seems a good point. I'm going on.

Thanks,
Regards,
Sylvain.


_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


sylvain at easyrencontre

Apr 18, 2008, 2:28 AM

Post #4 of 9 (577 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

Hi,

Sylvain Viart a écrit :
>> to answer the subject line
>>
>> http://www.austintek.com/LVS/LVS-HOWTO/mini-HOWTO/LVS-mini-HOWTO.html#gotchas
>>
The above link is ok.

The link on the faq is broken ( May 2004: Joshua Goodall has figured out
how to have a director be a client with LVS-DR
<http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.realserver_director_as_client.html#director_as_client_in_LVS-DR>.),
the good one seems :

http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-DR.html#director_as_client_in_LVS-DR

From the faq link given by Joseph :
>
> To set up and test/run LVS, you need a minimum of 3 machines: client,
> director, realserver(s).
>
> From the outside, the LVS functions as one machine. The client cannot
> be one of the machines in the LVS (the director, or realserver). You
> need an outside client. If you try to access an LVS controlled service
> (eg http, smtp, telnet) from any of the machines in the LVS; access
> from the director will hang, access from a realserver will connect to
> the service locally, bypassing the LVS.
>
Effectively I want to do the following on the same physical server:

* Listen on public IP:80 with squid
* squid redirect in accelerator mode on a "virtual peer" hosted on
the same physical server => 10.0.10.1:8080
* LVS VIP is on the 10.0.10.1 wich is also the DIP?
o I'm not sure about this part...

Here is the current server private IP configuration:

eth1 Link encap:Ethernet HWaddr 00:20:ED:83:E6:3F
inet addr:10.0.1.1 Bcast:10.0.255.255 Mask:255.255.0.0

eth1:php- Link encap:Ethernet HWaddr 00:20:ED:83:E6:3F
inet addr:10.0.10.1 Bcast:10.0.255.255 Mask:255.255.0.0


What I would like to do:

1. incoming http resquest public_IP:80 (squid)
* using internal squid redirector to direct the http request
on 10.0.10.1:8080
2. LVS loabalance 10.0.10.1:8080 to some real server on 10.0.2.150:80
and more.
3. 10.0.2.150:80 reply to the squid (trough LVS loadblancer)
4. squid cache the page if any
5. squid return the reply on is public interface to the client

The goal it to embed the loadbalancer on the same physical server.

Public IP :80
____|_____
| |
| squid:80 | -------+ local redirect
10.0.10.1:8080 (VIP)
|__________| |
| | |
| director |<-------+
|__________|
DIP = VIP + local IP 10.0.1.1
|
|
-----------------+----------------
| | |
| | |
RIP1 RIP2 RIP3
____________ ____________ ____________
| | | | | |
| realserver | | realserver | | realserver |
|____________| |____________| |____________|


Reading the "7.10. Director as client in LVS-DR"

It seems I need to patch the code source.
Is it still needed?

I use kernel : 2.6.22-2-686

I really need to bypass : "2.2. Gotchas: you need an outside client (the
director and realservers can't access the virtual service)", and it
seems to be possible.

Regards,
Sylvain.
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


j.stubbs at linkthink

Apr 18, 2008, 2:38 AM

Post #5 of 9 (573 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

On Friday 18 April 2008 18:28:42 Sylvain Viart wrote:
> Effectively I want to do the following on the same physical server:
>
> * Listen on public IP:80 with squid
> * squid redirect in accelerator mode on a "virtual peer" hosted on
> the same physical server => 10.0.10.1:8080
> * LVS VIP is on the 10.0.10.1 wich is also the DIP?
> o I'm not sure about this part...
>
<...>
> Reading the "7.10. Director as client in LVS-DR"
>
> It seems I need to patch the code source.
> Is it still needed?

Yes, the director cannot access the LVS service with an unpatched kernel. With
the patch mentioned in the FAQ, your configuration should work fine as far as
I can see.

--
Jason Stubbs <j.stubbs[at]linkthink.co.jp>
LINKTHINK INC.
æ±äº¬éƒ½æ¸‹è°·åŒºæ¡œãƒ¶ä¸˜ç”º22-14 N.E.S S棟 3F
TEL 03-5728-4772 FAX 03-5728-4773

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


sylvain at easyrencontre

Apr 18, 2008, 3:38 AM

Post #6 of 9 (580 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

Hi Jason,
Jason Stubbs a écrit :
> On Friday 18 April 2008 18:28:42 Sylvain Viart wrote:
>
>> Effectively I want to do the following on the same physical server:
>>
>> * Listen on public IP:80 with squid
>> * squid redirect in accelerator mode on a "virtual peer" hosted on
>> the same physical server => 10.0.10.1:8080
>> * LVS VIP is on the 10.0.10.1 wich is also the DIP?
>> o I'm not sure about this part..
> <...>
>
>> Reading the "7.10. Director as client in LVS-DR"
>>
>> It seems I need to patch the code source.
>> Is it still needed?
>>
>
> Yes, the director cannot access the LVS service with an unpatched kernel. With
> the patch mentioned in the FAQ, your configuration should work fine as far as
> I can see.
>
The patch seems pretty old, is it still "patchable" ?
any kernel compatibly I should watch?

The patch is pretty simple, I could probably correct the code also...

Any other link I could read, it's really light and old
> Joshua Goodall /joshua (at) myinternet (dot) com (dot) au/ 11 May 2004


Regards,
Sylvain.
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


j.stubbs at linkthink

Apr 19, 2008, 4:27 AM

Post #7 of 9 (563 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

On Friday 18 April 2008 19:38:46 JST, Sylvain Viart wrote:
> Hi Jason,
>
> Jason Stubbs a écrit :
> > On Friday 18 April 2008 18:28:42 Sylvain Viart wrote:
> >> Effectively I want to do the following on the same physical server:
> >>
> >> * Listen on public IP:80 with squid
> >> * squid redirect in accelerator mode on a "virtual peer" hosted on
> >> the same physical server => 10.0.10.1:8080
> >> * LVS VIP is on the 10.0.10.1 wich is also the DIP?
> >> o I'm not sure about this part..
> >
> > <...>
> >
> >> Reading the "7.10. Director as client in LVS-DR"
> >>
> >> It seems I need to patch the code source.
> >> Is it still needed?
> >
> > Yes, the director cannot access the LVS service with an unpatched kernel.
> > With the patch mentioned in the FAQ, your configuration should work fine
> > as far as I can see.
>
> The patch seems pretty old, is it still "patchable" ?
> any kernel compatibly I should watch?
>
> The patch is pretty simple, I could probably correct the code also...

It won't apply directly as the code has changed slightly. As for compatibility
and what not, you're pretty much on your own... I'm testing that patch and a
few other changes at the moment but I haven't put it in production yet or
stress-tested. It might OOPS after several hours of running for all I know.

Having said that, there's no other way to do what you want at the moment. If
you really want/need to do it, patching and testing is about all you can do.

--
Jason Stubbs

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


sylvain at easyrencontre

Apr 21, 2008, 12:17 AM

Post #8 of 9 (540 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

Hi Jason,

Ref:
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-DR.html#director_as_client_in_LVS-DR
Jason Stubbs a écrit :
>>>> Reading the "7.10. Director as client in LVS-DR"
>>>>
>>> Yes, the director cannot access the LVS service with an unpatched kernel.
>>> With the patch mentioned in the FAQ, your configuration should work fine
>>> as far as I can see.
>>>
>> The patch seems pretty old, is it still "patchable" ?
>> any kernel compatibly I should watch?
>>
>> The patch is pretty simple, I could probably correct the code also...
>>
>
> It won't apply directly as the code has changed slightly. As for compatibility
> and what not, you're pretty much on your own... I'm testing that patch and a
> few other changes at the moment but I haven't put it in production yet or
> stress-tested. It might OOPS after several hours of running for all I know.
>
What does it means "OOPS" ?
> Having said that, there's no other way to do what you want at the moment. If
> you really want/need to do it, patching and testing is about all you can do.
>
I really need to loadbalance squid "output" and detect failure on
realserver backend. Having playing with LVS showed that this way seem
interesting to test. I can also test squid internal loadbalancing, but
the pound are pretty bugged for the configuration I've tested. That will
be my next path.

Thank for the links.
Regards,
Sylvain.
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


sylvain at easyrencontre

Apr 22, 2008, 7:05 AM

Post #9 of 9 (520 views)
Permalink
Re: [lvs-users] using LVS on the director with a local VIP directing to realserver ? [In reply to]

Hi,

After a lot of time compiling the debian kernel, I go to the test...

Ive stopped here, discovering it will complexify a lot my real server IP
config.

I try something else.

Thanks for your help.

Regards,
Sylvain.

Sylvain Viart a écrit :
> Ref:
> http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-DR.html#director_as_client_in_LVS-DR
> Jason Stubbs a écrit :
>
>>>>> Reading the "7.10. Director as client in LVS-DR"
>>>>>
>>>>>
>>>> Yes, the director cannot access the LVS service with an unpatched kernel.
>>>> With the patch mentioned in the FAQ, your configuration should work fine
>>>> as far as I can see.
>>>>
>>>>
>>> The patch seems pretty old, is it still "patchable" ?
>>> any kernel compatibly I should watch?
>>>
>>> The patch is pretty simple, I could probably correct the code also...
>>>
>>>
>> It won't apply directly as the code has changed slightly. As for compatibility
>> and what not, you're pretty much on your own... I'm testing that patch and a
>> few other changes at the moment but I haven't put it in production yet or
>> stress-tested. It might OOPS after several hours of running for all I know.
>>
>>
> What does it means "OOPS" ?
>
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.