Browse Source

nginx reuse port

Kamil Endruszkiewicz 8 years ago
parent
commit
c81218aceb

+ 2 - 2
frameworks/Python/bottle/nginx.conf

@@ -37,12 +37,12 @@ http {
         # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
         # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
         # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
         # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
         # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn
         # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn
-        listen       8080 default_server deferred backlog=65535;
+        listen       8080 default_server deferred reuseport backlog=65535;
         server_name  localhost;
         server_name  localhost;
 
 
         location / {
         location / {
             uwsgi_pass unix:/tmp/uwsgi.sock;
             uwsgi_pass unix:/tmp/uwsgi.sock;
             include /usr/local/nginx/conf/uwsgi_params;
             include /usr/local/nginx/conf/uwsgi_params;
         }
         }
-    }    
+    }
 }
 }

+ 2 - 2
frameworks/Python/flask/nginx.conf

@@ -37,12 +37,12 @@ http {
         # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
         # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
         # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
         # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
         # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn
         # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn
-        listen       8080 default_server deferred backlog=65535;
+        listen       8080 default_server deferred reuseport backlog=65535;
         server_name  localhost;
         server_name  localhost;
 
 
         location / {
         location / {
             uwsgi_pass unix:/tmp/uwsgi.sock;
             uwsgi_pass unix:/tmp/uwsgi.sock;
             include /usr/local/nginx/conf/uwsgi_params;
             include /usr/local/nginx/conf/uwsgi_params;
         }
         }
-    }    
+    }
 }
 }

+ 1 - 1
frameworks/Python/tornado/requirements.txt

@@ -1,3 +1,3 @@
-tornado==4.3
+tornado==4.4.2
 motor==0.6.2
 motor==0.6.2
 Momoko==2.2.3
 Momoko==2.2.3

+ 2 - 2
frameworks/Python/uwsgi/nginx.conf

@@ -37,12 +37,12 @@ http {
         # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
         # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
         # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
         # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
         # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn
         # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn
-        listen       8080 default_server deferred backlog=65535;
+        listen       8080 default_server deferred reuseport backlog=65535;
         server_name  localhost;
         server_name  localhost;
 
 
         location / {
         location / {
             uwsgi_pass unix:/tmp/uwsgi.sock;
             uwsgi_pass unix:/tmp/uwsgi.sock;
             include /usr/local/nginx/conf/uwsgi_params;
             include /usr/local/nginx/conf/uwsgi_params;
         }
         }
-    }    
+    }
 }
 }