SlideShare a Scribd company logo
Managing Multi-tenancy
Meaningfully
Strategies for planning and deploying multi-tenant
environments
Professional Services (Consulting Engineer)
What is multi-tenancy?
Multiple clients
Regional data
Permissioned data
Regulated data
Any set of data that can (or should)
be segregated logically for
managerial purposes.
The What?
Data partitioning
Database partitioning
Device partitioning
The How?
Trade-offs, considerations, and solutions
012 - Justin
012 - MongoDB
012 - 949-555-1234
345 - John
345 - Widget Llc.
678 - Jane
678 - Acme Inc.
The What? Visualized
ClientA.People
012 - Justin
012 - MongoDB
012 - 949-555-1234
ClientB.People
012 - Justin
012 - MongoDB
345 - John
345 - Widget Ltc.
ClientC.People
678 - Jane
678 - Acme Inc.
People
012 - Justin
012 - MongoDB
012 - 949-555-1234
People
987 - Justin
987 - MongoDB
345 - John
345 - Widget Ltc.
People
678 - Jane
678 Acme Inc.
ClientC
ClientB
ClientA
Data Partitioning
People
Database Partitioning Database Partitioning
All your data in one place (one giant dataset)
Provide users access based on permissions
Authentication
Authorization
Auditing
}Fundamental, otherwise it’s not multi-tenant
Data partitioning shared database, shared collection
Data storage Processing Filtering Delivery
Database partitioning isolated database, shared environment
Data is split logically between different databases
Options are many … as are consequences of choosing wrong
Software level - hard; make the software pick a database
Database level - easy; let the database route queries appropriate
Single instance, multiple databases vs. multiple instances, single database per instance
Which one is better? (more on this later)
Data storage Filtering Processing Delivery
Device partitioning isolated environments
Similar to scaling horizontally across many servers
Multiple server instances, each with a single database (virtual isolated, containers)
Multiple servers, single database on each
Allows for customized code solutions ($)
Data storageFiltering Processing Delivery
There are trade-offs for each!
Costs to consider:
Financial cost ($)
Developer cost (man-hours)
Infrastructure cost
What are infrastructure costs?
Physical costs of maintenance
Organizational costs
Service Level Agreements (SLA)
Infrastructure Costs = ($ + man-hours)
“We had no idea this would turn into a public and global infrastructure.”
- Vint Cerf (co-inventor, TCP/IP)
● Physical costs - maintaining hardware
● Organizational costs
○ Data partitioning - how do you test permission based partitioning?
○ Database partitioning - who owns/manages code that connects to multiple environments?
○ Device partitioning - who fields the additional costs?
● Service Level Agreements ($ + man-hours)
Cost of data partitioning
Hardware - low cost ($)
Software - extreme cost (man-hours)
Infrastructure - medium ($ + man-hours)
Physical servers - medium
Organizational - low
Service Level Agreements - high
012 - Justin
012 - MongoDB
012 - 949-555-1234
345 - John
345 - Widget Llc.
678 - Jane
678 - Acme Inc.
ClientC
ClientB
ClientA
Cost of database partitioning
Hardware - medium ($)
Software - medium (man-hours)
Infrastructure - medium ($ + man-hours)
Physical servers - low
Organizational - high
Service Level Agreements - medium/high
Cost of device partitioning
Hardware - medium/high ($)
Software - low (man-hours)
Infrastructure - high ($ + man-hours)
Physical servers - high
Organizational - high
Service Level Agreements - low
Pick intelligently! Switch later.
Adding servers is easy, adding developers is hard
Change strategies when costs are projected to rise
Software costs are typically the highest
Organizational costs increase with complexity
Hardware is cheap
MongoDB Can Help
Changing software is expensive
Leverage sharding
“Shard early and often”
Higher initial cost
Seamless transition between database partitioning
and device partitioning.
$redact Aggregation Stage
Only useful in a narrow range of cases.
Security based entirely in code.
Thank you!
Justin LaBreck
Senior Consulting Engineer, MongoDB
justin.labreck@mongodb.com

More Related Content

What's hot

Building a Microservices-based ERP System
Building a Microservices-based ERP SystemBuilding a Microservices-based ERP System
Building a Microservices-based ERP System
MongoDB
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
Apigee | Google Cloud
 

What's hot (20)

ELK Stack
ELK StackELK Stack
ELK Stack
 
Observability for modern applications
Observability for modern applications  Observability for modern applications
Observability for modern applications
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
Service discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring CloudService discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring Cloud
 
Building a Microservices-based ERP System
Building a Microservices-based ERP SystemBuilding a Microservices-based ERP System
Building a Microservices-based ERP System
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
iSAQB Software Architecture Gathering 2022 - Do we still need architects
iSAQB Software Architecture Gathering 2022 - Do we still need architectsiSAQB Software Architecture Gathering 2022 - Do we still need architects
iSAQB Software Architecture Gathering 2022 - Do we still need architects
 
