Reputation: 20803
One issue with ASP.NET apps is that they periodically reload themselves, causing a long delay and possibly timeout for users who hit the site during that time.
This may not be a problem for small websites, but it can represent significant downtime for high-traffic sites, if users happen to get routed to node in the web farm that is restarting.
Pre-compling can help, but for websites with many pages, there is still an unavoidable delay.
Can load balancers somehow "know" if an ASP.NET application domain on a specific server is restarting? Then, they can route traffic around this server until the application has completed restarting.
Currently, I have my load balancer ping a simple .aspx page on the site. If there is a delay or the page fails to load, the host is taken out of rotation. Is it possible to do a more targeted health check, perhaps at the IIS level rather than ASP.NET level?
Upvotes: 5
Views: 541
Reputation: 381
If you are using IIS7 you could look into the application warm up module to start your app even after an AppPool reset.
http://learn.iis.net/page.aspx/688/using-the-iis-application-warm-up-module/
Upvotes: 2
Reputation: 3248
Both IIS6 and IIS7 support scheduling app pool restarts at fixed times/intervals. If your load balancer can take nodes out on a schedule you could synchronize the two schedules.
You could also force a recycle from the load balancer programatically, have a look at http://blog.developers.ie/cgreen/archive/2006/10/20/2341.aspx for 2 options.
Of course these won't handle cases when the app pool is restarted for other reasons.
Upvotes: 0