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
30
votes
5 answers

AWS: Dedicated Host VS Dedicated Instance, why the first is more expensive than the later?

I'm studying for my Associate Architect exam at AWS, and I can't find an explanation for this question. Why Dedicated Host are more expensive than Dedicated Instances? I understand the main differences between the two, it is just that in my brain it…
Perimosh
  • 2,304
  • 3
  • 20
  • 38
27
votes
5 answers

SaaS / Multi-Tenancy approaches for Java-based (GWT, Spring, Hibernate) web applications

I am currently looking into converting a single-tenant Java based web-app that uses Spring, GWT, Hibernate, Jackrabbit, Hibernate Search / Lucene (among others) into a fully fledged SaaS style app. I stumbled across an article that highlights the…
brent777
  • 3,369
  • 1
  • 26
  • 35
26
votes
1 answer

How to get current tenant when using Appartment gem in multi-tenancy Rails 4

How can I find out which tenant (schema) is the current one when Apartment was initialized according to request
26
votes
6 answers

Multitenant DB: Why put a TenantID column in every table?

Every tutorial I've seen about Multitenant database models tells you to put the TenantID in every single table: zoos ------- id zoo_name tenant_id animals ------- id zoo_id animal_name tenant_id However, this seems redundant to me. Why not add the…
Mike Sickler
  • 33,662
  • 21
  • 64
  • 90
26
votes
3 answers

Multi-tenant PHP SaaS - Separate DB's for each client, or group them?

You'll have to bear with me here for possibly getting some of the terminology slightly wrong as I wasn't even aware that this fell into the whole 'multi-tenant' 'software as a service' category, but here it does. I've developed a membership system…
Sk446
  • 1,240
  • 3
  • 19
  • 38
25
votes
3 answers

Can multi-tenancy in Keycloak be done within a single realm?

First, I'm well aware of the multi-realm approach to multi-tenancy in Keycloak. I've taken over a legacy project where nobody thought of multi-tenancy. Now, two years later, suddenly, the customer needs this feature. Actually, the microservices are…
dajood
  • 3,758
  • 9
  • 46
  • 68
25
votes
2 answers

How to implement Multi-tenant User Login using ASP.NET Identity

I'm developing a Multi-tenant solution and I want to use the latest ASP.NET Identity framework specifically the Entity Framework implementation. Basically I need to allow two users to have the same username, though it must be unique within a tenant,…
James Skimming
  • 4,991
  • 4
  • 26
  • 32
24
votes
3 answers

TypeORM: Dynamically set database schema for EntityManager (or repositories) at runtime?

Situation: For our SaaS API we use schema-based multitenancy, which means every customer (~tenant) has its own separate schema within the same (postgres) database, without interfering with other customers. Each schema consists of the same underlying…
Felix K.
  • 14,171
  • 9
  • 58
  • 72
23
votes
2 answers

Output cache for multi-tenant application, varying by hostname and culture

I have a multi-tenant application in ASP.NET MVC. The instance of the application that will be served is function of the hostname alone (something along the lines of stackexchange, I suppose). Each instance of the application might have a different…
Bruno Reis
  • 37,201
  • 11
  • 119
  • 156
22
votes
1 answer

Multi-Tenant Authentication with AWS Cognito

My current project is in AWS, using Cognito and microservices with Lambda. We have designed the microservices using DDD and are in the process of implementing basic functionality. However, there is a business need for users of the API to be able to…
22
votes
1 answer

Overriding the bean defined in parent context in a child context

Our app has a requirement to support multi-tenancy. Each of the boarded customer might potentially override 1 or more beans or some properties of a bean defined at the core platform level (common code/definitions). I am wondering what is the best…
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
21
votes
6 answers

Best Practices for developing a multi-tenant application with Symfony2 and Doctrine2

I am working on an application that needs to support the multi-tenant model. I am using the symfony2 php framework and doctrine2. I'm not sure the best way to go about architecting this requirement. Does Symfony's ACL functionality provide a part…
Jeremy
  • 1,908
  • 3
  • 25
  • 38
20
votes
10 answers

SaaS database design - Multiple Databases? Split?

I've seen SaaS applications hosted in many different ways. Is it a good idea to split features and modules across multiple databases? For example, putting things like the User table on one DB and feature/app specific tables on another DB and perhaps…
Vyrotek
  • 5,356
  • 5
  • 45
  • 70
20
votes
7 answers

Multi-Tenancy with Spring + Hibernate: "SessionFactory configured for multi-tenancy, but no tenant identifier specified"

In a Spring 3 application, I'm trying to implement multi-tenancy via Hibernate 4's native MultiTenantConnectionProvider and CurrentTenantIdentifierResolver. I see that there was a problem with this in Hibernate 4.1.3, but I'm running 4.1.9 and still…
Craige
  • 2,882
  • 2
  • 20
  • 28
19
votes
8 answers

To Multi-Tenant, or Not To Multi-tenant

I have a difficult database design decision to make regarding multi-tenancy for the growing number of branches of my client's web-based CRM, which I actively maintain. I made the decision early on to use separate applications with separate databases…
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287