LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Fwd: Re: LVS HA

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Fwd: Re: LVS HA
From: Ulysses Almeida <munky@xxxxxxxxxxxxx>
Date: Wed, 5 May 2004 21:12:10 -0400
Hi list, 

  I'dont know, if what i'm tring is new, but I'll try to explain (with
my awful english) what i'm trying to do here.

  A friend has proposed a Web Cluster model, on his Graduation
project, without a good resarch, now I'm researchig this project
availability.

  That's the propose:

  The network topology is something like this table:

  node     VS      BVS      RS        BRS
   1       1        x       x          5
   2       x        1       2          x
   3       x        x       3          2
   4       x        x       4          3
   5       x        x       5          4

  Where:
        VS = Virtual Server
        BVS = Virtual Server Backup
        RS = Real Server (running Apache)
        BRS = Real Server Backup

  If a fail occurs on a RS, we need to reconfigure the cluster on two
steps:

  1st step (fail on node 3):
  node     VS      BVS      RS        BRS
   1       1        x       x          5
   2       x        1       2          x
   3       F        F       F          F
   4       x        x      3-4         2
   5       x        x       5          4

  2nd step (fail on node 3 - Cluster reconfiguration):
  node     VS      BVS      RS        BRS
   1       1        x       x          5
   2       x        1       2          x
   3       F        F       F          F
   4       x        x       4          2
   5       x        x       5          4

  As we can see, on 1st step, node 4 will answer all requests to node
3, while the VS reconfigure the cluster to eliminate node 3 from the
webcluster.

  The main idea is never loose a client request, so if node 3 was
answering a request when fails, node 4 needs to answer the client
request, without client need to request it again (refresh).

  Now I'll try to explain my ideas to do this.

  Every request that arrives on RS, is intercepted and replied to BRS,
I'm thinking to QUEUE the requests with iptables, and create a daemon
with libipt, to replicate this quests. BRS will store this requests on
Persistent Storage Device (Hard Drive).
  When BRS recive a fail signal from RS (with heartbeat or something
else), it reinject the requests (TUN/TAP?), and answer the
request. The idea is reinject with the same TCP-SYN sequence number,
then i'll looks like duplicate TCP flag to client. When it finishes
the request, the Cluster is alredy reconfigured, and we can forget
about node 3 existence.

  If a fail occurs on VS, I think this link
(http://www.ultramonkey.org/papers/conn_sync/, thanks Horms) answer
how to make BVS works as a VS. Once it run as a router, don't need to
reinject nothing, we can let TCP resend tha request or any packet,
when timeout.

  Now I'm concerned in how to make BRS answer RS requests
transparently. 'Cose if i reinject the request, i need to guarantee
TCP sequence numbers (including SYN and ACK packets) be the same on
RS. If we don't do this, clients side will just discard this packets,
don't they? Can i reinject those packets with the same TCP sequence
number?

  Probably you can ask. "Isn't it will make connections very slow,
with all this HD writes?"

  A: Yes, it probaly will, but the main idea on this propose is not
speed, is just the avalability. And we don't want clients needing use
"refresh" button. We want to answer any request for any coast.

  I was thinking use LVS as VS, and try use iptables and self daemon
made, on RS. To detect fails, HeartBeat or Keepalived (I think
keepalived is better on this case).

  This friend, creates some FSM, that I need to use on the cluster and
cluster reconfiguration. That's why can't simply use keepalived to do
everything. Probably I'll need to implement some daemon with libipvs
to cluster reconfiguration, to follow his FSM (If some get interests, I can
translate those FSM and send in private).

  Ok, I think I explain what i want to do (If any interest in help,
and didn't understand something, please, write and ask, I'll try to
explain). Now I have some questions:

  Do some one thinks it's possible in this way?
  Do some one thinks it's possible on an easier way?
  Which apps, should I use (if it's possible)?

  Thanks in advance, fow any answer.


-- 
    .~.  Ulysses Almeida
   / V \  munky@xxxxxxxxxxxxx
 / (   ) \  Seja livre, use GNU/Linux! 
   ^^-^^
<Prev in Thread] Current Thread [Next in Thread>