NodeBB: to Redis, or to not Redis?

General Discussion
  • Hi guys!

    First and foremost, this new thread is a response to these threads:

    1. How to Transfer data from Redis to MongoDB, oh hi @suraj
    2. [OLD] Migrate NodeBB from MongoDB to Redis?

    Short answer: Not really possible at the moment.

    Long. Long-ish answer: It is possible by using the importer, which I guess you might need to wear helmet and kevlar before doing that, and a bunch of duct tapes. You might want to check it here: Database Migration. The other way to do this without using the nodebb-plugin-import is to deal directly with both database, which might be intimidating for beginners.

    First, if you are currently using Redis, export/convert the dumped database .rdb file to JSON (which can't be done directly through the redis-cli, as far as I know), and then import that JSON file into the MongoDB. Follow the discussion here on GitHub: redis-cli ability to convert an RDB file into JSON or CSV and vice-versa.

    For the brave soul, I recommend you guys to try. For the less brave soul, be braver.

    Redis as the in memory key-value storage

    If you fear that your Redis will fill up the maximum available capacity of the memory, use MongoDB. When you are in doubt whether or not the Redis will fill up the memory, use MongoDB. However, theoretically speaking, a VPS with 512 MB RAM will do fine. I don't have number here, but I believe the NodeBB core developers can tell about their current setup and how much the NodeBB + Redis consumes the memory.

    However, if you are interested to over-engineer your NodeBB installation, try this advanced setup: NodeBB + Redis + MongoDB.

    Extra Notes

    Feel free to read my lab notebook when I was experimenting with the Redis maxmemory function: NodeBB - to Redis, or not to Redis, and also the afterthoughts here: when I was experimenting with Redis, I didn't backup the db

    Hope this thread helps to clarify few things!

  • Thanks for the insight @aixnr! We still recommend redis as the default storage engine, especially for small forums, as it was what NodeBB was originally built against. MongoDB is supported just as well as Redis, so there is no fear of it ever being deprecated or considered a second-class citizen when it comes to support.

    As for those stats you were asking about:


    • 28,600 Posts
    • 3,645 Topics
    • 3,867 Users
    • 139.08MB memory used in Redis

Suggested Topics