Is anyone aware of a lua http lib that supports keepalive?
When sending a request you can pass the following keepalive settings which will keep the connection open:
local http = require "resty.http"
local httpc = http.new()
httpc:connect("127.0.0.1", 9081)
local response, err = httpc:request({
path = "/proxy" .. ngx.var.request_uri,
method = "HEAD",
headers = ngx.req.get_headers(),
keepalive_timeout = 60,
keepalive_pool = 10,
})