Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Nov 2002 12:13:40 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Michael Grant <mg-fbsd3@grant.org>
Cc:        freebsd-cluster@FreeBSD.ORG
Subject:   Re: clustering freebsd
Message-ID:  <20021110121340.3f2d1827.Alexander@Leidinger.net>
In-Reply-To: <200211091604.gA9G4wW28126@splat.grant.org>
References:  <200211091604.gA9G4wW28126@splat.grant.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 9 Nov 2002 17:04:58 +0100 (MET)
Michael Grant <mg-fbsd3@grant.org> wrote:

Judging from the other replies, I don't talk about beowulf style
clustering and concentrate on failover and HA solutions.

> One of the big things that cause me down time is upgrading the OS.
> I'm also worried about hardware failure (which luckily hasn't happened 
> to me yet...)  I too would like to achieve at least 5 nines.

> Let's say I have a cluster of n machines.  Some of those n machines
> may be running a web server, some a shell server, some mail server,
> some pop/imap mail servers...etc.  How is an incoming connection sent
> to the right machine?  It seems like that there needs to be a single
> machine in front of the cluster to send connections the right way,
> isn't this a single point of failure?

Yes, in this case it is a single point of failure, but there are other
ways to solve this.

> If you do have multiple machines answering requests, how's this done?
> With multiple IP addresses?   I know one can specify multiple A
> records in DNS and that it'll do a sort of round-robin.  But does this 
> work well?  What if one of the machines is down and a caching dns
> server returns an ip address of one of the down machines?  Seems like
> you need then to start modifying the dns zone to take out the down
> machines and use a low ttl.  This starts to get ugly quickly.

No, you can configure the remaining systems to answer on the "bad"
IP (e.g. via VRRP).

E.g. you have n system which provide the same service (e.g. http). If
one of those n system goes down, one of the other n-1 systems takes over
the IP of the failed system and answers to requests for it too. You can
use VRRP to do this (you don't need a single box in front of those n
systems, every n system runs a vrrp daemon, no single point of failure).

> Second problem I have been thinking about is shared disk.  I read a
> post by someone who also had this concern.  One obvious way to solve
> the shared disk problem is to have another box which has a bunch of
> disks in a RAID configuration, and mount the diks via nfs.  This disk
> box would probably need to be highly available with redundant power
> supplies and the like.  

Another approach is to use e.g. AFS. You can spread the reads over
multiple AFS "mirrors", but writes have to go to one specific box (at
least this is how I understand it after reading a little bit about it, I
haven't used AFS myself).

Another way is to have the data in a database and let the database do
the replication. MySQL has at least a working 2 way replication feature
(I'm talking about 3.x). This way you also get load balancing on the
data (you can read/write to both and the other one gets the data too).
With postgresql (and oracle, ...) you can have n-way replication.

> However, I'm not so convinced that a third disk box is the right
> answer.  I'd like to see something which could mirror (in real time) a 
> file system over the lan, thus keeping 2+ disks in sync just like a
> RAID array spread over multiple systems.  Does such a thing exist?
> After hours of searching, I could find nothing that did this.

I'm not aware of a free solution for this (but AFS may do something like
this... for appropriate values of "something" and "like").

But: is it necessary for your problem? E.g. if you just have minor
static data with a low change frequency for a webserver, but a lot of
dynamic pages which may change often, you don't need it. Use the
replication feature of the database to have "realtime" synchronisation
of the dynamic data, and use e.g. rsync periodically for the static data
(or keep the machines in sync on your own; or set up a master tree,
which is different from the tree which the webserver operates on
(life-tree), on one of the machines and periodically sync from the
master tree to every life-tree).

Obviously this isn't an option for Mail-/IMAP-servers (except they store
all mails in a database).

> There seems to be essentially 2 types of clustering:
> 
> 1) hot spare failovers
> 2) multiple machines operating in parallel
> 
> (Perhaps someone could enlighten me if there are proper names for
> these).

In this case "2)" is "load-balancing".

Your application has to support these features. But "application"
doesn't mean e.g. "apache" here. If you have a website which does
session tracking (e.g. an e-commerce solution with a product-basket),
and you do "1)", and the main system goes down, everything in the basker
is lost if the e-commerce-engine does the wrong thing (e.g. storing the
session data in the filesystem and determining the right session by
taking into account his own hostname or something else which is host
specific). The customer has to start over.

If the engine does the right thing (storing session data in a replicated
database and not using host specific data to determine the right
session), only the last action of the customer may fail (if it occurs at
the time the system goes down), but if he already has 100 items in the
basket, he hasn't to start from scratch again.

> What's important to me at the moment is that if I have a user on one
> machine that goes down that they can get right back on another machine 
> and get at their mail or files.  Of if someone is surfing our site,
> they just automatically get files from the server that's up.

If you solve the file syncing problem, VRRP (net/freevrrpd) is an easy
(and fast) way to achieve "1)". For "2)" you can add e.g. net/loadd
(from the same autor than freevrrpd) to the mix (I haven't tested loadd
myself).

> Does anyone know of some list of clustering software?  Is there
> anything I can use today to do #2 that runs on freebsd (or other bsd
> systems)?

Have a look at
http://www.leidinger.net/cgi-bin/search.pl?q=cluster&num=10 for some
links I found on this topic (freevrrpd and loadd are parts of the HUT
project).

Bye,
Alexander.

-- 
               Speak softly and carry a cellular phone.

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-cluster" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021110121340.3f2d1827.Alexander>