MongoDB best configuration for a Forum with more than 100k users and 200k topics.

  • Now I fixed the auth issue, but the problem remains with the command

     > MongoDB shell version: 2.6.5
     connecting to: test
     > use nodebb
     switched to db nodebb
     > db.auth('myuser','mypass')
     > db.collection.totalIndexSize()
     > db.collection.stats()
    { "ok" : 0, "errmsg" : "Collection [nodebb.collection] not found." }

  • Ok. The problem was the .collection

    > db.stats()
        "db" : "nodebb",
        "collections" : 5,
        "objects" : 10950579,
        "avgObjSize" : 559.5723418825617,
        "dataSize" : 6127641136,
        "storageSize" : 7159541760,
        "numExtents" : 28,
        "indexes" : 9,
        "indexSize" : 2563102416,
        "fileSize" : 10666115072,
        "nsSizeMB" : 16,
        "dataFileVersion" : {
                "major" : 4,
                "minor" : 6
        "extentFreeList" : {
                "num" : 0,
                "totalSize" : 0
        "ok" : 1
  • NodeBB

    You can also run db.objects.stats() if I'm not mistaken.

  • The problem is on the Category cause I have a lot of them.

    What about the other issue with the cluster=8?

  • NodeBB

    @andreapernici said:

    Options not savings, a message appearing/disappear

    For cluster to work properly you will need to configure redis for

    You can add a redis block into config.json with the default settings.

  • @baris mmm I'm using mongo.

    I have to configure also redis together with mongo?

    There is some more extensive docs about it specific to nodebb?

    I found this but it is already inside the nodebb packages or I have to install it and then put the configuration inside the nodebb config.json?

  • GNU/Linux Admin

    @andreapernici Officially, contains only an in-memory session adapter (which for obv. reasons won't work with a clustered setup), and a redis session adapter.

    So if you're clustering w/ Mongo, you'll have to set up Redis alongside, and have both mongo and redis configuration hashes in your config.json

  • Ok. I understand.

    I think it's correct. One of the thing I thought about NodeBB was that a good approach was to use Redis for notification etcetc and Mongo for the rest.

    In this case to make a summary:

    • install nodebb on Mongo.
    • create a Redis instance.
    • configure the json file with both mongo and redis references.

    If you have some example feel free to share 😄

  • Out of curiosity, why don't you use Redis? the new redis cluster feature let you shard data to multiple servers.

  • Banned

    This post is deleted!

Suggested Topics

| |