views:

51

answers:

2

Hi there, fellows.

I'm a total unix-way guy, but now our company creates a new application under ASP.NET + SQL Server cluster platform.

So I know the best and most efficient principles and ways to scale the load, but I wanna know the MS background of horizontal scaling.

The question is pretty simple – are there any built-in abilities in ASP.Net to access the least loaded SQL server from SQL Server cluster?

Any words, libs, links are highly appreciated.

I also would be glad to hear best SQL Server practices or success stories around this theme.

Thank you. Pavel

A: 

SQL Server clustering is not load balancing, it is for high-availability (e.g. one server dies, cluster is still alive).

Joe
Yeap, that's totally what I need. So do we access some proxy-sql-server which routes queries, or routing and cluster logic should be designed on the app-side?
Pavel
And so on – what are MS techniques for LB? I'm reading google, but real experience is also quite interesting.
Pavel
Do you already know you have a load issue, or not? You state you need load balancing but you don't say in what ways, so it's hard to direct suggestions. We run some extremely heavy loads through traditional clusters (with the primary node doing most of the work) with no real issues.
Joe
Using traditional clusters is what i'm actively thinking about. Today HP suggested new server hardware builds, which can be scaled up to 1TB of memory. Ohh, we can store almost everything if fast ram – that's cool. How much memory and processors do serve your extremely high load? Can you give me some numbers about the load itself then? Although, we can move to e-mail :)
Pavel
A: 

If you are using SQL Server clustering, the cluster is active/passive, in that only one server in the cluster ever owns the SQL instance, so you can't split load across both of them.

If you have two databases you're using, you can create two SQL instances and have one server in the cluster own one of the two instances, and the other server own the other instance. Then, point connection strings for one database to the first instance, and connection strings for the second database to the second instance. If one of the two instances fails, it will failover to the passive server for that instance.

An alternative (still not load-balancing, but easier to setup IMO than clustering) is database mirroring: http://msdn.microsoft.com/en-us/library/ms189852.aspx. For mirroring, you specify the partner server name in the connection string: Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;Failover Partner=myBackupServerAddress; ADO.Net will automatically switch to the failover partner if the primary fails.

Finally, another option to consider is replication. If you replicate a primary database to several subscribers, you can split your load to the subscribers. There is no built-in functionality that I am aware of to split the load, so your code would need to handle that logic.

Paul Kearney - pk
Useful, thanks.
Pavel