I'm building a new CMS with Node.js, and I have a question. Would adding WordPress-like multi-site support to the system be a good idea? Or should I let the user handle it via a reverse proxy like nginx?

I realise that having a single process handling vhosts that share a single database can be advantageous in some ways, but it would have its caveats as well.

I would love to hear your input on this, since I can't decide on my own.

3 Answers 3


This largely depends on the scalability, and (perhaps even more importantly) the scalability of the platforms you plan for your CMS to run on.

For example, a lightweight (i.e. AWS t2.micro) server would handle several (not hundreds, but enough) low-volume sites very easily. However, a single high-volume site (think Wikipedia, etc) is obviously distributed over many MUCH more heavyweight servers (not the plural).

Where this becomes a problem, is in the ability of one site to scale up. Let's say someone's political blog (running on your new CMS) gets linked from CNN.. In about five minutes it goes from a few dozen hits a day to hundreds per second. Now, obviously the underlying platform scalability is dependant upon your platform (AWS, Azure, actually hosting it on a real life computer under your desk, etc) - but the ability of your CMS to leverage the resources it has in such a situation is VERY MUCH impacted by hosting multi-sites rather than having a dedicated instance.

There is also the human element to consider. Let's say your multi-site instance is hosting sites from different users... Now when Fred's politics blog goes viral, Aunty May's Delicious Biscuits Website also slows down (or even goes offline entirely). This is a lot more difficult to explain to poor old aunty May than if Fred was the holder of all of the virtual sites in the instance (i.e. Fred's politics blog's popularity made Fred's scrap-booking site go offline).

Obviously there are performance benefits to be gained from things like DB connection pooling, etc for multi-site systems (otherwise they wouldn't exist). But make sure sites can be promoted as they become more popular (and require more resources). A small site that starts out as a virtual entry in a multi-site system may one day become a behemoth (perhaps not as large as Wikipedia, but still) requiring multiple dedicated servers and databases.

Overall, I would try and take a good look at your expected use-cases/users/etc. How likely is it that there will be popular sites (you can assume unlikely, but never impossible), how likely is it one user will want to have multiple virtual sites on this CMS? For that number of users is it worth the extra development effort? Would most (or all) of those users easily know how/be willing to just use nginx to manage it if you didn't do multi-site?


I wouldn't merge multi site / multi tenant software logic with availability and load balancing architecture.

Multi tenant logic is implemented by the CMS, load balancing is implemented by software or hardware load balancer.

Node.js load balancing guide: http://blog.keithcirkel.co.uk/load-balancing-node-js/

On the other hand multi tenant architecture easily becomes very complicated as Ryan mentioned. For example in a secure corporate environment to ensure data privacy you have to store sensible data of each tenant in separate databases.

The answer to your question is mainly depends on your requirements, but according to my experience sooner or later you have to implement some kind of multi site / multi tenant logic.


It depends. Tersosauros gave excellent answer.

I am working towards like goal. CMS only part of it eventually. https://stackoverflow.com/questions/35675901/database-instead-of-files-for-code

If you are say a small little company with say four or so employees. (graphic, programmer, template, accountant/telephone) or some such. You might end up buying one of them larger package deals from a hosting company that lets you sell your own domains on a single account like doing. And most likely come down to... some local mom/pop folks wanting website were wordpress, joomla, phpbb, opencart, etc... might work. and not really hefty usage of the sites. But they all want basic little gadgets. And ya end up tossing up a single source code and going multi site err multi tenant type thing. Just to make your hours easier. When it comes time to deal with updates / security fixes, etc...

I would say worry about multi site / multi tenant at a later time. and focus on the cms. The scripting can get rather complex, and extra database tables and extra checking, etc... to deal with things correctly. And all it takes is one person to wanting something special to throw things out of whack.

  • How does the link to the (very long) SO post relate to this answer? Could you summarize it a bit?
    – user40980
    Commented Mar 6, 2016 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.