NodeBB multisite / network feature?
-
Hello!
I am new to node and nodebb and really enjoy the UI!
Would it be possible to have some kind of multihost / multisite / network feature?
I imagine having multiple alias domains / hostnames point to the same nodebb.
Then something like this:
-
A database collection "sites" holds site information like hostname, title, ...
-
Each request checks the current hostname and loads the corresponding (cached) site information
-
When saving topics/comments/users, the current site_id gets saved too.
-
When retrieving topics/comments/users from the database, results will be filtered by current site_id.
This would allow to run multiple, unrelated sites in a network style. Admins could add new sites easily to the network through the admin panel, and then just point the new domain to the same nodebb installation.
What do you think?
Sorry for incorrect English. -
-
It sounds like you want to create something like stackoverflow or Enjin, essentially a social network of sites?
I don't think there's any mechanisms in NodeBB to handle such things. Maybe you could have multiple installs sharing user data? I'm not sure how/if that would work.
-
Thanks, yes it should be a network of sites, but they don't neccesarly need to share users or anything, only the code base should be shared.
I think a database approach to multiple sites has several advantages over separate installations:
- New sites can be created through the backend in seconds
- No duplicated code base
- All sites get the same upgrades, theme files
A downside is probably performance when a site get lots of traffic, but then it could still be decoupled to a standalone instance.
Are there any plugin hooks that would allow to add a site_id every time something is saved to the db, and filter by it every time something is retrieved from the db?
-
NodeBB integrates with WordPress and WordPress has a network mode. I'm not sure if that would work. Worth a try using a test set up?
-
I don't think this would work either, however if you are interested to boost your websites speed and make it reachable for users world wide, I would recommend working with GeoIP.
You could setup 1 server in the US and 1 in the EU. Additionally you can configure a dedicated database server, if you want a second one it gets a bit tricky as you need them synced.
That is just one of many possibilites. You maybe also want to consider "classic" methods like a CDN.
-
Multi-tenancy would be a great feature for NodeBB.