0

This is the NGINX config file:

            gzip                  on;
            gzip_disable    "MSIE [1-6]\.";
            gzip_vary          on;
            gzip_proxied    any;
            open_file_cache max=200000 inactive=20s; 
            open_file_cache_valid 30s; 
            open_file_cache_min_uses 2;
            open_file_cache_errors on;
            access_log off;
            sendfile on;
            tcp_nopush on;
            tcp_nodelay on; 
            keepalive_timeout 0;
            reset_timedout_connection on;
            client_body_timeout 10;

            ...

            events {
               worker_connections  4000;
            }
            worker_processes  4;

The problem is that many users cannot get the file (cannot connect/timeout) The file is a push message, to an desktop app.

So, I have two questions: 1. Anyone knows the maximum "worker_connections" that ningx supports on Windows 2008 R2? 2. Do I need to change something in Windows Registery, I cannot find what to change, and the exact numbers.

I don't want to be off-topic, but just to tell the background. Today I am serving the file using Amazon S3, and it cost almost $1000 per month. I have a dedicated server, so I want to save the $$$, and serve the file myself. If you know about other cheaper alternative to S3, you can comment.

Thank you.

  • 1
    Why are you using nginx on Windows? Why not nginx on Linux or IIS on Windows? – MDMarra Apr 18 '14 at 11:30
  • There are many features to use NGINX. (reverse_proxy, multi HTTPS urls on same IP, performance, and more) – Aminadav Glickshtein Apr 18 '14 at 11:37
  • Those features are available on Windows. What I'm asking isn't "why nginx?" it's "why nginx **on Windows**?" This isn't a common setup. People don't typically run applications designed for *nix and ported to Windows in production networks. – MDMarra Apr 18 '14 at 11:39
  • Soon or later I will move to Linux, and I want the transfer to be easy. The only reason I am using Windows is to server one old ASP Classic site. Do you believe that the performance of IIS on windows, will be better that the performance of NGINX? – Aminadav Glickshtein Apr 18 '14 at 11:47
  • Performance rarely is a product of the web server unless you're in extremely high-volume scenarios. Based on the question, I would doubt you're there. And yes, IIS can perform well. This website is run on IIS and MS SQL Server, for example. – MDMarra Apr 18 '14 at 11:48
  • 1
    Before I move to IIS, I cannot find any evidence, that IIS can server 10K simultaneous requests. – Aminadav Glickshtein Apr 18 '14 at 11:57
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/13987/discussion-between-amina-and-mdmarra) – Aminadav Glickshtein Apr 18 '14 at 11:59
  • 3
    The entire Stack Exchange network runs on it. What more evidence do you need? – MDMarra Apr 18 '14 at 12:03
  • @Amina: You appear to have evidence that nginx on windows on your server can't manage it why not just suck it and see the way yo have done with nginx? – user9517 Apr 18 '14 at 14:23
  • Yes, on my server it's not work. Some om my users cannot connect or get a connection timeout error. – Aminadav Glickshtein Apr 18 '14 at 14:36
  • possible duplicate of [Can you help me with my capacity planning?](http://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning) – Wesley Apr 18 '14 at 16:41
  • Thank you everyone. I moved to IIS on my windows.. Now I can serve 10K+ users per seconds. it's not a problem any more. – Aminadav Glickshtein Apr 20 '14 at 10:41

1 Answers1

2

On Windows, nginx has significant limitations:

  • You can only have 1024 worker_connections. Any higher number will be ignored. And even if you start more than one, only one worker will actually do any work.
  • nginx can only use select(); there is no high-performance event handler.

These are the reasons why using nginx on Windows for high performance, high scalability environments is a bad idea.

Switch to nginx on a non-Windows operating system as soon as possible.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940