Questions tagged [multi-tenant]

A principle in software architecture where a single instance of the software runs on a server, serving multiple client organizations (tenants).

Multi-tenancy allows multiple users (tenants) to use an application which runs on the same computer. This can be done in two ways:

  • Multiple instances
  • Share instance

The multiple instances pattern runs an application instance for each user, for example by using virtual machines. The obvious downside of this is the resource requirement, as each instance requires allocated memory.

Multi-tenancy is also regarded as one of the essential attributes of Cloud Computing and Software as a Service (SaaS)

3009 questions
19
votes
3 answers

Dynamically setting Flask-SQLAlchemy database connection in multi-tenant app

I have a "multi-tenant" Flask web application which interfaces with 1 "master" MySQL database (used to look up the client information) and dozens of "client" MySQL databases (which all have the same schema). I'm currently trying to use SQLAlchemy…
jstol
  • 847
  • 3
  • 12
  • 29
19
votes
5 answers

Setting up a MultiTenantConnectionProvider using Hibernate 4.2 and Spring 3.1.1

I am currently trying to set up Hibernate for multi tenancy using the seperate Schema aproach. After working on it for about 2 days now and browsing nearly every source I could find via Google I am starting to get quite frustrated. Basicaly I am…
Carsten
  • 1,511
  • 2
  • 13
  • 24
19
votes
2 answers

Should MultiTenant Tables Include TenantID in Primary and Foreign Keys?

For a multi-tenant single shared database should the tenantid field be included in the primary key and clustered index? Or is adding an additional index on tenantid just as performant? We’re running into performance issues on a production system…
18
votes
1 answer

Multiple schemas versus enormous tables

Consider a mobile device manager system that contains information for every user such as a table that stores the apps that he has installed on the phone, auditing details, notification information etc. Is it wise to create a seperate schema for each…
michelle
  • 2,759
  • 4
  • 31
  • 46
18
votes
1 answer

Multi-tenancy: Managing multiple datasources with Spring Data JPA

I need to create a service that can manage multiple datasources. These datasources do not necessarily exist when the app when first running the app, actually an endpoint will create new databases, and I would like to be able to switch to them and…
user3656237
  • 197
  • 1
  • 1
  • 7
18
votes
3 answers

MultiTenancy with DbContext and TenantId - Interceptors, Filters, EF Code-First

My organization needs to have a shared database, shared schema multitenant database. We will be querying based on TenantId. We will have very few tenants (less than 10) and all will share the same database schema with no support for…
SB2055
  • 12,272
  • 32
  • 97
  • 202
18
votes
3 answers

Multi tenancy or multi instance?

I'm trying to build a web-based SaaS solution, and I hit a road where I'm not sure to use multi tenancy or multi instance. I will try to describe what I'm trying to achieve, and each approach advantages and disadvantages (my opinion, according to…
Asher
  • 557
  • 3
  • 18
18
votes
3 answers

Are there any ASP.NET MVC subscription-based starter kits or examples?

Basically something that handles the low-level "plumbing" code for a subscription-based service. I see a lot of things dealing with basic membership, but nothing that handles the subscription aspect (recurring billing, automated jobs for setting up…
Wayne Molina
  • 19,158
  • 26
  • 98
  • 163
17
votes
2 answers

Most effective way to manage multiple tenant storage in Azure?

We're creating a multi-tenant application that must segregate data between tenants. Each tenant will save various documents, each of which can fall into several different document categories. We plan to use Azure blob storage for these documents.…
spoof3r
  • 607
  • 8
  • 23
17
votes
1 answer

What is the difference between multi-tenancy and multi-user solutions?

I believe I understand this in terms of hardware, where multiple individuals 'share' the same processing and memory for their solutions. But I've been looking at gmail and facebook, are those multi-tenanted solutions? Is it that as long as my…
Irwin
  • 12,551
  • 11
  • 67
  • 97
17
votes
4 answers

Rails migrations for postgreSQL schemas

I'm working on a multi-tenant rails application using PostgreSQL schemas for different clients. Rails migrations don't work with multiple schemas out of the box, so I made the following rake task to migrate all schemas and it seems to work. My…
Beatlevic
  • 605
  • 1
  • 6
  • 13
17
votes
2 answers

Multi-Tenant Django Application

Are there common patterns people use for creating multi-tenanted applications using Django. The built in "sites" framework seems like an option. Are there other approaches people have had success with?
rstocker99
16
votes
1 answer

DynamoDB multi-tenant IAM policy (sharing documents with other users)

I’m attempting to create a multi-tenant application with DynamoDB and Cognito. The documentation is pretty clear on how to implement fine-grained authorisation so that users can access only their own records, by adding a condition to the IAM access…
16
votes
1 answer

Multitenant Identity Server 4

I'm trying to implement an IdentityServer that handles an SSO for a multitenant application. Our system will have only one IdentityServer4 instance to handle the authentication of a multitentant client. On the client side, I'm using the acr_value to…
16
votes
3 answers

Multi-user Datasources - Spring + Hibernate

I'm writing a web app that supports multiple users. Each user has their own database - using H2. all database schemas are the same. I wish to use Spring + Hibernate for this application. So I'm stuck at how to associate a user's database with that…
Dzhu
  • 4,311
  • 5
  • 36
  • 48