P
P
Pavel2015-02-03 11:02:09
Redis
Pavel, 2015-02-03 11:02:09

Persistent redis connection in meteor js?

Gentlemen, please tell a newbie on this issue:
I use radish in a meteor, when writing or reading from radish, I constantly create a connection and then close it:

var client = redis.createClient() ;
//тут что то делаю
client.get('someKey', function(err, result){
//....
}) ;
client.quit() ;

Is this behavior correct? constant opening and closing, or is it possible to create a connection once at the start of the application, and use it throughout the life of the application? and how the option will be more productive if a large number of connections is expected? ) thanks in advance )

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question