title: Multi-threading in Web Application (WCF / WebAPI)
body: <p>I have an "engine" that I want to expose via an HTTP layer (hosted with WebAPI / WCF).</p>
  
  <p>This engine does some simple read only operations on large volumes of data and can really benefit from parallelism. A simple switch from for(...) to Parallel.For(...) does wonders.</p>
  
  <p>Now I think we shouldn't do these kind of multi-threading in a web server, so I'm trying to figure out the best way to host this.</p>
  
  <p>Ideally I'd like this to be hosted in IIS as a standard web app either with WebAPI or WCF. If this is not a good solution, what would be a good alternative?</p>
  
  <p>Would it be to better to self host WebAPI or WCF in a standard Windows Service? I'm not sure if the issues here are IIS or ASP.NET specific.</p>
  
  <p>Or maybe this is not a problem and I'm just worrying too much?</p>
  
  <p>Any inputs would be appreciated.</p>
  
  <p>Thanks</p>