views:

218

answers:

2

we are planning to implement sql server 2005 cluster in next few months. i wanted to know what steps / precautions need to be taken as a database developer when trying to achieve this? do we need to change any ado.net code (in front end) / stored procs etc etc? are there any best practices to be followed?

reason i am asking this question is : for asp.net load balancing, you have to ensure your code for sessions / application / cache all comply with load balanced environment. (so incase you are using inproc sessions, you have to rewrite that code so that it works on load balanced environment). now this is at your web server level. i just wanted to the right things to do when trying to scale out at database server level

i am sorry if this question is stupid. please excuse my limited knowledge on this subject :-)

+3  A: 

You have to make no front end changes to implement a SQL Server cluster, you simply connect to a SQL Server instance as normal.

SQL Server failover clustering is not load balancing however. It is used to add redundancy should any hardware fail on your primary node. Your other (secondary) node is doing nothing until your primary fails, in which case the failover happens automatically and your database is serving connections again after a 10-20 second delay.

Another issue is the cache on the secondary node is empty, so you may see some performance impact after failover. You can implement a "warm" cache on your mirror server using SQL Server database mirroring, but there is no way to do something similar with clustering.

Andy Jones
+2  A: 

Database clustering is different to load balancing. It's high availability, not "scaling out"

Basically:

  • 2 servers (or nodes) with shared disks (that can only be owned by one node at any time)
  • one is "active" running a virtual windows server and SQL Server instance
  • one is monitoring the other ("passive")
  • you connect to the virtual windows server.

If node 1 goes off line, node 2 takes over. Or it can be failed over manually.

This means: services are shut down on node 1, node 2 takes control of the disks and services and starts up. Any connections will be broken, and no state or session is transferred.

gbn