nginx: Enable keepalive for communication between lbs and frontends.

(imported from commit a7c8d9dfefbb6e5d01c8050688d831787b31bbd4)
This commit is contained in:
Tim Abbott
2013-12-05 16:27:36 -05:00
parent a337638f7f
commit 09a61e8128
3 changed files with 8 additions and 0 deletions

View File

@@ -2,5 +2,6 @@
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header Upgrade $http_upgrade;
# This should override the Connection setting in zulip-include/proxy
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Real-IP $remote_addr;

View File

@@ -1,4 +1,7 @@
proxy_http_version 1.1;
# Clearing the Connection header is required for keepalives from the load balancer
# http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_next_upstream off;

View File

@@ -1,9 +1,13 @@
upstream staging {
server staging.zulip.net:443;
keepalive 10000;
}
upstream prod {
server prod0.zulip.net:443;
keepalive 10000;
}
server {