Nginx – Mono on Linux: Apache or Nginx

apache-2.2asp.netmononginx

I'm developing an ASP.NET application that will be run under Linux/Mono for various reasons (mostly to stay away from IIS, quite frankly). Of course the first web server I had in mind was Apache. But Apache, for all its advantages, adds a lot of overhead. Also, the application I'm building needs to be highly scalable and performance is one of the main concern.

Apache has, obviously, a very good reputation and its record speaks for itself, but I don't need things like Reverse Proxy or Load Balancing because dedicated network devices would be used for that. So those modules from Apache will never be used.

So basically my question is: since Nginx seems to fit exactly needs, is there any caveat I should be aware of? For instance, is Nginx renowned to be particularity safe? When security flaws are detected, how fast are they patched?

Any insight on the pros and cons of using either of those servers in conjunction with Mono is welcome.

Best Answer

ask yourself WHAT the application will be doing

lots of file I/O? well then apache's threading model is just fine, file I/O is blocking

long-running connections with clients? then nginx's event model is more appropriate, network I/O can be nonblocking

the most honest answer is that its unlikely you will be hitting the architectural limits of ANY webserver. just use whatever you are most comfortable with. the "overhead" arguments directed against apache's thread model are only meaningful in high-traffic scenarios.

Related Topic