Edge architecture ieee international conference on cloud engineering
Edge architecture   ieee international conference on cloud engineeringEdge architecture   ieee international conference on cloud engineering
Edge architecture ieee international conference on cloud engineering
 
Citi Tech Talk Disaster Recovery Solutions Deep Dive
Citi Tech Talk  Disaster Recovery Solutions Deep DiveCiti Tech Talk  Disaster Recovery Solutions Deep Dive
Citi Tech Talk Disaster Recovery Solutions Deep Dive
 
Observability – the good, the bad, and the ugly
Observability – the good, the bad, and the uglyObservability – the good, the bad, and the ugly
Observability – the good, the bad, and the ugly
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
 
What is an API Gateway?
What is an API Gateway?What is an API Gateway?
What is an API Gateway?
 
Api Gateway
Api GatewayApi Gateway
Api Gateway
 
An Authentication and Authorization Architecture for a Microservices World
An Authentication and Authorization Architecture for a Microservices WorldAn Authentication and Authorization Architecture for a Microservices World
An Authentication and Authorization Architecture for a Microservices World
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
 
Automated Deployments
Automated DeploymentsAutomated Deployments
Automated Deployments
 
How to deploy machine learning models into production
How to deploy machine learning models into productionHow to deploy machine learning models into production
How to deploy machine learning models into production
 
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
[DSC Europe 23] Spela Poklukar & Tea Brasanac - Retrieval Augmented Generation
 
APIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIsAPIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIs
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 

Similar to Managing Multi-Tenant SaaS Applications at Scale

Sybase Global Infrastructure
Sybase Global InfrastructureSybase Global Infrastructure
Sybase Global Infrastructure
Robert Mobley
 
Tag productos y servicios
Tag  productos y serviciosTag  productos y servicios
Tag productos y servicios
webanexo
 
Acceleration_and_Security_draft_v2
Acceleration_and_Security_draft_v2Acceleration_and_Security_draft_v2
Acceleration_and_Security_draft_v2
Srinivasa Addepalli
 
vRescue Presentation
vRescue PresentationvRescue Presentation
vRescue Presentation
vRescue
 
Monitoring IAAS & PAAS Solutions
Monitoring IAAS & PAAS SolutionsMonitoring IAAS & PAAS Solutions
Monitoring IAAS & PAAS Solutions
Colloquium
 
How to Choose a Host for a Big Data Project
How to Choose a Host for a Big Data ProjectHow to Choose a Host for a Big Data Project
How to Choose a Host for a Big Data Project
Peak Hosting
 
Kalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge ContinuumKalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge Continuum
Jonas Bonér
 

Similar to Managing Multi-Tenant SaaS Applications at Scale (20)

Pass 2013 dantoni azure a gs
Pass 2013 dantoni azure a gsPass 2013 dantoni azure a gs
Pass 2013 dantoni azure a gs
 
Trusted db a trusted hardware based database with privacy and data confidenti...
Trusted db a trusted hardware based database with privacy and data confidenti...Trusted db a trusted hardware based database with privacy and data confidenti...
Trusted db a trusted hardware based database with privacy and data confidenti...
 
trusted db a trusted hardware-based database with privacy and data confidenti...
trusted db a trusted hardware-based database with privacy and data confidenti...trusted db a trusted hardware-based database with privacy and data confidenti...
trusted db a trusted hardware-based database with privacy and data confidenti...
 
Sybase Global Infrastructure
Sybase Global InfrastructureSybase Global Infrastructure
Sybase Global Infrastructure
 
Cloud Technology: What is it? What can it do for your Association
Cloud Technology: What is it? What can it do for your AssociationCloud Technology: What is it? What can it do for your Association
Cloud Technology: What is it? What can it do for your Association
 
Tag productos y servicios
Tag  productos y serviciosTag  productos y servicios
Tag productos y servicios
 
NJMGMA Practice Management Conference (PMC2014) - Cloud Computing Demystified
NJMGMA Practice Management Conference (PMC2014) - Cloud Computing DemystifiedNJMGMA Practice Management Conference (PMC2014) - Cloud Computing Demystified
NJMGMA Practice Management Conference (PMC2014) - Cloud Computing Demystified
 
Dynamic Data Center Toolkit - Darryl Chantry
Dynamic Data Center Toolkit - Darryl ChantryDynamic Data Center Toolkit - Darryl Chantry
Dynamic Data Center Toolkit - Darryl Chantry
 
New Database and Application Development Technology
New Database and Application Development TechnologyNew Database and Application Development Technology
New Database and Application Development Technology
 
