public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Two-machine cluster efficient approach(?) Comment? Thanks.
@ 2001-05-24 22:32 Chuck Wu
  2001-05-25  0:18 ` Ragnar Kjørstad
  0 siblings, 1 reply; 2+ messages in thread
From: Chuck Wu @ 2001-05-24 22:32 UTC (permalink / raw)
  To: linux-kernel

Two machines want to be accessed by the same IP address and
share workload. Can not change the router. Can only change 
local linux system. Will the following approach work? Thanks.

Solution:
---------
1. Reserve an unused IP as the to be publicized "Server IP", actually no
   machine takes it. So, it is kind of "virtual IP".
2. Alias the NIC of those two work stations to this "virtual IP" so they
   can accept packets to this "virtual IP".
3. For ARP request packet to this "virtual IP", those two work stations
   will return the MAC broadcast address. Then, all the packets to the
   "virtual IP" will be broadcast to this subnet and those two machines
   will get such packtes.
4. Before such packets gets into the TCP/IP stack, use a hash function
   to filter the packets. Say, workstation A will accept packets whose
   source IP is an odd number and discard the packets with even-number
   source IP.
5. For the outgoing packets from those two workstations, change the source
   IP address to be the "virtual IP".
6. Have another thread keep ping each other, once another workstation
   crashes, change my hash function to accept all the packets to the
   "virtual IP". Whenever another workstation resumes, switch back to
   the original hash function.

   Do you think if this approach will work? There is also a question I
am not quite sure, can two machines's NICs be aliased to the same "virtual
IP"? Will it cause some conflicts? And, it seems I need to change the
linux kernel source code. I am not pretty sure where is the location of
the source code related to the above operations. Like, can you tell me the
location of the linux kernel source code to answer an ARP request packet,
to build a hash function to filter the incoming IP packets before it
enters the TCP/IP stack?

   Thanks a lot.

best,
chuck


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Two-machine cluster efficient approach(?) Comment? Thanks.
  2001-05-24 22:32 Two-machine cluster efficient approach(?) Comment? Thanks Chuck Wu
@ 2001-05-25  0:18 ` Ragnar Kjørstad
  0 siblings, 0 replies; 2+ messages in thread
From: Ragnar Kjørstad @ 2001-05-25  0:18 UTC (permalink / raw)
  To: Chuck Wu; +Cc: linux-kernel

On Thu, May 24, 2001 at 06:32:10PM -0400, Chuck Wu wrote:
> Two machines want to be accessed by the same IP address and
> share workload. Can not change the router. Can only change 
> local linux system. Will the following approach work? Thanks.

You should check out Linux Virtual Server; it does something simular
(only it doesn't reply to arp-requests with broadcast-address, but with
one of the servers' ethernet-address).

> Solution:
> ---------
> 1. Reserve an unused IP as the to be publicized "Server IP", actually no
>    machine takes it. So, it is kind of "virtual IP".
> 2. Alias the NIC of those two work stations to this "virtual IP" so they
>    can accept packets to this "virtual IP".
> 3. For ARP request packet to this "virtual IP", those two work stations
>    will return the MAC broadcast address. Then, all the packets to the
>    "virtual IP" will be broadcast to this subnet and those two machines
>    will get such packtes.
> 4. Before such packets gets into the TCP/IP stack, use a hash function
>    to filter the packets. Say, workstation A will accept packets whose
>    source IP is an odd number and discard the packets with even-number
>    source IP.

If this work, a useful addon would be to use something a little more
advanced, to allow it to scale to more than 2 servers.

> 5. For the outgoing packets from those two workstations, change the source
>    IP address to be the "virtual IP".
> 6. Have another thread keep ping each other, once another workstation
>    crashes, change my hash function to accept all the packets to the
>    "virtual IP". Whenever another workstation resumes, switch back to
>    the original hash function.
> 
>    Do you think if this approach will work? There is also a question I
> am not quite sure, can two machines's NICs be aliased to the same "virtual
> IP"? Will it cause some conflicts? And, it seems I need to change the
> linux kernel source code. I am not pretty sure where is the location of
> the source code related to the above operations. Like, can you tell me the
> location of the linux kernel source code to answer an ARP request packet,
> to build a hash function to filter the incoming IP packets before it
> enters the TCP/IP stack?


--
Ragnar Kjørstad
Big Storage

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-25  0:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-24 22:32 Two-machine cluster efficient approach(?) Comment? Thanks Chuck Wu
2001-05-25  0:18 ` Ragnar Kjørstad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox