Thursday 21 April 2016

Redis connection singleton?

Hi I want to use redis in my new node.js app (probably using ioredis package) The way I understand it, every time I create a new "Redis" object, a new connection to redis is created and maintained. I figured the best way is to implement some sort of singleton connection (connection pool is unnecessary because the best pattern is one connection per app) Do you think that's the best approach? I thought there would be lots of info about that kind of stuff but I couldn't find really. Thanks!

Submitted April 21, 2016 at 12:38PM by tzvikam

No comments:

Post a Comment