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
144
votes
4 answers

How to create a multi-tenant database with shared table structures?

Our software currently runs on MySQL. The data of all tenants is stored in the same schema. Since we are using Ruby on Rails we can easily determine which data belongs to which tenant. However there are some companies of course who fear that their…
Marcel Jackwerth
  • 53,948
  • 9
  • 74
  • 88
122
votes
6 answers

What is the recommended approach towards multi-tenant databases in MongoDB?

I'm thinking of creating a multi-tenant app using MongoDB. I don't have any guesses in terms of how many tenants I'd have yet, but I would like to be able to scale into the thousands. I can think of three strategies: All tenants in the same…
Braintapper
  • 1,682
  • 2
  • 12
  • 13
68
votes
8 answers

What are the advantages of using a single database for EACH client?

In a database-centric application that is designed for multiple clients, I've always thought it was "better" to use a single database for ALL clients - associating records with proper indexes and keys. In listening to the Stack Overflow podcast, I…
Ryan
  • 945
  • 1
  • 10
  • 11
66
votes
9 answers

Should I use a single or multiple database setup for a multi-client application?

I am working on a PHP application that intends to ease company workflow and project management, let's say something like Basecamp and GoPlan. I am not sure on what the best approach is, database-wise. Should I use a single database and add…
Aron Rotteveel
  • 81,193
  • 17
  • 104
  • 128
64
votes
3 answers

optimal architecture for multitenant application on django

I've been brooding over the right/optimal way to create a multitenancy application based on Django. Some explanation: Application can be used by several tenants (tenant1, tenant2, ...,). All tenant-individual data has to be secured against access…
Oliver Rehburg
  • 643
  • 6
  • 5
57
votes
1 answer

PostgreSQL's schemas for multi-tenant applications

I'm learning about multi-tenant applications and how PostgreSQL's schemas can be used for this. Researching the subject, I ended up finding an article in which the author describes a poor experience when using PostgreSQL's schemas in multi-tenant…
viniciussss
  • 4,404
  • 2
  • 25
  • 42
55
votes
2 answers

Why use subdomains to designate tenants in a multi-tenant web application?

Questions Why do some multi-tenant web applications use subdomains to designate the tenant while others do not? Are there technical, privacy, or security reasons? Is it dependent on the language or framework used to develop the web application?…
Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
54
votes
6 answers

limits of number of collections in databases

Can anyone say are there any practical limits for the number of collections in mongodb? They write here https://docs.mongodb.com/manual/core/data-model-operations/#large-number-of-collections: Generally, having a large number of collections has no…
Oleg
  • 2,733
  • 7
  • 39
  • 62
47
votes
3 answers

Creating a multi-tenant application using PostgreSQL's schemas and Rails

Stuff I've already figured out I'm learning how to create a multi-tenant application in Rails that serves data from different schemas based on what domain or subdomain is used to view the application. I already have a few concerns answered: How can…
Ramon Tayag
  • 15,224
  • 9
  • 43
  • 69
43
votes
4 answers

How can queues be made private/secure in RabbitMQ in a multitenancy system?

I have read the Get Started guide provided by RabbitMQ and have even contributed the sixth example to stormed-amqp, so I have an inkling of knowledge about AMQP. However, the guide is not comprehensive and avoids things like authentication and…
Brian
  • 733
  • 1
  • 5
  • 11
41
votes
3 answers

Multi tenancy in Elastic Search

We are planning to introduce Elastic search(AWS) for our Multi tenancy application. We have below options, Using One Index Per Tenant Using One Type Per Tenant All Tenants Share One Index with Custom routing As per this blog…
Selvakumar Ponnusamy
  • 5,363
  • 7
  • 40
  • 78
40
votes
7 answers

How to design a multi tenant mysql database

Let us say I need to design a database which will host data for multiple companies. Now for security and admin purposes I need to make sure that the data for different companies is properly isolated but I also do not want to start 10 mysql processes…
stocked
  • 2,889
  • 4
  • 21
  • 18
36
votes
8 answers

Laravel: Run migrations on another database

In my app, every user has its own database that created when the user registered. Connection and database data (database name, username, password) are saved in a table in the default database. try{ DB::transaction(function() { $website…
Pooya Saberian
  • 971
  • 2
  • 9
  • 16
33
votes
2 answers

Manage Connection Pooling in multi-tenant web app with Spring, Hibernate and C3P0

I'm trying to setup a multi-tenant web application, with (ideally) possibility for both Database-separated and Schema-separated approach at the same time. Although I'm going to start with Schema separation. We're currently using: Spring…
Khosrow
  • 556
  • 1
  • 6
  • 16
33
votes
3 answers

Multi-tenant Django applications: altering database connection per request?

I'm looking for working code and ideas from others who have tried to build a multi-tenant Django application using database-level isolation. Update/Solution: I ended solving this in a new opensource project: see django-db-multitenant Goal My goal is…
mik3y
  • 4,214
  • 1
  • 22
  • 29
1
2 3
99 100