lua-resty-redis
lua-resty-redis copied to clipboard
Connection pool not creating
trafficstars
`local red = redis:new() red:set_timeout(10000) local options_table = {} options_table.pool_size = 1 options_table.backlog = 1
local ok, err = red:connect(redis_endpoint, redis_port, options_table) ngx.say("reused times: ", red:get_reused_times())`
How to make sure that connection pool is created ??? For testing purpose kept the pool_size as 1, so that the same connection get reused. But every time the red:get_reused_times() returns 0, that means new connection getting created everytime, instead of using the existing pool.
Is their any issue with the code ?