Skip to content

Commit

Permalink
[proxy] allow customizing concurrency level
Browse files Browse the repository at this point in the history
  • Loading branch information
mikz committed Mar 9, 2017
1 parent e6c90b1 commit 67bd043
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apicast/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ env BACKEND_ENDPOINT_OVERRIDE;
env APICAST_CONFIGURATION_LOADER;
env APICAST_CONFIGURATION_CACHE;

env APICAST_CONCURRENCY;

error_log /dev/null emerg;

events {
Expand Down
2 changes: 1 addition & 1 deletion apicast/src/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ local resty_resolver = require 'resty.resolver'
local http_ng = require('resty.http_ng')
local user_agent = require 'user_agent'
local semaphore = require('ngx.semaphore')
local timers = semaphore.new(512)
local timers = semaphore.new(tonumber(env.get('APICAST_CONCURRENCY') or 512))

local empty = {}

Expand Down

0 comments on commit 67bd043

Please sign in to comment.