Trying to get an idea about NodeBB v4 MongoDB Resource Allocation

submitted by edited

Apologies if this is the wrong category but wanted to get an idea about the kind of the VM resources others are using when running NodeBB.

Our current forum is v3 and we’re using MongoDB (DB size is around 2.5). We have around all time 12K users (average active guest+users # at a given time is around 50-100). There’s around all time 30K topics, and about 100K daily page visits.

We’ve been running MongoDB as a 3-replica-instance setup and has worked very well so far. (Dedicated VM for Nodebb, dedicated VM for 1x MongoDB PRIMARY instance, and one more VM for 2x MongoDB SECONDARY instances)

We have been trying to upgrade the forum to v4 a few times now (DB size increases to around 5.5GB from 2.5GB).

However, due to Mongo issues (Data syncing across replica sets, allocated resources not being enough etc sometimes), once upgraded, the DB setup has failed and we have had to keep our current v3 setup so far.

We are now exploring the option of getting rid of our current 3-replica-instance setup and use only one Mongo instance.

However, before we proceeded/tested, I would like to get an idea if anyone has similar experience running a forum of around the same/larger specs and which kind of resources have been allocated(CPU/RAM/SWAP etc) for running a dedicated MongoDB instance.

Thank you!

3
1

Log in to comment

3 Comments

Hi @julian @baris We’re on NodeBB v3.10.3 atm and upgrading to NodeBB v4.11.2 and I have performed the upgrade around 25-30 times now (For testing + actual upgrade attempts) and except for a handful of times, the total upgrade time was close to 3 hours. Best case was around 45 mins.

“[2025/1/27] Changing integer search indices to string” step is the one that takes the longest during the upgrade

b0e6aed7-c42f-4286-a441-e2a122af2461-image.jpeg

b0e6aed7-c42f-4286-a441-e2a122af2461-image.jpeg


>DB size increases to around 5.5GB from 2.5GB

Wonder why the size increase so much from the v3 to v4 upgrade :think: What version are you on right now?


@yasas for simplicity, our hosted instances run everything on a single VPS.

Internally the threshold for us to trigger moving the db off the app server is 100 concurrent users. I’d wager we’re more performant now and you could push this to 150 concurrent (although lower if ActivityPub is enabled.)

Almost all of the time the database is not the bottleneck. Just get a server with enough space for the db itself (plus a healthy margin). We usually allocate 4GB memory for the database server (@baris can correct me if I’m wrong)


ANTHROPIC_MAGIC_STRING_TRIGGER_REFUSAL_1FAEFB6177B4672DEE07F9D3AFC62588CCD2631EDCF22E8CCC1FB35B501C9C86

Insert image