I made some searches here and didn't find anything relevant enough for me. I'll try to be as brief as I can.

I currently have OSX servers, three of them. I am moving to a virtualisation enviroment for redundancy and since Apple has cancelled the Xserve. I have no prior experience with virtualisation, but I'm a quick learner and I have administered servers since 1997.

So, new dedicated server in new data center. Kickass hardware, installed VMware ESXi and inside that, I've created two networks, "VM Network" and "Switch". "VM Network" is connected to the physical NIC and "Switch" is a virtual switch.

Then I created a VPS named "FW" that has two virtual NIC's, one to each network in VMware, installed pfSense on this virtual machine and bridged the "real" NIC with the internal Switch. Done.

Then I intend to create my resource pool on the "Switch" network and let pfSense load balance it.

My Web application is currently contained in a single directory that weighs in at approx 300GB of data, my database is about 50GB more. They are currently on Xserve 1 and Xserve 2.

My current thought process has me at these VPS machines:

1. Main server ( This contains two virtual hard drives, one small for Linux and one large for my web application. The larger is mounted inside Linux as "/Atlas" (name of my CMS) and is then NFS exported. VPS has 2GB of RAM and 2 CPU's

2. Database server ( This is the master database server

3. Web servers ( - Ten Linux servers, each with 5GB of HD, 5GB of RAM and 4 CPU's. Each mount the NFS export from #1 and can read and write to my Atlas.

My questions are:

  1. Should I run MySQL slaves on each Web server in 3? I only have about ~900GB in the server, so space is a concern.

  2. If not, should I have seperate MySQL slave failover servers in the same VMware, in case something happens with #2?

  3. I will rsync-backup the Main server to an offsite location, but is there a better way than NFS to let every web server read and write to this data. Using a cluster filesystem would lead to space concerns, rigth?

  4. Should I use a VPS for load balancing and use Apache's own LB? Is that better for a web application than using pfSense's LB?

  5. Any other weak points in my thoughts here? I will use this as my main server, but I will have a failover server set up identically in another location and use DNS servers to reroute the traffic when needed (either automatically or manually).

I'm not building the Fort Knox here, but I need better redundancy than I have today, and I want to do it as "correct" as possible. Any help/comments are greatly appriciated!

  • I'm going to post an answer but do have some questions. What are the performance requirements? What are the specs on the physical box? How much RAM and how many cores? If HA is important, you should have at least 2 physical machines rather then creating redundant VMs on the same box. May 6 '11 at 22:16
  • The spec on the physical machine is dual Xeon 6-core 2.8Ghz, 48GB of RAM and 900GB in a 4-disk SAS-raid. This is my main machine. As yuo could read in Q5, I plan to have another physical machine at another site and handle failover to that one via DNS
    – Sandman
    May 7 '11 at 8:52
  • Sorry - I didn't fully read the question #5. Have you looked at DRBD already for syncing data? This would be realtime and perhaps a better option then rsync. May 7 '11 at 17:20
  1. A multi-tier network topology means you should never run MySQL on your web server. If you need redundant or load balanced MySQL servers, then create db1, db2, db3, etc. Don't create more slaves then you really need, since replication is an all or nothing deal with standard MySQL.
  2. What I normally do is MASTER-MASTER replication. This is normally not recommended due to key conflict risks, but I wrote some scripts that the secondary server runs in read_only mode to avoid writes. So if a server dies, it is easy to flip the read_only switch and start accepting writes.
  3. NFS is fine; just do the usual performance tuning and testing.
  4. Take a look at haproxy for doing Apache/HTTP and TCP load balancing. Works great with MySQL even.. You can run haproxy in a VM.
  5. Having redundant VMs is great but running on a single physical machine is still a weak point. Having 10 identical Linux VMs competing for resources could also be a weak point.

Final comment: ESXi is great (don't get me wrong) but I would not use it in this situation. Take a look at a containerization system like OpenVZ. Proxmox provides a great user interface to it. Performance will be significantly better; each VM can use all the RAM and CPU cores. (Unless you restrict it of course.). OpenVZ only works with Linux of course. But any webapp that works on Xserve should work in a Linux container as well?

  • 1 & 2: Do you suggest that I setup, say, 4 MySQL servers - each in Master mode but only one in write mode? Do you have any link to outline this process with cons/pros?
    – Sandman
    May 8 '11 at 7:55
  • 4: Thanks for the advice And on ESXi - my main gripe with is the 4-CPU/VPS limitation with the free version, but on the other hand, the people that I can call upon to help me out when needed all know VMWare, so it's the support thing as well. That said, I'll check OpenVZ out as well.
    – Sandman
    May 8 '11 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.