How to Speed Up My Site On NodeBB?
-
Hello All!
Though the site runs on VPS, it still loads slowly when compared to other sites on the same server. As you might be knowing a slow loading site is a dead one.
In WordPress, there are caching plugins and customization options to enable faster loading of a website.
In a similar way, I'm looking for tips to speed up my nodeBB forum.
-
Have you looked at the scaling docs?
-
@PitaJ said in How to Speed Up My Site On NodeBB?:
Have you looked at the scaling docs?
I can attest that this config fairly rocks. Proxy for static content access coupled with Redis for session management. Yippie yi-yo kiyah!
OTOH: Targeting KISS, I'd just rock a single mongod and scale vertically, i.e. toss more $$ at it...
Note: Were I to run a sharded/replicated mongodb backend then I'd seriously consider having mongod handle session management and cut redis. My $0.02. You get what you pay for. If'n yer' lucky & I'm having a good day....
-
Hey guys!
What about cronJobs on multiple instances? Are they executing on every instance of nodebb or only on first for example?
-
Ok guys I have found the answer:
In prestart.js there is:
nconf.set('runJobs', nconf.get('isPrimary') && !nconf.get('jobsDisabled'));
And cronJobs are only run:
if (nconf.get('runJobs')) { require('./notifications').startJobs(); require('./user').startJobs(); require('./plugins').startJobs(); }
So it is well thought-out.
-
@cryptoethic if you have multiple servers, set jobsDisabled: true on all servers except the first one.
-
@baris is it possible to have a separate instance just for running jobs?