Acceleration_and_Security_draft_v2
Acceleration_and_Security_draft_v2Acceleration_and_Security_draft_v2
Acceleration_and_Security_draft_v2
 
vRescue Presentation
vRescue PresentationvRescue Presentation
vRescue Presentation
 
ADV Slides: The Evolution of the Data Platform and What It Means to Enterpris...
ADV Slides: The Evolution of the Data Platform and What It Means to Enterpris...ADV Slides: The Evolution of the Data Platform and What It Means to Enterpris...
ADV Slides: The Evolution of the Data Platform and What It Means to Enterpris...
 
Cloud Computing for Small & Medium Businesses
Cloud Computing for Small & Medium BusinessesCloud Computing for Small & Medium Businesses
Cloud Computing for Small & Medium Businesses
 
Monitoring IAAS & PAAS Solutions
Monitoring IAAS & PAAS SolutionsMonitoring IAAS & PAAS Solutions
Monitoring IAAS & PAAS Solutions
 
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
Building a Single Logical Data Lake: For Advanced Analytics, Data Science, an...
 
A #Pink14 Presentation: Optimizing for the #SDDC
A #Pink14 Presentation: Optimizing for the #SDDCA #Pink14 Presentation: Optimizing for the #SDDC
A #Pink14 Presentation: Optimizing for the #SDDC
 
Learn How SMBs Are Cutting IT Costs By Over 50%
Learn How SMBs Are Cutting IT Costs By Over 50%Learn How SMBs Are Cutting IT Costs By Over 50%
Learn How SMBs Are Cutting IT Costs By Over 50%
 
How to Choose a Host for a Big Data Project
How to Choose a Host for a Big Data ProjectHow to Choose a Host for a Big Data Project
How to Choose a Host for a Big Data Project
 
Audax Group: CIO Perspectives - Managing The Copy Data Explosion
Audax Group: CIO Perspectives - Managing The Copy Data ExplosionAudax Group: CIO Perspectives - Managing The Copy Data Explosion
Audax Group: CIO Perspectives - Managing The Copy Data Explosion
 
Kalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge ContinuumKalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge Continuum
 

More from MongoDB

More from MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 

Recently uploaded (20)

Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 

Managing Multi-Tenant SaaS Applications at Scale

  • 1. Managing Multi-tenancy Meaningfully Strategies for planning and deploying multi-tenant environments
  • 3. What is multi-tenancy? Multiple clients Regional data Permissioned data Regulated data Any set of data that can (or should) be segregated logically for managerial purposes.
  • 4. The What? Data partitioning Database partitioning Device partitioning The How? Trade-offs, considerations, and solutions
  • 5. 012 - Justin 012 - MongoDB 012 - 949-555-1234 345 - John 345 - Widget Llc. 678 - Jane 678 - Acme Inc. The What? Visualized ClientA.People 012 - Justin 012 - MongoDB 012 - 949-555-1234 ClientB.People 012 - Justin 012 - MongoDB 345 - John 345 - Widget Ltc. ClientC.People 678 - Jane 678 - Acme Inc. People 012 - Justin 012 - MongoDB 012 - 949-555-1234 People 987 - Justin 987 - MongoDB 345 - John 345 - Widget Ltc. People 678 - Jane 678 Acme Inc. ClientC ClientB ClientA Data Partitioning People Database Partitioning Database Partitioning
  • 6. All your data in one place (one giant dataset) Provide users access based on permissions Authentication Authorization Auditing }Fundamental, otherwise it’s not multi-tenant Data partitioning shared database, shared collection Data storage Processing Filtering Delivery
  • 7. Database partitioning isolated database, shared environment Data is split logically between different databases Options are many … as are consequences of choosing wrong Software level - hard; make the software pick a database Database level - easy; let the database route queries appropriate Single instance, multiple databases vs. multiple instances, single database per instance Which one is better? (more on this later) Data storage Filtering Processing Delivery
  • 8. Device partitioning isolated environments Similar to scaling horizontally across many servers Multiple server instances, each with a single database (virtual isolated, containers) Multiple servers, single database on each Allows for customized code solutions ($) Data storageFiltering Processing Delivery
  • 9. There are trade-offs for each! Costs to consider: Financial cost ($) Developer cost (man-hours) Infrastructure cost What are infrastructure costs? Physical costs of maintenance Organizational costs Service Level Agreements (SLA)
  • 10. Infrastructure Costs = ($ + man-hours) “We had no idea this would turn into a public and global infrastructure.” - Vint Cerf (co-inventor, TCP/IP) ● Physical costs - maintaining hardware ● Organizational costs ○ Data partitioning - how do you test permission based partitioning? ○ Database partitioning - who owns/manages code that connects to multiple environments? ○ Device partitioning - who fields the additional costs? ● Service Level Agreements ($ + man-hours)
  • 11. Cost of data partitioning Hardware - low cost ($) Software - extreme cost (man-hours) Infrastructure - medium ($ + man-hours) Physical servers - medium Organizational - low Service Level Agreements - high 012 - Justin 012 - MongoDB 012 - 949-555-1234 345 - John 345 - Widget Llc. 678 - Jane 678 - Acme Inc. ClientC ClientB ClientA
  • 12. Cost of database partitioning Hardware - medium ($) Software - medium (man-hours) Infrastructure - medium ($ + man-hours) Physical servers - low Organizational - high Service Level Agreements - medium/high
  • 13. Cost of device partitioning Hardware - medium/high ($) Software - low (man-hours) Infrastructure - high ($ + man-hours) Physical servers - high Organizational - high Service Level Agreements - low
  • 14. Pick intelligently! Switch later. Adding servers is easy, adding developers is hard Change strategies when costs are projected to rise Software costs are typically the highest Organizational costs increase with complexity Hardware is cheap
  • 15. MongoDB Can Help Changing software is expensive Leverage sharding “Shard early and often” Higher initial cost Seamless transition between database partitioning and device partitioning. $redact Aggregation Stage Only useful in a narrow range of cases. Security based entirely in code.
  • 16. Thank you! Justin LaBreck Senior Consulting Engineer, MongoDB justin.labreck@mongodb.com

