Are there potential issues with concurrent connections to a nodejs app deployed behind nginx?


I am trying to figure out if there are any concerns with concurrent connections to an upstream within nginx. I've configured nginx in a standard way:

upstream nodejs_app {

server {
  listen 80;

  keepalive_timeout 5;

  location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    # If you don't find the filename in the static files
    # Then request it from the node server
    if (!-f $request_filename) {
      proxy_pass http://nodejs_app;

If I was using rails, or some other server technology that processes requests sequentially I would add more servers in the upstream to handle more requests concurrently. But, given my understanding of nodejs apps, this should be unnecessary, as the single app should be able to handle as many requests as it can concurrently. My concern is that nginx will somehow break this functionality.. is this the case?

Problem courtesy of: quinn


I tested this out, concurrent connections don't seem to be restricted in any way. Short answer is, no, there is no problem.

Solution courtesy of: quinn


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.