Questions about VPS installation and escalation
-
Hi,
I am setting up some new installs and I have seen 3 ways of escalate.
I am starting with the easy MongoDB install with 1 port and nginx as proxy on a 2vCPUs and 2GB RAM.So it seems that the easiest way to scale is to increase the VPS resources (CPU and RAM).
But then i was reading about adding additional ports to the config.
https://docs.nodebb.org/configuring/scaling/Will this be better than adding additional ports and Redis to that VPS?
What would you do first?And how many ports will you add for a 2vCPU and a 4vCPU VPS?
Is it worth it to do the additional ports from start with Redis?
How many concurrent users makes it necessary to go into the horizontal scalation route (multiples VPS, external DB, etc)?
Thanks
-
@darkpollo @baris offers some excellent advice here. My two cents as an infrastructure and security expert would be exactly that. Do not start out with a system that is either over-powered, or over-engineered, or the only results you will realistically achieve are over-priced and over-budget
NodeBB performs particularly well on cheap hosting, but of course, this doesn't suit everyone. One of the great things about VPS hardware is that it is relatively simple to upgrade the running instance to increase the power, and all without losing any data or previous configuration.
-
That is what I thought, port per CPU seems right, MongoDB does not need one CPU, right?
It also seems that the redis is really easy to setup and gives more advantage.
Any reasons not to use redis?
Can I activate redis on an existing installation just updating the config and reloading?Thanks!
-
@phenomlab Thank you for the tips.
I do have some experience with servers, just not with nodebb.
In this case it is a project for a website that has already high traffic, so it potentially could grow fast, really fast.
So I want to be ready in case we need to scale fast once we launch.I am thinking that it will make sense to setup REDIS and 2 ports from start and then grow from this.
What do you think?
-
@darkpollo Ok. In this case, I'd still go with MongoDB for the actual database itself, but then install Redis and use the clustering capabilities of NodeBB which work very well (I use them myself). Redis will only contain the session information in this case.
-
Mongo likes to expand its memory footprint because it saves everything in RAM when queried. So sometimes on particularly active forums with really low memory, your Mongo or Node.js process might get OOM-killed.
Experiment with system resources and see. CPUs are quite good at context switching and even one CPU can ably run Mongo, redis, and NodeBB and still be fairly responsive if you don't have too many users querying at once.