--- dreamping <dreamping925@xxxxxxxxx> wrote:
> To share the data behind the realserver,I want to
> use SAN,should i use NFS
> or DFS(distributed filesystem)?and which DFS is
> appropriated for LVS and
> SAN.
To share files on the real servers and ensure that all
real servers see the same changes at the same time a
good NAS box or even a Linux NFS server built on top
of a SAN (using Heartbeat to failover the NFS server
service and IP address the real servers use to access
it) works great. If you run "legacy" applications that
perform POSIX-compliant locking you can use the
instructions at http://linux-ha.org/HaNFS to build
your own HA NFS solution with two NFS server boxes and
a SAN (only one NFS server can mount the SAN disks at
a time, but at failover time the backup server simply
mounts the SAN disks and fails over the locking statd
information). Of course purchasing a good HA NAS
device has other benefits like non-volatile memory
cache commits for faster write speed.
If you are building an application from scratch then
your best bet is probably to store data using a
database and not the file system. The database can be
made highly available behind the real servers on a
Heartbeat pair (again with SAN disks wired up to both
machines in the HA pair, but only one server mounting
the SAN disks where the database resides at a time).
Heartbeat comes with a Filesystem script that helps
with this failover job. If your applications store
state/session information in SQL and can query back
into the database at each request (a cookie, login id,
etc.) then you will have a cluster that can tolerate
the failure of a real server without losing session
information--hopefully just a reload click on the web
browser for all but the worst cases (like ?in flight?
transactions).
With either of these solutions your applications do
not have to be made cluster-aware. If you are
developing something from scratch you could try
something like Zope Enterprise Objects (ZEO) for
Python, or in Java (JBOSS) there is JGroups to
multicast information to all Java containers/threads,
but then you?ll have to re-solve the locking problem
(something NFS and SQL have a long track record of
doing safely). But you were just asking about file
systems and I got off topic . . .
--Karl
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|