Editor's Notes

  1. Who am I? (3 min; 3 min total) MongoDB Sr. Consulting Engineer Work in multi-tenant environment (Events and entertainment industry) How am I qualified to discuss topic?
  2. Before we dive in, what is multi-tenancy? Fundamentally, any data that can be segregated can be multi-tenant. Most common is multiple client or permissioned data. What is Multi-tenancy? (2 min; 5 min total) Briefly explain idea of multi-tenancy Provide several examples of multi-tenant environment Highlight a single example to be used throughout talk Event entertainment industry
  3. Introduce what we will be learning: Covering three types of data segregation or “partitioning” Will discuss business considerations and use-cases for each What strategies exist for multi-tenancy? (7 min; 12 min total)
  4. Shared database + shared collection (data partitioning) Requires explicit storage of permissions - permissions are hard
  5. Isolated database + shared environment (database partitioning) Multiple options for interacting with different databases Code level - hard, how does the software know where to connect Database level - easy, leverage sharding (more on this later) Single instance, multiple databases vs. multiple instances, single database
  6. Isolated environments (device partitioning) Akin to scaling horizontally Multiple server instances, single database (virtual isolated environments) vs. multiple servers, single database Allows for custom code per customer
  7. Don’t over-project; it’s easier to add more servers than more developers. How do the three strategies compare for cost? (20 min; 30 min total) There are trade-offs; business must decide based on growth projections Don’t over project, easier than it seems to switch
  8. Each of these costs involves both dollars and man-hours. Costs increase exponentially Usually ends up being more than expected What happens if your product is a success?? Infrastructure cost Physical costs of managing hardware (($ + man hours) * expansiveness) Organizational costs Data partition - how do you test permission-based partitioning? Database partitioning - Who owns code that partitions based on shared environment? Isolated environment - who fields the additional cost? Service Level Agreements (SLA) + points of failure Recovery Point Objective (RPO) Recovery Time Objective (RTO)
  9. Hardware: large servers needed but fewer of them Software: all that code and testing requires a lot of complexity and time Infrastructure Physical: lots of work for fewer servers Organizational: fewer servers to manage means fewer windows to open by the admin, fewer hard drive replacements SLA: one outage means all customers are offline
  10. Hardware: more servers Software: code less complex, but still issues (how do you route queries?) Infrastructure Physical: larger servers but not much more work Organizational: memory contention, resource contention SLA: all customers go down if software fails, single customers go down if database instance fails
  11. Hardware: more servers Software: can be transparent to software Infrastructure Physical: instance per server per hardware, additional automation costs Organizational: many databases need management (indexes, cleanup) SLA: one database down means only one customer down
  12. “You don’t have to pay benefits to hardware and they work more hours than employees!” Change when costs projected to increase Software cost usually the most expensive Organizational cost always increase with complexity Hardware is cheapest “You don’t pay benefits to hardware and they work more hours than employees!”
  13. MongoDB can help (5 min; 35 min total) Views as aggregation pipelines (data partitioning) Benefit over SQL views (complex aggregations, $redact) Sharding (database partitioning, device partitioning) Best for future-proofing deployment Transparent to software, brings cost of software down Can partition data by database; by instance; or by hardware without changing software at all Migrate data from one set of hardware to another Premium tier vs. non-premium tier Store churned customers online with low cost Automatic balancing Flexible cache sizing for multi-instance environments Micro-sharding (beware)
  14. Questions (3 minutes; 40 min total) MongoDB Professional Services available