Skip to content

Commit

Permalink
Merge pull request #212 from AstitvaSuperTokens/multi-tenancy-blog
Browse files Browse the repository at this point in the history
Adds multi-tenancy blog
  • Loading branch information
jscyo authored Dec 19, 2023
2 parents f5a2fc2 + 1076271 commit f1f4c39
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions content/multi-tenancy-in-2024/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Multi-Tenant Authentication in 2024
date: "2023-12-01"
description: "Multi-tenant systems allow a single instance of a software application to serve multiple different tenants. This allows for a number of benefits that will be explored in this blog"
cover: "multi-tenancy-in-2024.png"
category: "programming"
author: "Mostafa Ibrahim"
---

## Introduction

Multi-tenancy refers to a scenario where a single instance of a software application serves multiple tenants (customers or users from different organizations). Each tenant operates in a self-contained environment with its own set of data, configurations, and user management, unaware of other tenants sharing the same infrastructure. Multi-tenancy enables large organizations to manage the data of their numerous customers securely and efficiently. Imagine a large apartment complex where each apartment unit represents a separate company. Though housed under the same roof, each apartment has its own set of keys, its own set of rules, and its own living space.

Similarly, in the digital realm, multi-tenancy allows different groups or companies to use the same software application while retaining their own data and rules. Each of these groups is referred to as a 'tenant.' The beauty of multi-tenancy lies in its ability to ensure data privacy, security, and a tailored experience for each tenant while efficiently sharing the underlying software infrastructure and resources. It's like having your own personalized space in a large, shared structure, blending the best of both worlds!

## Single-tenancy Vs. Multi-tenancy
In a single-tenancy architecture, each customer has their own independent instance of the software application and the accompanying database. Each instance is isolated from others, providing a high level of data security and customization.

![isolated gif](./isolated-alone.gif)

In contrast, a multi-tenancy architecture hosts a single instance of the software application that serves multiple customers (tenants). All tenants share the same underlying infrastructure and application instance, but their data is securely isolated from each other within the same database.

![Single-Tenancy vs Multi-Tenancy](./single-vs-multi-tenancy.png)

The image above presents a visual comparison between single-tenancy and multi-tenancy architectures. In the single-tenancy architecture, we see that each tenant has an exclusive setup. Here, 'Tenant 1' is assigned 'Instance 1', which operates on its own dedicated database 'DB 1'. This setup is typical of single-tenancy, where each client’s data and application instance are separate, providing a high level of security and the ability for deep customization.

## Why Is Multi-tenancy Useful?

![Advantages of Multi-Tenancy](./advantages-of-multi-tenancy.png)

So the question arises, why exactly do enterprises and SaaS-based companies gain from implementing the multi-tenancy feature?

