lua-resty-redis
lua-resty-redis copied to clipboard
[Question] Difference between connect pool_size and set_keepalive pool_size
trafficstars
I don't understand the difference between:
red:connect("unix:/path/to/unix.sock", { pool_size = 1000 })
and this:
red:set_keepalive(10000, 1000)
Both create a pool a 1000 reusable connections, am I right ?
If so, why adding the pool_size option in set_keepalive and vice-versa ?
the size from keepalive is deprecated, you can refer to https://github.com/openresty/lua-nginx-module#tcpsocksetkeepalive
the size from keepalive is deprecated, you can refer to https://github.com/openresty/lua-nginx-module#tcpsocksetkeepalive
I don't even have access to the underlying socket, how am I supposed to set keepalive ?
Edit: Ok I got it, I must use pool_size from the connectmethod