Suggestion! Rails 6.0.4 ActiveTanant

Hello

I was going to have a new enregration proposal with rails. I think it’s time to add multi tenant to rails. The name ActiveTenant looks very good. The gem files for this job are too old or problematic. Besides, it seems that there are a lot of people who have problems with ActionCable. Some tenant gem files require sub domain. I think a scalable integration tenant_id milia gem file would be nice. A multi-tenant project such as “rails new project activetenant” can even be created when creating the project.

By the way, I’m not a software developer :slight_smile: I’m more on the system and network side. I’m interested in Rails as a hobby. I love Rails.

Regards

Thanks for the suggestion. We already have multiple database support in Rails, and I added horizontal sharding support in 6.1. For the most part Rails already supports what you need to do tenant sharding as well. In the case that it didn’t, we’re not going to add a new gem but would instead extend the existing features to have more functionality. If there’s anything specific missing please either send a PR to fix the specific missing functionality or let us know where what is missing.

This was also discussed here ActiveMultiTenant

From the POV of someone that has worked in banking as a software engineer I would really not be very enthusiastic about sharing part of my stack with other entities. As a matter of fact I frequently advocated using a separate silo for different systems that provided a service to a consumer within the same organisation. Creating multitenant application is even harder than creating single tenant applications that deal with different users. The number of permutations increases because a current_tenant is added to the fray. If push comes to shove then I think that if a company has three customers it might be not that interesting to have to put a lot of effort in making your product multitenant and given the current state of containerization I even think it’s unnecessary. I can envision different solutions - for example routing based on a tenant key in the header of each request for example. So yes, maybe a nice idea but I don’t like the complications it brings with it.

Thanks for the information