Posted by nimi on March 24, 2010 at 6:20pm
I am building a couple of websites for a few departments in my university.
Each website will sit on the same server using a multisite configuration.
The hardware they have is this:
1 Server with 4GB Ram
2 ISCSI HDs
The software:
Windows
Apache
Drupal 6
What kind of solutions are possible in terms of load-balancing/scalability/clustering?
I would probably need to configure accordingly APC,Memcache and Boost.
Any ideas where to start? This is really not my specialty and the SysAdmin is an IIS guy so he has no idea what to do as well...
Many thanks!
Nimi.
Comments
You specifically state you
You specifically state you want high availability, but you only specify a single server. That, to me, seems mutually exclusive. High availability implies redundancy in the hardware that you're not going to get when putting everything on one box.
I'm not sure if or how this might be accomplished under Windows, but if I were building the system myself I'd likely do something like the following:
2 inexpensive servers - RAM, CPU, and storage depend on how much traffic you expect - running Linux set up as a Ganeti cluster. Within the cluster, you could then run either:
Option 1 (low traffic) - 2 virtual machines - 1 apache/php node (with APC and varnish), 1 mysql node.
Option 2 (high traffic) - 4 virtual machines - 2 apache/php nodes (with APC), 1 mysql/nfs node, 1 varnish cache node. Set up the apache nodes to mount a shared webroot on the nfs node. Set up varnish to do a round-robin load balance on the apache nodes
Ganeti provides the redundancy by allowing any of the virtual machines to run on any of the physical nodes. All of the virtual machines' data is mirrored to an alternate node. So if the hardware fails, the virtual machines can be instantly switched over to the healthy node. You spread the load from the virtual machines across the physical nodes, so each node can be less capable (and less expensive) than a larger, monolithic server running everything. It also allows you to easily scale the system up by simply adding additional virtual machines and physical nodes as necessary.
Alternately, take a look at what the Chapter Three guys are doing with Pantheon. They're basically packaging up an entire Drupal stack configured for high performance and easy scalability/clustering. It's all designed to work in a cloud environment like Amazon, but the techniques could easily be adapted to locally-hosted systems as well.
-Greg
Linux base operating system instead of Windows
I suggest using a Linux base operating system (OS) instead of Windows. Personally I like Ubuntu server because of the large and friendly community around it. Another good reason for using a Linux base OS is that it's easier to get free support. With Microsoft you often end up having to pay for support. Plus Linux is well known for having better high availability and security.
---
How to contribute to Drupal.
The only HA scenario I can
The only HA scenario I can think of with the given hardware is to setup RAID1 for the disks.
You'll need a second server, and since the sysadmin is an IIS guy and does not know where to start, he can start with setting up Linux
Thanks a lot for all your
Thanks a lot for all your comments.
Greg, you advised setting up a Ganeti cluster. I researched this a bit and it certainly looks interesting but I'm afraid it would be too much of a hassle especially for someone who is unfamiliar with Linux.
I guess we would go for a RAID1 setup as choloepus suggested. You're right this is not exactly HA but lets hope it will suffice for now.
Could you please point me somewhere I could read about setting up RAID1 for this system?
Thanks a lot,
Nimi.
google it and remember to use
google it and remember to use hardware raid not software
Definitions
You might begin by defining what you mean by "high availability." RAID is for avoiding hardware failures. Clustering can protect against both hardware failures and system load. APC, Memcache and Boost are for performance/capacity enhancement, and while high system load can have the effect of an outage, it's not the same thing. Before you try solutions, you need to be clear about the problem.
I have a fairly low-powered Linux box running Drupal at Server Beach that's been rebooted maybe half a dozen times in five years, serving 500K to a million page requests/month. It's more likely that the power goes out in the entire region than the server has trouble. And there's nothing special about it at all. Runs APC, but not Memcache or Boost.
$ uptime
15:52:28 up 210 days, 14:18, 1 user, load average: 0.24, 0.39, 0.48
We're going to retire it next month, but I don't want it to know, lest it feel threatened.
you need at least 3 computers
you need at least 3 computers for high availability. This cannot be done with limited hardware especially when you list the availiability of 1 computer. Back in university we would daisy change a bunch of old processors into a semi supercomputer (was just a moniker). However the energy consumption was too high.
Hi again, I have succeeded to
Hi again,
I have succeeded to arrange another server so now we actually have:
2 servers with 4GB of Ram each
2 ISCSI HDs
I understand that there is no other option but to move to Linux to have a modest HA/Load-Balancing solution.
I've researched about Ganeti clustering gchaix recommended. Sounds very interesting. I think we will go for that.
The confiuration gchaix recommended is:
"4 virtual machines - 2 apache/php nodes (with APC), 1 mysql/nfs node, 1 varnish cache node. Set up the apache nodes to mount a shared webroot on the nfs node. Set up varnish to do a round-robin load balance on the apache nodes."
Just to be clear, is this the correct configuration?
Server 1:
1 apache/php (with APC)
1 mysql/nfs
Server 2:
1 apache/php (with APC)
1 varnish cache
Would anyone recommend following these instruction for configuring such a setup?
http://www.howtoforge.com/xen-cluster-management-with-ganeti-on-debian-l...
Many thanks,
Nimi.
iSCSI?
I just re-read your post and noticed you said: "2 ISCSI HDs" ... that's confusing. "iSCSI" is a network-attached storage protocol while "HDs" implies internal storage on the servers. Are you using physical SCSI drives directly connected to the servers? Or are you using network-attached iSCSI storage?
One of Ganeti's strengths is using DRDB - a distributed block storage device - for redundancy. Generally it expects to see local storage directly attached to the server, not network-attached storage. You can do it, but it adds complexity and is likely more difficult to set up.
Close, but not quite what I was talking about
You're close ... :-)
Set up the two physical machines as a Ganeti cluster. Then provision four virtual machines on that cluster: two webnodes, one MySQL, and one varnish. With virtualization like this, the two physical servers essentially become a single pool of server resources that the virtual machines draw from. Once the cluster is set up, you're essentially looking at a single system that hosts the virtual machines - the individual hardware that comprises the cluster becomes mostly irrelevant. Ganeti will handle the provisioning and decide which physical machine will be the primary node for each virtual machine.
Here's an overview of our Ganeti infrastructure: https://dokuwiki.osuosl.org/public/ganeti_osl_infrastructure
Here's a document on how we build Ganeti clusters on Gentoo: https://dokuwiki.osuosl.org/public/ganeti_cluster_gentoo
Here's some more on the basics of Ganeti: https://dokuwiki.osuosl.org/public/ganeti_how_it_works and https://dokuwiki.osuosl.org/public/ganeti_common_commands
Note - we use KVM instead of Xen for the virtualization. Ganeti supports both, but KVM is supported in the mainline Linux kernel, while Xen requires a custom kernel. For simplicity's sake, I'd go with KVM/qemu.
Start small
Another thought ... (I am way too scattered today - too much caffeine)
Since you're new to Ganeti, I'd recommend doing just two virtual machines to start. That will lower the complexity of your config, but still give you redundancy/high availability.
1) Create the Ganeti cluster using the two servers as nodes.
2) Create a virtual machine (an "instance" in Ganeti-speak) for your web node - Apache+PHP (and if you want, Varnish).
3) Create another virtual machine (instance) for your MySQL database.
You can always add additional instances later (like a second web node or a dedicated cache node).
-Greg
Thank you so much for your
Thank you so much for your help. Things are much clearer now :)
Yes I will go with your last suggestion. Certainly does seem relatively easier.
Would you suggest then using the Gentoo distro in terms of ease of use? From what it looks it is quite complicated to install. I think I would rather go Debian or Ubuntu. However, the instructions in the document on "building Ganeti clusters on Gentoo" should be similar to other distros I guess?
By the way, the HD's are local not networked. My mistake.
Why Gentoo?
We use Gentoo because that's the distro we've standardized most of our infrastructure on. It serves our specific needs very well, but I agree it's more difficult for the novice Linux user to install and configure. I think you may do better to use Ubuntu Server. Also, I've heard that Ubuntu Server is an easy distro to use within virtual machines - so you can save some confusion by running the same flavor on the hardware nodes as well as the virtualized systems within them. I'm rather fond of Ubuntu, personally, and would definitely recommend it to a sysadmin new to Linux.
I noticed Ganeti 2.0.5 is in the Ubuntu universe repository. We're on 2.1.1, so there will likely be some differences between our configs and what you set up if you use the packaged version. You may need to compile/install from source.
Good to know the disks are local. That will be easier to work with in this case.