Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Just to say I know some about servers and databases but not enough to achieve what has been asked so I just need some advice to set me straight :)

Okay so we have two dedicated servers running windows server 2008 standard sp2, due to cost limitations I will only have two servers any nothing else.

The services hosted on these boxes will be IIS7, Apache2, SQL Server and MySQL until I have the funds to scale out.

I have no load balancer nor can I alter the IP configuration of the servers, so as far as balancing/clustering goes the only real thing I can do is round robin dns with a low TTL, would this be right?

As for IIS and apache I have a domain share setup with DFS that both web servers use for there files, again is this an acceptable way to do it?

So far I think it will work aslong as I find someway of updating the dns servers to send the traffic a working server.

I have been struggling with the databases, so far I have them setup as a mirror and I can fail over from one to the other and this is working okay for SQL as I can specifiy a partner server in the connection string but thats not ideal as it's also per database and I dont want to have to modify the applications.

I'm not aware of a partner server in a mysql connection string.

Can anyone shed some light on this? I've been tearing my hair out for days now!

Thanks.

share|improve this question
    
Is there a reason your environment has to be so heterogeneous? I ask because your problem is much simpler to solve for Apache/Mysql/*NIX or IIS/SQLServer/Windows. –  voretaq7 Jul 28 '11 at 18:35
    
Unfortunately I don't know *nix well enough to use it for our production sites and services, we have websites written in both PHP and .NET that use Apache, IIS, MySQL and SQL. –  Richard Adnams Jul 29 '11 at 13:07

1 Answer 1

up vote 1 down vote accepted

My suggestion for your environment, assuming that both machines are identical (one is a primary and one is a hot standby?) would be either Microsoft's clustering services / IP failover or adding a third machine to run as a load balancer (this can be very cost-effective, and it makes administering the systems substantially easier).
You can get basic load balancing and HA services with HAProxy or through an appropriately configured PFSense box for the cost of hardware and some time.


Absent the ability to implement any of those solutions round-robin DNS will give you (ghetto) load balancing and limited resiliency in the event of a system failing (clients pointing at the "good" machine keep working, anyone who gets handed the "dead" IP doesn't).
You could also implement a single DNS entry pointing at a "primary" server and use some clever scripting to change that to point at the "secondary" box if the primary ever goes away. This will leave all your clients out in the cold for as long as the DNS TTL is set to.

Both of the above solutions have their problems: Clients who were pointing at a server that went down won't be able to use your site until their cache gets rid of the "dead" address. Both also require some intervention for outages of more than a few seconds (to remove the "dead" server from DNS).
You may also need to take steps to "promote" a server to be primary in the event of an extended outage, though this would be an issue in any HA implementation.

share|improve this answer
1  
You might consider virtualizing those windows servers using the hardware you've already got, and run HAProxy with Heartbeat as the front-end/load-balancer. In that scenario, either physical server could be down (whether scheduled or not) and a single IP address would be shared between the HAProxy servers. –  Joe Jul 28 '11 at 19:10
    
Depending on load virtualizing may be a good solution too - I'm always wary of virtualizing database servers though... –  voretaq7 Jul 28 '11 at 19:21
    
I have looked into clustering with windows but the place the servers are hosted dont support clustering, I tried windows NLB but I spent a couple of hours on the phone to them and we couldnt to get the vip working. So far what I have done is created a MySQL cluster between the two servers which is working perfectly and i will have to do sql server on a per database bases and mirror the servers, I will be asking for a 3rd server to be used for a witness server for SQL server and a management node for MySQL. I'm intrested in the HAProxy for a load balancer aswell, would that work for sql too? –  Richard Adnams Jul 29 '11 at 13:15
    
Also @Joe could you expand a bit more on the virtual setup? I'm interested to see how this could work but I don't know enough about it yet. –  Richard Adnams Jul 29 '11 at 15:06
    
@Richard Adnams Do your Windows 2008 servers have Hyper-V? If so, you may be able to perform the virtualization in-place. It's been a while since I read MS's licensing documentation, but I believe Hyper-V allows you to run the host and one(1) guest using the host's license. Configure the first guest VM to be one of the mirrored/clustered servers, or P2V the primary machine to be a Hyper-V guest VM. Then, install an additional Linux guest VM (SUSE or RHEL are officially supported, others probably work just fine.) Perform the HAProxy/Heaartbeat configuration on the Linux VM. –  Joe Jul 29 '11 at 15:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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