View Full Version : Web Server Cluster
24th February 2011, 04:55 PM
I need to build a 3 node web server cluster to run a php application.
Since the app requires users to login (which means a session state is to be maintained), I will be sharing sessions save path, I also need to share the application directory across 3 nodes.
I having trouble deciding which cluster file system to select. Can anyone guide me here?
24th February 2011, 05:00 PM
Usually I see something like this done with fibre channel with RAID.
But there is always gpfs...
The problem is speed, uptime, reliability, cost, and failover requirements that have not been stated.
24th February 2011, 05:12 PM
thank you for your reply jpollard.
My main concern is speed and fail-over. Can you advise me accordingly?
25th February 2011, 04:30 AM
Well if you truly need access to shared data (as opposed to just needing the ability to sync your relatively static data across systems periodically), theres GFS2 if your nodes have access to shared storage (such as a storage array or iSCSI), or GlusterFS if you are looking for a more distributed approach. Or you could just set up an NFS server and share data that way. They all have very different performance profiles and the performance will depend on your usage patterns.
For the cluster side of things, if you are looking for high availability (think active/backup configuration, where one node actively runs a service and it can fail over to a backup node if needed) then cman is probably what you're looking for. It manages cluster membership, quorum, fencing, etc. The rgmanager package integrates with cman and provides the ability to manage services (such as httpd, ip addresses, file systems, etc) and fail them over. Conga (composed of the luci and ricci packages) is a web frontend to manage and configure your cman/rgmanager cluster.
If on the other hand you are looking for load balancing for multiple web servers (ie they're all running in parallel, splitting the load between them) then you can use ipvsadm and piranha (web front end). These are typically referred to as Linux Virtual Server (lvs), and can be configured to balance traffic in different ways and route them to different back end servers.
That said, some of this has a steep learning curve, and may take a good amount of research on your part to learn how to use them. Its not something that can easily be spelled out here, but there are many resources available out there that explain them in more depth, and mailing lists for each of these projects to get help from other users and developers. The above is meant as an introduction to the topics, and hopefully it will help you seek out the information you are looking for.
25th February 2011, 06:40 AM
hmm thank you guys.
I think I know now what I have to do. Thanks for all your help.
25th February 2011, 01:34 PM
One other additional thing is using virtual machines...
These allow the web server itself to move from node to node allowing a rolling maintenance cycle.
If three physical servers exist, with one VM each (physical balance), then for maintence you can migrate a VM from the designated physcal server to one of the other two. This allows the physical server to be idled for updates/equipment repair, even replacement. After the system is returned to use, migrate a VM to it.
This keeps all 3 active servers in service, though one physical system may be a bit overloaded.
Another advantage is that failover can be more easily made automatic by restarting the failed VM on one of the remaining servers.
I have seen this done with VMWare, but I'm not familiar enough with Xen/KVM to know if it can be done there.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.