How do we separate distinct communities?

I strongly disagree. I’ve done both types of systems. Managing this as separate databases is a recipe for disaster. Advantages of each method:

  • Multiple Databases

    • Query speed increased in your largest communities, provided your largest communities databases are each on a separate server.
  • Single Database (everything “simpler queries” and/or “faster” except if specified as other reasons):

    • Schema changes
    • Consolidated reporting
    • Backup/restore
    • HNQ
    • User Profile management (at many levels from authentication to history viewing to view of “all my communities”)
    • High-level Moderation (e.g., User “bans”)
    • Migration of Questions between communtiies
    • Split or Merge of Communities (relatively unlikely, but could happen)

As @cellio noted, the only query speed issue of Multiple Databases really only makes a difference when you get to huge databases. In addition, if we need more “isolation” for a particular community then it may be that the better solution is for that community to spin up its own instance of Codidact.

5 Likes