diff --git a/CHANGELOG.md b/CHANGELOG.md index 001aea2ea..b0ab10eab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Upstream TLS v1.3 [PR #1400](https://github.com/3scale/APIcast/pull/1400) [THREESCALE-9193](https://issues.redhat.com/browse/THREESCALE-9193) - Updated policy list for v3.13.2 [PR #1404](https://github.com/3scale/APIcast/pull/1404) - Updated policy list for v3.14.0 [PR #1407](https://github.com/3scale/APIcast/pull/1407) -- Add `APICAST_LUA_SOCKET_KEEPALIVE_REQUESTS` to limit the number of requests a single keepalive socket can handle [PR #1496](https://github.com/3scale/APIcast/pull/1496) [THREESCALE-11321](https://issues.redhat.com/browse/THREESCALE-11321) ### Removed diff --git a/doc/build.md b/doc/build.md index 0401f1fa7..2d75e644e 100644 --- a/doc/build.md +++ b/doc/build.md @@ -4,11 +4,11 @@ APIcast is an application based on [OpenResty](https://openresty.org/en/). APIca ## Release -APIcast is released as [Docker image](https://docs.docker.com). +APIcast is released as [Docker image](https://docs.docker.com/engine/tutorials/dockerimages/). ## Dependencies -APIcast uses LuaRocks, the package manager for Lua modules, to install dependencies. With a correct configuration, LuaRocks installs dependencies into the correct path where OpenResty can see them. +APIcast uses LuaRocks, the package manager for Lua modules, to install dependencies. With a correct configuration, LuaRocks installs dependencies into the correct path where OpenResty can see them. For Docker images, LuaRocks is installed into the application folder. Then, `luarocks path` adds the application folder to the load path. diff --git a/doc/parameters.md b/doc/parameters.md index af131ed75..15b3e302c 100644 --- a/doc/parameters.md +++ b/doc/parameters.md @@ -478,16 +478,6 @@ connections. By default Gateway does not enable it, and the keepalive timeout on nginx is set to [75 seconds](http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout) -### `APICAST_LUA_SOCKET_KEEPALIVE_REQUESTS` - -**Value:** positive integers -**Example:** "1" - -Sets the maximum number of requests that one keepalive connection can serve. -After reaching the limit, the connection closes. - -NOTE: This value affects connections opened by APIcast and will not have any -impact on requests proxied via APIcast. ### `APICAST_CACHE_STATUS_CODES` diff --git a/gateway/Roverfile.lock b/gateway/Roverfile.lock index ffcfcfbcf..0abd14ba7 100644 --- a/gateway/Roverfile.lock +++ b/gateway/Roverfile.lock @@ -28,4 +28,4 @@ net-url 1.1-1||testing nginx-lua-prometheus 0.20181120-3||production penlight 1.13.1-1||production,development,testing router 2.1-0||production -say 1.4.1-3||testing \ No newline at end of file +say 1.4.1-3||testing diff --git a/gateway/src/resty/resolver/http.lua b/gateway/src/resty/resolver/http.lua index 3f7bdbc09..4af497855 100644 --- a/gateway/src/resty/resolver/http.lua +++ b/gateway/src/resty/resolver/http.lua @@ -3,9 +3,6 @@ local resty_resolver = require 'resty.resolver' local round_robin = require 'resty.balancer.round_robin' local setmetatable = setmetatable -local resty_env = require 'resty.env' -local tonumber = tonumber -local keepalive_request = resty_env.get('APICAST_LUA_SOCKET_KEEPALIVE_REQUESTS') local _M = setmetatable({}, { __index = resty_http }) @@ -55,23 +52,4 @@ function _M.connect(self, host, port, ...) return ok, err end -function _M:set_keepalive() - if keepalive_request then - local count, err = resty_http.get_reused_times(self) - if err then - return nil, err - end - if count >= tonumber(keepalive_request) then - resty_http.close(self) - return true - end - end - - local ok, err = resty_http.set_keepalive(self) - if not ok then - return nil, err - end - return true -end - return _M