Question

I am now starting to look into building the proper architecture for Intranet network with one Primary Server and a Secondary Server that I would like to operate as a hot standby. My knowladge of this is quite minimal and I am looking for guidelines and articles that would get me started.

The Server that needs to be replicated will run the following:
- Windows Server 2008 R2 OS
- MS SQL 2008 R2 Std
- IIS 7.0 that will run a web application built in asp.net
- Several background services, some of them write data to the database. This are .net applications that were written in house but with no replication methodology.

My goal is to have the Primary Server data constantly replicated to the Secondary Server so that in case of failure the Seconday Server can start acting as Main Server ASAP.

My questions are:
1. What is the recommanded hardware topology in this case? Besides of the two server machines, do I need any extra hardware that will act as a DNS server to resolve rounting to the correct server?
If not, how can this be done with software?
2. Data base replication - I understand that I will need to use some sort of log shipping in order to syncronize between the databases. What are the limitations and guidelines? I need to know if there is a tradeoff for good performace vs. having an up-to-date replication of the database. A good article will be helpful.
3. Considering that rewriting the services application to support running in some sort of "passive" mode and transmitting state-data between the servers is probably not possible, what should be done with those services on the secondary machine?

Was it helpful?

Solution

I think you have the wrong approach to this, instead of using a hot standby you should use load balancing and clustering to provide availability.

My recommendation is to run the web application on both servers and use an IP Load Balancer to distribute requests between the two servers. If one of the servers becomes unavailable user requests will no longer be routed to that server and users will not really notice that a disruption has occurred. You should try to make use of an exising load balancer in your companies infrastructure.

If you have more than two servers available I would also recommend that you look at Windows Network Load Balancing (NLB) which a feature included in Windows Server, read more about NLB at http://technet.microsoft.com/en-us/library/cc725691.aspx. But as NLB and fail-over cluster is not supported on the same servers I cannot recommend that if you only have two servers.

For the database I would recommend that you use a 2-nodes active-passive database cluster, instead of deploying two separate SQL instances with replication between them. In a cluster configuration SQL Server runs on a single server but if that server has a problem SQL Server automatically switch over to the other server. Read more about SQL Server clustering at http://sql.starwindsoftware.com/sql-server-clustering-technology.

Implementing a clustering solution will require some sort of shared disk between the two server, because both servers can be active instances they have to be able to write to the same disks. If your organization has a SAN available then that is the preferred choice for the shared disk.

But now comes the problem with the background services. If they cannot be modified you just have to come up with some mechanism to move them if a server fails. If the servers are monitored you could have a technician initiate a script which starts the services on the other server. Manual operations are never reliable, but if you cannot rewrite them you don't have much choice.

If you have two server I recommend:

          HW IP Load Balancer
                  |
    -----------------------------
    |                           |
SERVER A                     SERVER B
ASP.NET web app              ASP.NET web app
SQL Server (active)          SQL Server (passive)
Bg services (not running)    Bg services (running)

I you have four servers I would recommend:

        HW IP LB or Windows NLB
                  |
    -----------------------------
    |                           |
SERVER A                     SERVER B
ASP.NET web app              ASP.NET web app
    |                           |
    -----------------------------
                  |
    -----------------------------
    |                           |
SERVER C                     SERVER D
SQL Server (active)          SQL Server (passive)
Bg services (not running)    Bg services (running)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top