SS4 Multi-Site & Load Balancer Setup

Silverstripe Version: 4

Question: How do you deal with loading balancing a multi-site system with Silverstripe?

I understand this is going to be a long question but, I’d like it to be more of a discussion really.

I’m building a project with an eco-system of systems;

  • Central Auth
  • CMS
  • Front-end stores

All of them are running on top of the Silverstripe framework and work well together (API & OAuth 2.0 communications), however the challenge is this; How do I go about to load balance the stores, as typical SS installation requires the following;

  • Database
    This one is easy to deal with, I simply can have a shared DB cluster all stores connect to with each store having it’s own credentials and schema

  • Sessions
    Again relatively easy, I can can have a shared Redis machine that stores the sessions for all the systems

  • Cache
    Same as sessions I can have a shared Redis / Memcached instance

  • Assets Store
    This one is tricky, I could opt for something like S3 but I suspect performance will be horrible, but I can’t rely on something like rsync to sync all the nodes as it would be too expensive to maintain.

The next big challenge is keeping everything up to date. Running dev/build on each store is the only solution I could think of, but that would put enormous strain on the DB cluster once we reach a few hundred stores, even a staggered approach seems wasteful as I would only need to update the schema really.

Opinions, feedback, suggestions are all welcome :slight_smile: