0

We were able to set up our sails app to use redis as our session store and socket connection. But we don't know how to set up sails to connect to a redis cluster, any thoughts/examples available?


Just to make it a little more clear, our sails app is already using redis using a config similar to :

host: 'localhost',
port: 6379,
ttl: <redis session TTL in seconds>,
db: 0,
pass: <redis auth password>
prefix: 'sess:'

But now we want to set it up to use redis cluster, which might be running on various servers and various ports.

Peter
  • 775
  • 1
  • 6
  • 12

1 Answers1

2

You can configure app to keep cookies in redis in

./config/session.js

configuration file.

UPD: To connect to redis cluster you may use another adopter with cluster support. sails-ioredis seems to work fine for you (I don't use it by myself though). Details from this question may help you as well.

Community
  • 1
  • 1
Boris Zagoruiko
  • 12,705
  • 15
  • 47
  • 79