Search code examples
node.jsherokuredisredistogo

Is RedisToGo available "locally" on heroku?


I was planing to use Redis for session storage.

According to this question: What is a good session store for a single-host Node.js production app? it seems that when redis is not available 'locally' it is not fast at all.

How it looks like on heroku?

Let's assume I have my node app deployed on heroku and scaled to 4 instances:

web.1
web.2
web.3
web.4

Let's assume I provision addon redisToGo and I use it as session store.

  1. What will be the speed of such redis instance? Like it was available 'locally' or 'remotely'?
  2. It is a good idea to use it for session store?

Solution

  • Redis installed locally is definitely faster, but that is not a typical use case at all. You almost always want Redis installed on a separate server, and web/app servers connect to redis over a tcp/ip connection.

    That said, you usually want redis in the same data center, otherwise the latency will be too high. RedisToGo and Heroku - both work on AWS. As long as you choose the same region in both heroku and redistogo, you should be fine.

    In general, Redis is good for session storage.