Skip to content

Commit

Permalink
Merge pull request noobaa#7968 from guymguym/guy-loadbalance
Browse files Browse the repository at this point in the history
Load balancing config option to limit server.maxRequestsPerSocket and force clients to reconnect and rebalance
  • Loading branch information
guymguym authored Apr 15, 2024
2 parents ef5703c + 90fd69d commit 744552d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ config.ENABLE_OBJECT_IO_SEMAPHORE_MONITOR = true;

config.ENDPOINT_HTTP_SERVER_REQUEST_TIMEOUT = 300 * 1000;
config.ENDPOINT_HTTP_SERVER_KEEPALIVE_TIMEOUT = 5 * 1000;
config.ENDPOINT_HTTP_MAX_REQUESTS_PER_SOCKET = 0; // 0 = no limit

// For now we enable fixed CORS for all buckets
// but this should become a setting per bucket which is configurable
Expand Down
1 change: 1 addition & 0 deletions src/endpoint/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ function setup_http_server(server) {

server.keepAliveTimeout = config.ENDPOINT_HTTP_SERVER_KEEPALIVE_TIMEOUT;
server.requestTimeout = config.ENDPOINT_HTTP_SERVER_REQUEST_TIMEOUT;
server.maxRequestsPerSocket = config.ENDPOINT_HTTP_MAX_REQUESTS_PER_SOCKET;

server.on('error', handle_server_error);

Expand Down

0 comments on commit 744552d

Please sign in to comment.