Skip to content

Commit

Permalink
fix: Removes connection limiting for the moment hawtio#272
Browse files Browse the repository at this point in the history
* Trying to connection or rate limiting requests to the nginx server
  fails to provide a satisfactory working application

* Even rate limiting to 40 requests/second can kill the application by
  simply opening it in 5 different tabs

* Needs a far more sophisticated understanding of how to handle implementing
  such limits
  • Loading branch information
phantomjinx committed Dec 20, 2023
1 parent 9e7514c commit 5d16a87
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
8 changes: 0 additions & 8 deletions docker/nginx-gateway-k8s.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ proxy_cache_path /var/cache/nginx/pods levels=1:2 keys_zone=pods:2m max_size=4m
proxy_cache_path /var/cache/nginx/rbac levels=1:2 keys_zone=rbac:256k max_size=3m inactive=60m use_temp_path=off;
proxy_cache_path /var/cache/nginx/rbac2 levels=1:2 keys_zone=rbac2:256k max_size=3m inactive=60m use_temp_path=off;

# Setup a connection zone to control number of connections
limit_conn_zone $binary_remote_addr zone=limitconnbyaddr:20m;
# Return status code for too many connections
limit_conn_status 429;

map $uri $new {
/ /online/;
/online /online/;
Expand All @@ -30,9 +25,6 @@ server {
gzip on;
root /usr/share/nginx/html/;

# Limit a single IP to 75 connections
limit_conn limitconnbyaddr 75;

# Limit the keepalive of connections (60s default)
keepalive_timeout 60s;

Expand Down
8 changes: 0 additions & 8 deletions docker/nginx-gateway.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ proxy_cache_path /var/cache/nginx/pods levels=1:2 keys_zone=pods:2m max_size=4m
proxy_cache_path /var/cache/nginx/rbac levels=1:2 keys_zone=rbac:256k max_size=3m inactive=60m use_temp_path=off;
proxy_cache_path /var/cache/nginx/rbac2 levels=1:2 keys_zone=rbac2:256k max_size=3m inactive=60m use_temp_path=off;

# Setup a connection zone to control number of connections
limit_conn_zone $binary_remote_addr zone=limitconnbyaddr:20m;
# Return status code for too many connections
limit_conn_status 429;

map $uri $new {
/ /online/;
/online /online/;
Expand All @@ -31,9 +26,6 @@ server {
gzip on;
root /usr/share/nginx/html/;

# Limit a single IP to 75 connections
limit_conn limitconnbyaddr 75;

# Limit the keepalive of connections (60s default)
keepalive_timeout 60s;

Expand Down
8 changes: 0 additions & 8 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Setup a connection zone to control number of connections
limit_conn_zone $binary_remote_addr zone=limitconnbyaddr:20m;
# Return status code for too many connections
limit_conn_status 429;

map $uri $new {
/ /online/;
}
Expand All @@ -21,9 +16,6 @@ server {
gzip on;
root /usr/share/nginx/html/;

# Limit a single IP to 75 connections
limit_conn limitconnbyaddr 75;

# Limit the keepalive of connections (60s default)
keepalive_timeout 60s;

Expand Down

0 comments on commit 5d16a87

Please sign in to comment.