You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/01/31 16:44:31 UTC

[GitHub] dubeejw closed pull request #3236: Fix nginx' performance regression.

dubeejw closed pull request #3236: Fix nginx' performance regression.
URL: https://github.com/apache/incubator-openwhisk/pull/3236
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ansible/roles/nginx/templates/nginx.conf.j2 b/ansible/roles/nginx/templates/nginx.conf.j2
index 7d56f92eca..e8e447bfe3 100644
--- a/ansible/roles/nginx/templates/nginx.conf.j2
+++ b/ansible/roles/nginx/templates/nginx.conf.j2
@@ -19,6 +19,7 @@ http {
         '$http_referer $http_user_agent $upstream_addr';
     access_log /logs/nginx_access.log combined-upstream;
 
+{# needed to enable keepalive to upstream controllers #}
     proxy_http_version 1.1;
     proxy_set_header Connection "";
 
@@ -37,6 +38,7 @@ http {
         keepalive 512;
     }
 
+{# determine "special users" to send the header accordingly #}
     map "$remote_user" $special_user {
       default not_special;
 {% for user in nginx.special_users %}
@@ -51,6 +53,8 @@ http {
       "special:" on;
     }
 
+    proxy_set_header X-OW-EXTRA-LOGGING $extra_logging;
+
     server {
         listen 443 default ssl;
 
@@ -79,7 +83,6 @@ http {
             if ($namespace) {
               rewrite    /(.*) /api/v1/web/${namespace}/$1 break;
             }
-            proxy_set_header X-OW-EXTRA-LOGGING $extra_logging;
             proxy_pass http://controllers;
             proxy_read_timeout 75s; # 70+5 additional seconds to allow controller to terminate request
         }
@@ -89,7 +92,6 @@ http {
             if ($namespace) {
               rewrite    ^ /api/v1/web/${namespace}/public/index.html break;
             }
-            proxy_set_header X-OW-EXTRA-LOGGING $extra_logging;
             proxy_pass http://controllers;
             proxy_read_timeout 75s; # 70+5 additional seconds to allow controller to terminate request
         }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services