Project Ramon

A learning journey from a Ruby noob perspective

Exploring Multi-tenancy



Today I started looking into adding multi-tenant abilities to my application. I thought I would share some resources I’ve been learning from, and maybe in a future post, show you the choices I made when implementing this.

What Is Multi-tenancy?

This wikipedia page describes multi-tenancy like so:

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

When to use Multi-tenancy:
If we had say, a company photography album application we built, that allowed each company to collect and edit various office photos. We wouldn’t want to allow employee 12 from company 2 to have an ability to look at and/or certainly not edit/delete photos that were associated with any information (photos and the like) from company 1. To prevent these sorts of occurrences, we need to create a solution that scopes each group of employes and photos by company. In other words we need to be able scope or hide data from company to company.

Besides data separation and managing multiple accounts, some additional scenarios when multi-tenancy could be a viable strategy to implement includes when you need to customize the experience on a per client basis and also when you want to optimize resources.

When NOT to use Multi-tenancy:
There are times when you may not consider multi-tenancy a good choice. These instances include scenarios when you’re just building a simple web site (I’m making an assumption that simple website and mostly static website are synonymous here). Social networking sites by their very nature depend on interaction between users and accounts to some extent. The last two examples of when multi-tenancy may be a bad idea are when building public applications (heres a link to the definition), or shared data applications.

Multi-tenant Resources

I plan on looking more into this over the coming weekend, in order to determine the various solutions available that make sense for my application. If you’re also interested in this topic, here are a list of resources I’ve been learning from lately:

Stay tuned…


Categories: Ruby on rails

Tags: ,

2 replies

  1. Cool, Ramon.

    Did you take a look at Ryan Bigg’s book? Maybe one the best books on the subject. Highly recommended:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s