This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Deploying lots of instances of Apostrophe

Hello,

I have just come upon Apostrophe this week, and wow I am blown away. What an undertaking you all have done to provide an outstanding open source CMS.

The first question I have, just as a friendly curiosity, is why? It’s such an excellent product, most folks don’t go to such an effort for a freely available open source product.

And second: I am considering using Apostrophe inside of a product where I will deploy many instances of the CMS (one per customer of mine). Will probably be hosting on mLab, and in discussions with them on this they relatively strenuously advise not doing one db per customer, as this would create scaling issues after several dozen databases.

But given the general CMS architecture paradigm of one database = one site, and everything that cascades down from that (content table design, user access, etc), it seems to be that it’s best to stick with that route.

Very curious for your input on this architecture design. My general thought is:

  • Node app running my software.
  • New customer signs up, triggers and event to deploy a new instance of a docker image
  • The docker image has Apostrophe running and upon its first query to a database with its site name, it creates the database (as most Mongo drivers do), and that customer is away.

Does this sound about right?

Do you agree with mLab that things would best be accomplished instead with fewer databases / one database?

Thanks for any insight you can provide.

-Paul

Hi Paul,

I think mLab might be thinking of different use cases, like “10,000 people will each have their own instance of an email client app.” If you have 10,000 websites, maybe it’s worth reengineering to use a site id as a “pivot” key… if you have 100 websites, definitely not.

Also worth noting that back in the MongoDB 2.x days, MongoDB had a high minimum disk and RAM overhead per database. In the 3.x days, with the WiredTiger storage engine, it does not. Our own demo site spins up a site instance for every visitor and has no trouble doing that with many databases.

Your general plan doesn’t sound too crazy. But, also consider:

Although getting close to its first production implmenetation, this is very much still a work still in progress. Perhaps you can be another enterprise customer actively sponsoring its further development!

1 Like

Tom,

Thanks so much for your reply. Very helpful to know that you are essentially doing the same thing for your demo site.

Will take a look in to both refactoring base on site id and apostrohphe multisite.

If things work out on this product I will definitely be reaching out to sponsor Apostrophe, as it will become a critical piece of my infrastructure. Hope to be in touch on this in relatively short order.