5

I'm in the process of configuring a LAMP server but want to make sure it'll be ready for expansion for the future.

Here's my current setup..

  • Two physical windows servers clustered with Hyper-V
  • Two virtual machines, one for Apache and another for MySQL
  • Two Synology ISCSI luns configured as a RAID5, one for Apache and another for MySQL
  • Each virtual machine is setup to use their respective ISCSI as the data folder
    (website data for apache and database data for mysql)

Here's what I want to do..

  • Second Apache server configured as a failover (active-passive)
  • Second MySQL server configured as a failover (active-passive)

Here's where I need help..

My thinking was to use a virtual ip address, which would be assigned to one of the two apache servers configured as a master. If the master dies, I want the secondary slave server to claim that virtual ip and act as the master until the original master comes back online. I don't have to worry about syncing data between the two apache servers since the data is being stored in the ISCSI. I don't have to worry about "file-access-conflict" since only one of the servers will access the server at a time. This same concept applies to the MySQL servers.

The question is.. Do you think this setup stands good for now and the future. The next question is.. What should I use for the active-passive failover handling. I was looking into ucarp, which seems pretty easy to use. What do you guys think?

royjr
  • 153
  • 4
  • 1
    Why use active/passive for your app server when it's so much easier to do active/active with a load balancer? – EEAA Nov 25 '16 at 17:29
  • Cool.. new suggestions are always good. But I'm worried about file conflict if the two servers are using the ISCSI at the same time. What you think? – royjr Nov 25 '16 at 17:32
  • Keep your data directory in a separate file system on the Synology, exported via NFS, which both app servers can mount at the same time. – EEAA Nov 25 '16 at 17:33
  • Not a bad idea.. no data right now, I'm starting fresh, so I guess no need for the NFS export. Now I guess my next question would be how would I setup the load balancing part of it? – royjr Nov 25 '16 at 17:35
  • Your storage is a single point of failure. Not good at all... – BaronSamedi1958 Nov 30 '16 at 09:56
  • @BaronSamedi1958 opps, looks like I forgot to mention. The synology is clustered with two physical servers, abd the NFS volume (was ISCSI) is a RAID5 – royjr Nov 30 '16 at 12:47
  • Well, Synology has crappy pseudo-HA (failover takes ages to complete & you steal IOPS from your setup NOT using second set of the disks for I/O), and RAID5 + non-SSDs is a death sentence really. – BaronSamedi1958 Nov 30 '16 at 21:47

1 Answers1

7

If you do have just one Synology box shared between your Hyper-V machines, it can still be considered as a SPoF. It dies, you lose all the LUNs sitting there. For true HA you would need a second NAS box and some replication mechanism. Well, one thing that comes to mind is HA cluster with two Synology NAS devices. But AFAIK it doesnt rate well in the world of HA. Especially because of performance and slowness of failover. So mostly we usually lean toward some of SDS solutions like HPE VSA (http://www8.hp.com/us/en/products/data-storage/free-vsa.html), Unity VSA (http://www.emc.com/products-solutions/trial-software-download/unity-vsa.htm) and StarWind vSAN (https://www.starwindsoftware.com/starwind-virtual-san-free). I personally was playing around StarWind a lot and got all the things done very quickly. Their free version should be able to mirror your NAS boxes converting all the stuff into a full fledged virtual san. And finally I wouldnt use Synology for production tasks. It can flawlessly handling a backup jobs, but I doubt it is completely suitable for virtualized environments. So if I were you, I would leave Synology as a backup repository, load Hyper-V hosts with the local disks and create a storage pool wit help of one of the SDS mentioned above.

batistuta09
  • 8,723
  • 9
  • 21
  • 1
    I forgot to mention that I have two synology rackstations clustered as active-passive. – royjr Nov 30 '16 at 17:30
  • 5
    Like I said, I would take slightly different route. I would connect Synology boxes to the hosts (one box per one node), mirror them, create a failover cluster with Hyper-V hosts and present a created storage pool as CSV to that cluster. Then I would place MySQL VM on CSV, so it will be able to move between Hyper-V nodes in case anything will happen to one of them. This setup should tolerate losing one NAS device, one Hyper-V node and one NAS box along with one Hyper-V node. This is HA you are looking for, isnt it? – batistuta09 Nov 30 '16 at 20:30
  • 3
    Agreed with Batistuta, if you can not afford downtime in your production, HA is your unconditional choice. – Stuka Dec 01 '16 at 14:09