Reputation: 5356
Looking at implementing load balancing for Windows hosted web sites on IIS, but want to know of the issues involved in doing so. Website are ASP.NET - with a mix of custom authentication and ASP.NET Authentication. For example:
Regarding the files, could they easily be synced between servers? There may be up to 8MB files (occasionally bigger). DFS is an option that may be considered in the future, but are there other technologies (besides robocopy) that can be used?
Upvotes: 3
Views: 3138
Reputation: 3032
Files: Pointing to a network share solves some problems and introduces others, such as a single point of failure. Clustering the fileshare mitigates that a bit, but you still have a single copy of the data. I prefer a shared nothing approach where the content is local to each webserver, eliminating the SPOF and removing the network from the equation when serving content. I'm currently using robocopy to do this, not DFS - don't like the AD tie in, constraints on server placement in a zoned network infrastructure. Robocopy is not ideal, either.
Session State - agree, ASPState SQL database. Make sure you set up a common machinekey in your web.config for all of your servers, though, while I'm thinking about this.
Drop<sessionState
allowCustomSqlDatabase="true"
cookieName="yourcookiname"
mode="SQLServer"
cookieless="false"
sqlConnectionString="connnstringname"
sqlCommandTimeout="10"
timeout="30"/>
and
<connectionStrings>
<add name="connstringname" connectionString="Data Source=sqlservername;Initial Catalog=DTLAspState;Persist Security Info=True;User ID=userid;Password=password" providerName="System.Data.SqlClient"/>
</connectionStrings>
into web.config. lastly, run C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe -S sqlservername -E -ssadd -sstype p
Upvotes: 2