Scaling on 1.16.x requires redis - how to configure?
-
Looking to upgrade to 1.16.2 with a forum that uses clustering and runs on MongoDB
I see this:
https://community.nodebb.org/topic/15178/1-16-0-breaking-changes/3?_=1616876795709If you are using clustering redis is now a requirement. Simply install and configure redis in your config.json block. If you were already using redis as your datastore or for sessions no changes are necessary.
In the "scaling" page of the documentation this is:
Configure Redis
When you setup NodeBB to use more than one process, it is advisable to configure Redis as well. Each NodeBB process can communicate with the others through Redis pub-sub. Install Redis on your server and add a redis block to your config.json....So:
- Does redis need to be installed before upgrading to 1.16.x? or should the upgrade be done first, then redis installed (basically clarity on the upgrade sequence in this case)
- How is redis configured? Does the upgrade script create the database, admin user etc etc? If not where is the documentation on how to install and configure redis to be used for pub-sub, but not as the main database?
-
-
You don't need redis while upgrading to 1.16.x.
-
Upgrade script won't create the redis database or setup users. You need to install redis on your server and then add a redis block to your config.json like this.
"database": "mongo" "mongo": { ..mongo details }, "redis": { "host": "127.0.0.1", "port": "6379", "password": "", "database": "0" }
Once you start nodebb it will read the redis block and use redis for pubsub/sessions and passing around socket.io messages between the processes.
-
-
-
@TonyTony
Make sure you have updated in the nodebb configuration with the property"isCluster": true
When you use auto sclaing(HPA) of NodeBB, this is must. Otherwise you will end with lot of inconsistency in the API responses.
Note: This property will help if you use on Redis as your DB(not with the conbination of Mongo+Redis)
Thanks for the details mentioned in this post
https://community.nodebb.org/topic/15517/nodebb-mongodb-scaling-k8s/16