It's possible, but not easy. There are a few options:
create a theme for NodeBB, render NodeBB in an iframe and embed that in your page render NodeBB templates in an angular component and embed that in your page interface directly with the NodeBB rest API, creating a frontend in angularnodebb slows down
-
I just changed Varnish configuration.I added these three blocks:
at the begining:sub vcl_init { new nodebb = directors.round_robin(); nodebb.add_backend(nodebb01); nodebb.add_backend(nodebb02); nodebb.add_backend(nodebb03); }
and in the middle:
# Pipe websocket connections directly to Node.js if (req.http.Upgrade ~ "(?i)websocket") { set req.backend_hint = nodebb.backend(); return (pipe); }
set req.backend_hint = forum; if (req.url ~ "^/socket.io/") { set req.backend_hint = nodebb.backend(); return (pipe); # return pass seems not working for websockets }
-
@julian I don't know, please tell me how can I know that?
We are using debian 8 on SSD hard drive with 16GB memory and 24 core(intel xenon) cpu that serve multiple php websites and only one nodejs app (=NodeBB) .I have checked the server usage we are using 8G memory and 50% cpu usage at most!(in worse case )
-
@sanatisharif That is quite peculiar. I have not seen these symptoms before. NodeBB has always been fairly snappy and does not slow down with time...
-
@julian maybe nodebb acts like this because of varnish configs.
I have changed it to hash directors instead of round_robin with 'client.identifier' as ID some of our problems gone but users complicate that some times our comunity is very slow!
sub vcl_init { new nodebb = directors.hash(); nodebb.add_backend(nodebb01); nodebb.add_backend(nodebb02); nodebb.add_backend(nodebb03); }
set req.backend_hint = nodebb.backend(client.identity);
-
Also when I checked varnish log dozens of request will be passed(MISS) so we can have better config for varnish.
-
@sanatisharif said in nodebb slows down:
We are using debian 8 on SSD hard drive with 16GB memory and 24 core(intel xenon) cpu that serve multiple php websites and only one nodejs app (=NodeBB) .
How many NodeBB processes are you running? Are they utilising a lot of CPU?
-
@julian said in nodebb slows down:
@sanatisharif said in :
We are using debian 8 on SSD hard drive with 16GB memory and 24 core(intel xenon) cpu that serve multiple php websites and only one nodejs app (=NodeBB) .
How many NodeBB processes are you running? Are they utilising a lot of CPU?
I don't know, please tell me how can I know that?
-
@sanatisharif said in nodebb slows down:
I don't know, please tell me how can I know that?
$> top
this will give you a bunch of statistics about the system, including that's running and how much CPU it is taking.
to find out how many processes of nodejs are running i would recommend using
#> ps aux |grep node
this will spit our information about all processes that have "node" in their command line. you'll probably get a few false positives but you should be able to identify how many of those are nodebb easily enough.