title: Thoughts on using Nginx to proxy webrequests to a .Net HttpListener based Json service
body: <p>I am making a webservice that only needs to serve json and it needs to be scalable.</p>
  
  <p>I have gotten the impression that Nginx is a more scalable webserver than IIS 7.5 and that it is extremely simple to manage compared to IIS. Also, Nginx can very easily be used to load balance among several json services, using the upstream module.</p>
  
  <p>As I only need to serve json I feel that ASP.Net and IIS i way overkill. I just need some very simple routing and a simple authcookie mechanism I easily can write myself. </p>
  
  <p>Right now I am using MVC3 but feels it is to bloated when I only servce Json, and I am very annoyed by the facts that I am having to write custom Auth attributes to make a default deny policy, having to make a HttpModule to hack around WindowsFroms authentication's default redirection of unauthorized requests and in general needs to read and learn a lot to stay in control of the framework. I have also considered WCF but my prev. experience with this was that there was to much bloat and configuration for my needs and to much stuff to know about to stay in control. </p>
  
  <p>I prefer simplicity and want to avoid "framework overhead" when I just need to handle some Http for a simple, fast and scalable async json service. So I am considering a setup like this:</p>
  
  <ul>
  <li>An Nginx webserver on a linux box that load balances among and proxies webrequests to async json services.</li>
  <li>The json services are written as Windows Services using HttpListener to do Async handling of web reqests.</li>
  </ul>
  
  <p>What are your thoughts about this architecture ? </p>
  
  <p>EDIT: Actually I think it would be more performant using fastcgi from nginx to the windows services instead of proxying http prequests ? What are your thoughts ?</p>