Cost effective, failsafe, 2 server load balanced web & DB servers

We were very poor when we first started Pageflakes so we needed a really
cheap but fully reliable deployment configuration. The requirement
was:

  1. Fail safe. If a server goes down, another one can take over
    without users noticing
  2. Database must be mirrored in multiple servers
  3. Web servers will be in Load Balanced mode so that incase one
    goes down, the other takes over immediately
  4. Do it with least hardware and cost

So, we thought a lot and could not make a reliable solution
without at least three servers. Then we found one with two servers
only. Here’s the plan:


We made the above plan for our hosting service provider.

We have 2 windows server both with IIS 6.0 and SQL Server 2005.
Let’s call these servers Web server and DB server.

Web server gets 60% web traffic configured via Network Load
Balancing. We used Windows Network Load Balancing in order to save
the cost of buying a separate Load balancer. We also used Windows
Firewall instead of external firewall. You can imagine how poor we
were. DB Server gets 40% web traffic and hosts the database in its
SQL Server 2005. We started with SQL Server 2005 Workgroup Edition
because it was the only version we could afford. So, we could not
use the new DB Mirroring feature instead we had to use Log
Shipping. The web server also had SQL Server 2005 but it was used
for a standby database so we did not have to pay for licensing fee.
Remember: You do not need to pay for SQL server license if
the server is hosting standby databases only.
The DB
Server also runs the web site in its IIS.

So, we have 2 servers running the website in NLB. So, web server
is properly load balanced and failsafe. Then we have database on
the DB Server which is log shipped to the web server. So, incase DB
server goes down, we can divert all traffic to the web server and
bring up web server’s standby database in order to run the site
solely from web server. When DB server comes back online, we
configure log shipping the opposite way and divert most of the
traffic to the DB server. Thus DB server becomes the web server and
previously web server becomes the DB server. It requires some
manual work and not fully automated. But the cheapest solution for
a reliable configuration.

So when you add more servers in future, it’s very easy to add
new ones.


2 thoughts on “Cost effective, failsafe, 2 server load balanced web & DB servers”

  1. we are also looking for similar cost effective solution. Lets try this out and will revert with suitable comments.

    SF Jaffer

    Group Head- IT

    Air Works India Engg Pvt Ltd

    http://www.airworks.in

    sayed.jaffer@airworksin

Leave a Reply