lua-resty-redis
lua-resty-redis copied to clipboard
How to create a single redis connection
trafficstars
I have tried creating a connection with pool_size = 1 and backlog=10 but every concurrent request creating new connection.
For 5 concurrent request this is the output. netstat | grep redis tcp 0 0 app-server:15174 app-redis-:6375 ESTABLISHED tcp 0 0 app-server:14600 app-redis-:6375 ESTABLISHED tcp 1 0 app-server:2666 app-redis-:6375 CLOSE_WAIT tcp 0 0 app-server:15156 app-redis-:6375 ESTABLISHED tcp 0 0 app-server:15158 app-redis-:6375 ESTABLISHED tcp 0 0 app-server:15170app-redis-:6375 ESTABLISHED
Ideally it should have created 1 connection and queued the rest 4. Right ? Is this a issue from my side?