views:

120

answers:

3

I see a lot of the multi-core information on the web applied to desktop applications - but I am interested: what tips and pointers would be useful for ASP.NET MVC web developers building applications that make the most of multiple cores/processors?

A: 

I don't think a web app gets as much value from multi-core/multi-threading as a desktop app, because ultimately each HTTP request is synchronous (except for AJAX, but each AJAX request is still an HTTP request). Certainly a server with multi-core is a good thing, and can probably handle requests faster, but I don't think there's much (in general) you can do with a multi-threading app that ultimately renders an HTML document.

mgroves
+1  A: 

If you have multiple long running processes per request, you could parallelize them. But generally it's not worth the coding effort and bugs that could show up.

In practice, just make each request lean, and then you can handle more requests at one time.

Mufasa
+2  A: 

Leave it to the web server

I wouldn't mess with it in a web application unless it does some sort of processor heavy processing. Make sure your application performs well and leave processor(s) utilization to the web server to serve requests with all cores in the system.

Robert Koritnik
Ahhh the famous "lateral answer"!
joshcomley
This man speaks the truth.
Wyatt Barnett