### Cost Efficiency
Shared infrastructure significantly drives down operational and maintenance expenses. SuperTokens [achieved a 50% reduction in AWS infrastructure](https://supertokens.com/blog/how-we-cut-our-aws-costs) costs by migrating to a multi-tenant SaaS architecture.

### Provides Better Scalability
Centralizing the management of resources, allows companies to easily support an expanding customer base. The architecture's design means that scaling doesn't entail a proportional increase in costs, as their infrastructure is shared across multiple tenants.

For SuperTokens, [the switch to a multi-tenant sped up the provisioning of infrastructure by 94%](https://supertokens.com/blog/how-we-cut-our-aws-costs-part-2), making the creation of new users or applications remarkably faster and more efficient.

### Better Operational Efficiency
Multi-tenancy simplifies the way we manage software systems. Instead of juggling multiple separate instances for different users or groups, it brings everything under one roof.

![Everything under one roof](./one-roof.gif)

Moreover, upgrades and patches need to be made on an order of magnitude fewer instances since each instance is now shared amongst a much larger set of users. Updates are applied once to the shared instance, ensuring uniformity and reducing the number of instances that need maintenance. This not only makes things less complicated but also saves a lot of time. Imagine having one key that securely opens every door in a building, rather than a different key for each room.

## Conclusion
Multi-tenancy streamlines how companies manage and scale their applications, offering both cost efficiency and operational simplicity. With shared infrastructure, updates and maintenance become streamlined, saving time and resources. This approach not only ensures secure, personalized experiences for each tenant but also significantly boosts overall efficiency. Ultimately, multi-tenancy offers a harmonious balance between customized user experiences and streamlined management, marking it as a cornerstone of modern, efficient software architecture.

Binary file added content/multi-tenancy-in-2024/isolated-alone.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/multi-tenancy-in-2024/one-roof.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 27 additions & 3 deletions static/blog-seo/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -739,17 +739,41 @@
"<meta property=\"og:title\" content=\"What is TOTP and why do you need it?\" />",
"<meta property=\"og:type\" content=\"article\" />",
"<meta property=\"og:url\" content=\"https://supertokens.com/blog/totp-why-you-need-it-and-how-it-works\" />",
"<meta property=\"og:description\" content=\"This blog explains how to setup email password and social login with SuperTokens using the app directory in Next.js.\" /\"/>",
"<meta property=\"og:description\" content=\"Time based one-time passwords solve a number of issues that plague traditional authentication methods. In this blog we break down TOTP and why it's so useful.\" /\"/>",
"<meta property=\"og:image\" content=\"https://supertokens.com/blog-meta-images/totp-why-you-need-it-and-how-it-works.png\" />",
"",
"<meta name=\"twitter:card\" content=\"summary_large_image\" />",
"<meta name=\"twitter:title\" content=\"What is TOTP and why do you need it?\" />",
"<meta name=\"twitter:description\" content=\"Time based one-time passwords solve a number of issues that plague traditional authentication methods. In this blog we break down TOTP and why it's so useful\" />",
"<meta name=\"twitter:description\" content=\"Time based one-time passwords solve a number of issues that plague traditional authentication methods. In this blog we break down TOTP and why it's so useful.\" />",
"<meta name=\"twitter:url\" content=\"https://supertokens.com/blog/totp-why-you-need-it-and-how-it-works\" />",
"<meta name=\"twitter:image\" content=\"https://supertokens.com/blog-meta-images/totp-why-you-need-it-and-how-it-works.png\" /> ",
"<!--OG Tags-->"
],
"title": "What is TOTP and why do you need it?",
"schema": "<script type=\"application/ld+json\">\n{\"@context\":\"https://schema.org\",\"@type\":\"Article\",\"mainEntityOfPage\":{\"@type\":\"WebPage\",\"@id\":\"https://supertokens.com/blog/totp-why-you-need-it-and-how-it-works\"},\"headline\":\"Adding login to your Next.js app using the app directory with SuperTokens\",\"image\":\"https://supertokens.com/blog-meta-images/totp-why-you-need-it-and-how-it-works.png\",\"author\":{\"@type\":\"Organization\",\"name\":\"SuperTokens\",\"url\":\"https://supertokens.com\"},\"publisher\":{\"@type\":\"Organization\",\"name\":\"SuperTokens\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://supertokens.com/static/assets/dark-home/logo.png\"}}}</script>"
"schema": "<script type=\"application/ld+json\">\n{\"@context\":\"https://schema.org\",\"@type\":\"Article\",\"mainEntityOfPage\":{\"@type\":\"WebPage\",\"@id\":\"https://supertokens.com/blog/totp-why-you-need-it-and-how-it-works\"},\"headline\":\"What is TOTP and why do you need it?\",\"image\":\"https://supertokens.com/blog-meta-images/totp-why-you-need-it-and-how-it-works.png\",\"author\":{\"@type\":\"Organization\",\"name\":\"SuperTokens\",\"url\":\"https://supertokens.com\"},\"publisher\":{\"@type\":\"Organization\",\"name\":\"SuperTokens\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://supertokens.com/static/assets/dark-home/logo.png\"}}}</script>"
},
{
"path": "/blog/multi-tenancy-in-2024",
"metaTags": [
"<meta name=\"author\" content=\"Mostafa Ibrahim\" /> ",
"<meta name=\"description\" content=\"Multi-tenant systems allow a single instance of a software application to serve multiple different tenants. This allows for a number of benefits that will be explored in this blog.\" />",
"",
"<meta name=\"keywords\" content=\"tenants, single-tenant, single-tenant vs multi-tenant, multi-tenant, ldap, ldap authentication, authentication\" />",
"<!--OG Tags-->",
"<meta property=\"og:title\" content=\"Multi-Tenant Authentication in 2024\" />",
"<meta property=\"og:type\" content=\"article\" />",
"<meta property=\"og:url\" content=\"https://supertokens.com/blog//multi-tenancy-in-2024\" />",
"<meta property=\"og:description\" content=\"Multi-tenant systems allow a single instance of a software application to serve multiple different tenants. This allows for a number of benefits that will be explored in this blog.\" /\"/>",
"<meta property=\"og:image\" content=\"https://supertokens.com/blog-meta-images//multi-tenancy-in-2024.png\" />",
"",
"<meta name=\"twitter:card\" content=\"summary_large_image\" />",
"<meta name=\"twitter:title\" content=\"Multi-Tenant Authentication in 2024\" />",
"<meta name=\"twitter:description\" content=\"Multi-tenant systems allow a single instance of a software application to serve multiple different tenants. This allows for a number of benefits that will be explored in this blog.\" />",
"<meta name=\"twitter:url\" content=\"https://supertokens.com/blog//multi-tenancy-in-2024\" />",
"<meta name=\"twitter:image\" content=\"https://supertokens.com/blog-meta-images//multi-tenancy-in-2024.png\" /> ",
"<!--OG Tags-->"
],
"title": "Multi-Tenant Authentication in 2024",
"schema": "<script type=\"application/ld+json\">\n{\"@context\":\"https://schema.org\",\"@type\":\"Article\",\"mainEntityOfPage\":{\"@type\":\"WebPage\",\"@id\":\"https://supertokens.com/blog/multi-tenancy-in-2024\"},\"headline\":\"Multi-Tenant Authentication in 2024\",\"image\":\"https://supertokens.com/blog-meta-images/multi-tenancy-in-2024.png\",\"author\":{\"@type\":\"Organization\",\"name\":\"SuperTokens\",\"url\":\"https://supertokens.com\"},\"publisher\":{\"@type\":\"Organization\",\"name\":\"SuperTokens\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://supertokens.com/static/assets/dark-home/logo.png\"}}}</script>"
}
]
6 changes: 6 additions & 0 deletions static/blog-seo/sitemapconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,11 @@
},
{
"location": "https://supertokens.com/blog/adding-login-to-your-nextjs-app-using-the-app-directory-and-supertokens"
},
{
"location": "https://supertokens.com/blog/totp-why-you-need-it-and-how-it-works"
},
{
"location": "https://supertokens.com/blog/multi-tenancy-in-2024"
}
]
Binary file added static/card_covers/multi-tenancy-in-2024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/covers/multi-tenancy-in-2024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f1f4c39

Please sign in to comment.