What does Discourse use Redis for?

Currently my Discourse install uses a DigitalOcean managed PostgreSQL database and a DigitalOcean managed Redis instance. Is the managed Redis server necessary?

Does Discourse store anything permanent in Redis or is it only used for caching/other kinds of temporary data?

My current setup (definitely overkill but it will make scaling easy if it’s needed one day):

  • DigitalOcean managed PostgreSQL server
  • DigitalOcean managed Redis instance
  • DigitalOcean Load Balancer
  • Two DigitalOcean droplets, each running Discourse

A simpler setup I was thinking about is:

  • DigitalOcean managed PostgreSQL server
  • A single server running both Redis and the Discourse application with a floating IP to fallback to a backup server if needed.

My current setup can seemlessly swap web servers without the user noticing because of the external Redis server, I think the simpler setup will log out users if the fallback server is needed, is this the main downside of having Redis on the same server as Discourse?

Thanks,
Francis

3 Likes