Scaling Nodebb on Apache 2.4
-
Please, who can write down same basic scalling nodebb settings for apache 2.4. My community works very slow.
-
@Nuran-Akimbek A better place to start would be to understand your current host - for example, RAM, CPU, host provider etc. NGINX is also recommended for the best NodeBB performance owing to it's ability to serve static resources very quickly. In addition, depending on hardware, it's possible to leverage clustering in NodeBB in order to use three processes instead of just one.
-
@phenomlab We have a own server and for virtual machine which locates community we allocate 100GB Ram AND 24 CPU, server without load balancer as I know . I need scaling configuration under apache 2.4 or i must install Ningx near apache? I'm a software developer and I have a little knowledge on server configuration
-
@Nuran-Akimbek With that configuration, I'm surprised (in fact, shocked) that NodeBB is slow. What other services are running on that server? If the server it already using Apache for other apps, then installing NGINX is going to be problematic as you won't be able to use the native ports of 80 and 443 as these will already be in use by Apache.
-
As @phenomlab alluded to, with those specifications, likely the NodeBB code itself is not the culprit.
You'll have to review your deployment to figure out why there is such a delay. Is the database located in the same VM?
Have you tried re-indexing your database?
use whatever; # change this to your database name db.objects.createIndex({ _key: 1, score: -1 }, { background: true }); db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true }); db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true });
-
@julian yeah, database in the same VM. I already did re-indexing using this commands.