Quick, simple web farm setup
I am using asp.net 3.5 and SQL server 2008 and want to setup a very simple web farm.
I have purchased 2 VIRTUAL servers, I DO NOT use viewstate or sessions on my webpages, just cookies so all I need to do is have 2 versions of the same database, on each virtual server (I assume) and 2 versions of the binaries/webpages on each server (I assume). What I need is some sort of guide to set these up so that when a user makes a request:
a) The servers are load balanced and the request sent to the lea开发者_StackOverflow社区st loaded server b) Whenever a SQL database change is made, it is reflected in the other database too
Does this sound possible?
You're asking for two things: a web farm and a SQL cluster. SQL Server doesn't support active/active clustering/mirroring. You'll either need to set up DB mirroring (easier for hosted) or a SQL cluster, but regardless, only one SQL Server can be actively serving requests at a time. You can do multi-master replication on SQL Server, but there's usually a significant delay between servers, so if you don't have connection affinity on your web farm, you'll be plagued with stale data problems.
The web farm part is pretty easy since you app is stateless- especially if you're using IIS7. Just use the new ARR (Application Request Routing) extension.
精彩评论