Scaling NodeBB



  • Folks,

    New to NodeBB, and like what I see so far...have some questions, since I don't have experience with Redis or MongoDB.

    Can we scale NodeBB across multiple locations, using a geo-based load balancer and using consistency with MondoDB?

    Also, how does one scale out NodeBB in a local setup...ie HAproxy, with multiple web front ends, and a common database backend? Think traditional Forum scale stuff.

    Trying to understand the options for NodeBB.

    The ultimate goal would be a CDN in front of NodeBB, with NodeBB doing geo-based load balancing across 2 or more locations, and using MongoDB backend, and I guess Redis at each location for caching?

    Any direction or feedback? Anyone done this yet? Is this doable?

    Thanks!
    Tom



  • Mongo plus Redis functionality is something still in the works if I understand what I've read so far. While it is theoretically possible, it's largely untested to the capacity that the developers would like it to be before something goes mainstream. i'd be interested in hearing from a developer on the suggested architecture for geo-load balancing with NodeBB since they recently completed a large scaling project.


  • Admin

    Redis will always be preferred, though scaling-wise, we're exploring options with combining different databases together.

    As of... eh, ten minutes ago, NodeBB will look for a redis config, and use redis for sessions and socket persistence, while your primary database can be something else (e.g. mongo).

    As for scaling for higher throughput -- clustering will be introduced in v0.5.1, allowing you to take advantage of the # of cores in your server. (e.g. 8 core server? 6 can be NodeBB, leaving 2 for Mongo/Redis)

    You can also use nginx to serve static assets, although I haven't published the nginx config to do that quite yet :)



  • @julian Thanks, how you've described clustering, that'll scale me vertical (more cpu/ram/etc), how do we go wide, ie multiple instances and multiple instances across multiple locations as @Ted mentioned.

    Thanks!
    Tom


  • Admin

    You can run multiple instances of NodeBB on multiple servers, as long as you have a load balancer sending traffic to all machines. Just ensure that the installs all call the same db.

    Additionally, starting v0.5.1, if you have a "redis" section defined in your config, NodeBB will use that as session and socket.io store, even if your primary db is Mongo, so all the requisite back-end work should be done already in NodeBB to allow for horizontal scaling.

    Please give it a shot and report back!



  • Do you have some example on how to configure the clustering with mongo @julian ?


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.