[Linux-cluster] Organizing 3 servers into cluster
Fajar A. Nugraha
list at fajar.net
Tue Feb 15 22:09:36 UTC 2011
On Wed, Feb 16, 2011 at 4:26 AM, Nikola Savic <niks at logik-internet.rs> wrote:
> I need to setup cluster using 3 servers. Thanks to everybody involved from
> this mailing list in previous post, we have concluded that DRBD+GFS2 is the
> best approach for building shared storage from local hard drives. It will
> enable mirroring of data between nodes using DRBD, and concurrent access to
> file systems thanks to GFS2.
> Main purpose of this cluster is hosting of single web site (web
> application). Main services we'll have are Web server (httpd) and MySQL. We
> also use memcached for shared session and caching. Cluster should provide
> following benefits:
> - High Availability
> - High Performance (balancing of web application execution on cluster nodes)
> - Traffic balancing
Before you get your hopes too high, make sure you test it first.
DRBD will have some performance penalty compared to plain local block
device, and GFS (or any other cluster file system) will have some
performance penalty compared to ext3/4. Then there's also the
additional layer of complexity involved (e.g.fencing, cluster service,
etc.). Whether or not the penalty is acceptable depends on your needs.
Depending on your needs, it might be possible that the "best" setup
would be to dedicate one of the nodes as NAS server using nfs4 on top
of ext4 for the other two nodes, and setup two floating IPs with
something like vrrp.
> This means that all 3 servers will execute web application and provide
> content to visitors. We didn't plan to use load balancers in front of web
> servers, because traffic balancing is important. That is why DNS round-robin
> approach was planned, which we already use for two server architecture used
> at moment. Web server on each node will be directly accessed by visitors,
> spread by use of DNS round-robin. One of servers will have MySQL Master used
> for writing, while other two will have MySQL Slave instances for reading.
> Each MySQL instance will execute on separate data on shared storage.
> I was confused by following line in RedHat's Cluster documentation,
> related to High Availablity: "An HA service can run on only one cluster node
> at a time to maintain data integrity". Does this mean that web servers can
> not work in parallel on all cluster nodes? Or, is this limitaion related to
> combination of IP address and service (eg. web server on IP 10.1.1.1)?
I believe it's also related to what filesystem and what service you
use. When you use ext3/4 for storage, obviously it can only be mounted
on one node. Similar thing with application, MySQL requires exclusive
access to its data directory while httpd has no problem sharing it's
DocumentRoot with other http instances.
More information about the Linux-cluster