SlideShare uma empresa Scribd logo
1 de 41
Multi-tenancy:
Winning formula for a
        PaaS
                 by
      Srinath Perera, Ph.D.
      Senior Software Architect
             WSO2 Inc.
Next 45 Minutes …
• Brief Introduction to
  Cloud and PaaS
• What and Why Multi-
  tenancy?
• Implementing Multi-
  tenancy
  •   Data Multi-tenancy
  •   Execution Multi-tenancy
• Scaling Up
• Conclusion

                                                   Photo by Bruno Girin on
                           Flickr, http://www.flickr.com/photos/brunogirin/27981693/, Licensed
Cloud Computing




   Ability to buy computations power, storage, or
    execution services as an Utility, on demand.
   For more details read “A View of Cloud
    Computing, Communications of the ACM, 2010”
Cloud Computing (contd.)
• Best way to explain it is by
  comparing it to Electricity
• Idea is a big pool of servers and
  share.
  • Economics of scale through
    Optimize large scale operations.
  • Resource Pooling.
  • No need for capacity
    planning, start small and grow as
    needed.
  • Outsource and enabling
    specialization.

                                                   photo by LoopZilla on
                        Flickr, http://www.flickr.com/photos/loopzilla/2328231843/sizes/m/in/ph
Cloud Offerings
Why PaaS?
• IaaS only provides limited saving to someone who
  needs to outsource their IT functions
• SaaS is great when they can be used
  •   They are usually very specific (e.g. email, CRM ..)
  •   If they match, then great, but if they are not, not
      much choice for the user.
• PaaS stays in the middle ground
  •   Framework to host your apps
  •   Hopefully you can move your apps as it is (well not
      the case with Azure or App Engine, but it is possible
      with WSO2 Stratos !!!).
What is Multi-tenancy ?




   Many Parties share the same set of resources, while
    giving each one his own space
Why Multi-tenancy? 1. Increased sharing
•   Cloud shares
    resources across a
    large pool of users.
•   Now sharing happens
    in the application
    level as oppose to
    sharing at OS level for
                                       “There is no delight in
    multiple processes               owning anything unshared.”
    and sharing at HW                     Seneca (Roman philosopher, mid-1st
    level with VMs.                                 century AD)

•   That can bring greater
    savings


                                                             photo by Ben Gray on
                              Flickr, http://www.flickr.com/photos/ben_grey/4582294721/, Licensed under CC
Why Multi-tenancy? 2. Provide “pay for
     what you use”
•   Often there will be many accounts
    in a PaaS or a SaaS, but only a
    fraction of them will be in use.
•   We cannot allocate runtime
    resource per account (disk may be
    ok, as it is cheap). For
    example, we cannot run a VM per
    account.
•   By sharing the same server with
    many users, Multi-tenancy provides
    much reduced runtime cost per
    server.
Multi-tenancy vs. Virtual Machines
•       Multi-tenancy provides much fine
        grained sharing by many
        applications sharing the same
        server.
•       Say there are 100k accounts, but
        10k active users at a time. VM
        based model needs 100k
        VMs, which means there is a cost
        incurred per account.
    •   With Multi-tenancy one server can handle many
        accounts, and by mixing and matching heavy and light
        users, Multi-tenancy can operate with much less number of
        servers.
                                                          photo by hans s on
                                    Flickr, http://www.flickr.com/photos/archeon/2359334908/
Motivating Usecases
To fulfill Cloud Promise: Implementing PaaS


• As discussed it is crucial
  in supporting “Pay as
  you go” in a Platform as
  a Service (PaaS)



• For example (within Stratos)
  •    Web Service Hosting as a Service ,Web Application
       Hosting as a Service, Message Mediation Execution as a
       Service (ESB), Governance as a Service, Workflow as a
       Service
SMBs (Small and Medium size Business)
 Most SMBs can not
  afforded to run their own
  SOA technologies.
 This stops them from
  going to the next level.
 Workflow, Service and
  Web hosting as a service
  can enable multiple SMBs
  to share the same
  infrastructure.

 This will lower the bar of SOA/ Middleware use, and
   enable SMBs to move to the next level.


                                                      photo by Olaf on Flickr
                              http://www.flickr.com/photos/okreitz/3073783437/, Licensed under CC
E-Science Gateways
• Scientific workflows has
  been identified as enabling
  technology for E-Science.
• Idea is to let scientists
  visually compose workflows
  and run them.
• There are many gateways
  that do this.

 Enable multiple science gateways to share the same
  infrastructure thus reducing the maintenance cost and
  resource sharing .
  o Same would work for most e-Gov stuff and for most organizations.


                                                    photo by Image Editor on
                            Flickr, http://www.flickr.com/photos/11304375@N07/2769519295/, Li
How Good is this
 Multi-Tenancy
implementation?
Multi-tenancy Maturity Models
• Model is Defined by Chong et al.
    •     (F. Chong and G. Carraro, “Architecture strategies for catching the long
          tail,” MSDN Library, Microsoft Corporation, 2006.)

•       Provide a way to understand Multi-tenant
        implementations.
    •     Level1: Instance per Client
    •     Level 2: Configurable instance per Client
    •     Level 3: Single instance can serve multiple Clients
    •     Level 4: Scaling up Level 3 by running multiple
          instances and distributing the load.
Implementing Multi-
     Tenancy
Goals of Multi-tenancy

•   Sharing – maximize the
    resource sharing across
    multiple tenants.

 Isolation – hide the fact other users are also in the same
  server.
    o Execution – enforce security. Make sure one tenant can’t call
      other tenants executable logic.
    o Data – make sure one tenant can’t see other’s data
    o Performance - make sure performance is not affected by
      existence of other tenants.
 Scale
    o Server is distributed and it can handle larger load by adding more
      nodes.

                                                    photo by John TrainoronFlickr
                               http://www.flickr.com/photos/trainor/2902023575/, Licensed under CC
It is about trading off Isolation vs. Sharing




  As often the case in research, implementing
           Multi-tenancy is a tradeoff
                                          photo by Todd Anderson on
                  Flickr, http://www.flickr.com/photos/toddography/12034661/, Licensed
WSO2 Carbon Platform
WSO2 Platform Architecture




   We break multi-tenancy into three parts (Based on Chang et
    al.).
            Execution: Business Processes, Workflows and Mashups
            Security: ownership and authorization of both data, as
            well as executions in the framework
            Data : User data and system runtime data
Multi-tenancy Architecture
Achieving Tenant Isolation




   Each Tenant is given a Security Domain
   Each domain may have its own User Store and Permissions, thus
    have a set of users and permissions enabling users to access
    resources
   Each domain is isolated and do not have access to other domains
Implementing Data Multi-tenancy




• Separate DB
• Separate Schema
• Shared Schema
Separate Databases
 • If you have no control
   over the code, then
   this is the only
   solution                          Tenant 1   Tenant 4   Tenant 8


 • Horizontally
   scalable, but relatively
   expensive
• Vertical scaling is challenging but solvable
• WSO2 Relational Storage Service uses this models
  to provide users with DBs


                        11/29/2011                                    25
Separate Schema

• Relatively easy to
  implement
• Some databases have
  ways to support this
  directly but many
  don’t
• Failure difficult to
  handle
• Scales reasonably well


                         11/29/2011   26
Shared Databases, Shared Schema

• Most efficient storage-
  wise and scales very
  well for large number
  of tenants
• Requires all accesses
  to qualify with tenant
• Failure is global
• (Stratos uses this
  approach internally for
  all provide isolation
  within WSO2 Registry)

                      11/29/2011    27
Implementing Execution Isolation




   All executions are based on Axis2
   Axis2 have stateless executions and keep all state in
    a Context.
   So if we create different context for each
    tenant, they are isolated.
Implementing Execution Isolation (Contd.)
Implementing Execution Isolation (Contd.)
• We use Java Security to
  make sure one tenant
  cannot access or temper
  with other tenant’s data
  structures, file system
  data etc.
• Example
  •   Tenant ID value in the
      context
Performance Isolation




•    Performance isolation is a challenging issue.
    •   We currently relay on monitoring and auditing where
        we can kill CPU hogging processes
    •   We are exploring the possibility of changing the
        priority of CPU hogging processes in the work queues
        (e.g. workflow engine, ESB etc.).
                            photo Fortes by on Flickr, http://www.fotopedia.com/items/flickr-
                                                     3193056200
Scaling Up
Scaling Multi-tenant Middleware
• So far we talked about building a single Multi-
  tenant Node (That is Level 3)
• To reach Level 4, we have to scale.
• To do that
  •   We have to run this with many nodes, and we have
      to partition.
  •   We have to replicate or partition. But we are talking
      about 1000s of tenants, likely one tenant can not
      hold all of them.
  •   So We need to partition
  •   We also need load balancing, and it should know
      about tenants.
Overhead of Multi-
    Tenancy
Service Performance
Workflow Performance




 Setup Multi-tenant and non-multi-tenant versions
 Run 200 workflows from each client
 Overhead is minimal
  o MT supports only add few additional lookups and checks
  o Java Security does not come in to play as we do not run user
    provided code.
For more details (Publications on the topic)
• A. Azeez and S. Perera et al., WSO2 Stratos: An Industrial
  Stack to Support Cloud Computing, IT: Methods and
  Applications of Informatics and Information Technology
  Journal, the special Issue on Cloud Computing, 2011.
• AfkhamAzeez, Srinath Perera, DimuthuGamage, Ruwan
  Linton, PrabathSiriwardana, DimuthuLeelaratne, SanjivaWee
  rawarana, Paul Fremantle, "Multi-Tenant SOA Middleware
  for Cloud Computing" 3rd International Conference on
  Cloud Computing, Florida, 2010
• MilindaPathirage, Srinath
  Perera, SanjivaWeerawarana, Indika Kumara, A Multi-
  tenant Architecture for Business Process Execution, 9th
  International Conference on Web Services (ICWS), 2011
Conclusion
• We discussed what is Multi-tenancy and why it is
  crucial for implementing a PaaS.
• We discussed details about implementing it
  •   Isolation (Data, Execution) .. Isolation vs. sharing tradeoff
  •   Four level’s of multi-tenancy
  •   Scaling Design
• Lot of open questions yet to be solved. Your thoughts
  and code both are welcome.
  •   Data Security (Encryption, Delegation etc. ), Tenant
      Migration , Scaling, Lazy loading …
Questions?
Feedback URL



https://appserver.stratoslive.wso2.com/t/
 wso2con2011.com/webapps/feedback-
          sample-1.0.0/feedback

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Cloud Economics and calculating CTO - AWSome Day Zurich 112016
Cloud Economics and calculating CTO - AWSome Day Zurich 112016Cloud Economics and calculating CTO - AWSome Day Zurich 112016
Cloud Economics and calculating CTO - AWSome Day Zurich 112016
 
cloud computing architecture.pptx
cloud computing architecture.pptxcloud computing architecture.pptx
cloud computing architecture.pptx
 
Cloud Migration: Moving to the Cloud
Cloud Migration: Moving to the CloudCloud Migration: Moving to the Cloud
Cloud Migration: Moving to the Cloud
 
Build an AppStream 2.0 Environment to Deliver Desktop Applications to Any Com...
Build an AppStream 2.0 Environment to Deliver Desktop Applications to Any Com...Build an AppStream 2.0 Environment to Deliver Desktop Applications to Any Com...
Build an AppStream 2.0 Environment to Deliver Desktop Applications to Any Com...
 
cloud-migrations.pptx
cloud-migrations.pptxcloud-migrations.pptx
cloud-migrations.pptx
 
Cloud Migration Workshop
Cloud Migration WorkshopCloud Migration Workshop
Cloud Migration Workshop
 
MULTI-CLOUD ARCHITECTURE
MULTI-CLOUD ARCHITECTUREMULTI-CLOUD ARCHITECTURE
MULTI-CLOUD ARCHITECTURE
 
Cloud Migration Strategy and Best Practices
Cloud Migration Strategy and Best PracticesCloud Migration Strategy and Best Practices
Cloud Migration Strategy and Best Practices
 
5 Highest-Impact CASB Use Cases
5 Highest-Impact CASB Use Cases5 Highest-Impact CASB Use Cases
5 Highest-Impact CASB Use Cases
 
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
Introduction to AWS Cloud Computing | AWS Public Sector Summit 2016
 
Public cloud
Public cloudPublic cloud
Public cloud
 
Software-Defined Data Center Case Study – Financial Institution and VMware
Software-Defined Data Center Case Study – Financial Institution and VMwareSoftware-Defined Data Center Case Study – Financial Institution and VMware
Software-Defined Data Center Case Study – Financial Institution and VMware
 
Cloud platform technical sales presentation
Cloud platform technical sales presentationCloud platform technical sales presentation
Cloud platform technical sales presentation
 
ZStack for Datacenter as a Service - Product Deck
ZStack for Datacenter as a Service - Product DeckZStack for Datacenter as a Service - Product Deck
ZStack for Datacenter as a Service - Product Deck
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
Amazon RDS & Amazon Aurora: Relational Databases on AWS - SRV206 - Atlanta AW...
 
AWS for Backup and Recovery
AWS for Backup and RecoveryAWS for Backup and Recovery
AWS for Backup and Recovery
 
Microsoft Azure Security Overview
Microsoft Azure Security OverviewMicrosoft Azure Security Overview
Microsoft Azure Security Overview
 
Migrating On-Premises Databases to Cloud
Migrating On-Premises Databases to CloudMigrating On-Premises Databases to Cloud
Migrating On-Premises Databases to Cloud
 
Object Storage Overview
Object Storage OverviewObject Storage Overview
Object Storage Overview
 

Destaque

Multi-tenancy: Winning formula for a PaaS
Multi-tenancy: Winning formula for a PaaSMulti-tenancy: Winning formula for a PaaS
Multi-tenancy: Winning formula for a PaaS
Srinath Perera
 
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
MongoDB
 
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Felix Gessert
 

Destaque (20)

Building a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.jsBuilding a Multi-tenanted SaaS with Node.js
Building a Multi-tenanted SaaS with Node.js
 
Building a Platform-as-a-Service with Docker and Node.js
Building a Platform-as-a-Service with Docker and Node.jsBuilding a Platform-as-a-Service with Docker and Node.js
Building a Platform-as-a-Service with Docker and Node.js
 
Building a SaaS with Nodejs, Docker, and CoreOS
Building a SaaS with Nodejs, Docker, and CoreOSBuilding a SaaS with Nodejs, Docker, and CoreOS
Building a SaaS with Nodejs, Docker, and CoreOS
 
Multi-tenancy: Winning formula for a PaaS
Multi-tenancy: Winning formula for a PaaSMulti-tenancy: Winning formula for a PaaS
Multi-tenancy: Winning formula for a PaaS
 
Build Your Own SaaS using Docker
Build Your Own SaaS using DockerBuild Your Own SaaS using Docker
Build Your Own SaaS using Docker
 
EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...
EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...
EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...
 
Circuit 2015 Keynote - Carsten Ziegeler
Circuit 2015 Keynote -  Carsten ZiegelerCircuit 2015 Keynote -  Carsten Ziegeler
Circuit 2015 Keynote - Carsten Ziegeler
 
Docker Based SaaS Platform - Case Study
Docker Based SaaS Platform - Case StudyDocker Based SaaS Platform - Case Study
Docker Based SaaS Platform - Case Study
 
Microservices with SenecaJS (part 2)
Microservices with SenecaJS (part 2)Microservices with SenecaJS (part 2)
Microservices with SenecaJS (part 2)
 
Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM
 
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
 
Securing application deployments in multi-tenant CI/CD environments
Securing application deployments in multi-tenant CI/CD environmentsSecuring application deployments in multi-tenant CI/CD environments
Securing application deployments in multi-tenant CI/CD environments
 
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EEJavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
 
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
 
How to build, manage and operate a successful saas business
How to build, manage and operate a successful saas businessHow to build, manage and operate a successful saas business
How to build, manage and operate a successful saas business
 
Aberdeen Oil & Gas Event - Introduction to the AWS Cloud
Aberdeen Oil & Gas Event - Introduction to the AWS CloudAberdeen Oil & Gas Event - Introduction to the AWS Cloud
Aberdeen Oil & Gas Event - Introduction to the AWS Cloud
 
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source TriumvirateCloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
 
Cloud life seminar open shift,이준영(배포용)
Cloud life seminar   open shift,이준영(배포용)Cloud life seminar   open shift,이준영(배포용)
Cloud life seminar open shift,이준영(배포용)
 
IOT Platform as a Service
IOT Platform as a ServiceIOT Platform as a Service
IOT Platform as a Service
 

Semelhante a Multi tenancy - Wining formula for a PaaS

Multi-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud ComputingMulti-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud Computing
Srinath Perera
 
Clould Computing and its application in Libraries
Clould Computing and its application in LibrariesClould Computing and its application in Libraries
Clould Computing and its application in Libraries
Amit Shaw
 
Docker-N-Beyond
Docker-N-BeyondDocker-N-Beyond
Docker-N-Beyond
santosh007
 

Semelhante a Multi tenancy - Wining formula for a PaaS (20)

A Multi-tenant Architecture for Business Process Executions
A Multi-tenant Architecture for Business Process ExecutionsA Multi-tenant Architecture for Business Process Executions
A Multi-tenant Architecture for Business Process Executions
 
A Multi-tenant Architecture for Business Process Execution
A Multi-tenant Architecture for Business Process ExecutionA Multi-tenant Architecture for Business Process Execution
A Multi-tenant Architecture for Business Process Execution
 
Multi-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud ComputingMulti-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud Computing
 
Multi-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud ComputingMulti-Tenant SOA Middleware for Cloud Computing
Multi-Tenant SOA Middleware for Cloud Computing
 
Multi Tenancy In The Cloud
Multi Tenancy In The CloudMulti Tenancy In The Cloud
Multi Tenancy In The Cloud
 
Cloud.pptx
Cloud.pptxCloud.pptx
Cloud.pptx
 
Cloud
CloudCloud
Cloud
 
Clould Computing and its application in Libraries
Clould Computing and its application in LibrariesClould Computing and its application in Libraries
Clould Computing and its application in Libraries
 
Docker-N-Beyond
Docker-N-BeyondDocker-N-Beyond
Docker-N-Beyond
 
FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0 FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0
 
The move-to-hybrid-cloud-itsmf-april2015
The move-to-hybrid-cloud-itsmf-april2015The move-to-hybrid-cloud-itsmf-april2015
The move-to-hybrid-cloud-itsmf-april2015
 
Cambridge Breakfast Seminar
Cambridge Breakfast SeminarCambridge Breakfast Seminar
Cambridge Breakfast Seminar
 
Cloud computing What Why How
Cloud computing What Why HowCloud computing What Why How
Cloud computing What Why How
 
3 Step Path to Storage Cloud Services using IBM System Storage
3 Step Path to Storage Cloud Services using IBM System Storage3 Step Path to Storage Cloud Services using IBM System Storage
3 Step Path to Storage Cloud Services using IBM System Storage
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Unit-I: Introduction to Cloud Computing
Unit-I: Introduction to Cloud ComputingUnit-I: Introduction to Cloud Computing
Unit-I: Introduction to Cloud Computing
 
Cloud presentation NELA
Cloud presentation NELACloud presentation NELA
Cloud presentation NELA
 
AZ-900 Azure Fundamentals.pdf
AZ-900 Azure Fundamentals.pdfAZ-900 Azure Fundamentals.pdf
AZ-900 Azure Fundamentals.pdf
 
Cloud computing and data security
Cloud computing and data securityCloud computing and data security
Cloud computing and data security
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 

Mais de WSO2

Mais de WSO2 (20)

Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
WSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the CloudWSO2CON 2024 - Elevating the Integration Game to the Cloud
WSO2CON 2024 - Elevating the Integration Game to the Cloud
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and ApplicationsWSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
WSO2CON 2024 - Architecting AI in the Enterprise: APIs and Applications
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Multi tenancy - Wining formula for a PaaS

  • 1. Multi-tenancy: Winning formula for a PaaS by Srinath Perera, Ph.D. Senior Software Architect WSO2 Inc.
  • 2. Next 45 Minutes … • Brief Introduction to Cloud and PaaS • What and Why Multi- tenancy? • Implementing Multi- tenancy • Data Multi-tenancy • Execution Multi-tenancy • Scaling Up • Conclusion Photo by Bruno Girin on Flickr, http://www.flickr.com/photos/brunogirin/27981693/, Licensed
  • 3. Cloud Computing  Ability to buy computations power, storage, or execution services as an Utility, on demand.  For more details read “A View of Cloud Computing, Communications of the ACM, 2010”
  • 4. Cloud Computing (contd.) • Best way to explain it is by comparing it to Electricity • Idea is a big pool of servers and share. • Economics of scale through Optimize large scale operations. • Resource Pooling. • No need for capacity planning, start small and grow as needed. • Outsource and enabling specialization. photo by LoopZilla on Flickr, http://www.flickr.com/photos/loopzilla/2328231843/sizes/m/in/ph
  • 6. Why PaaS? • IaaS only provides limited saving to someone who needs to outsource their IT functions • SaaS is great when they can be used • They are usually very specific (e.g. email, CRM ..) • If they match, then great, but if they are not, not much choice for the user. • PaaS stays in the middle ground • Framework to host your apps • Hopefully you can move your apps as it is (well not the case with Azure or App Engine, but it is possible with WSO2 Stratos !!!).
  • 7. What is Multi-tenancy ?  Many Parties share the same set of resources, while giving each one his own space
  • 8. Why Multi-tenancy? 1. Increased sharing • Cloud shares resources across a large pool of users. • Now sharing happens in the application level as oppose to sharing at OS level for “There is no delight in multiple processes owning anything unshared.” and sharing at HW Seneca (Roman philosopher, mid-1st level with VMs. century AD) • That can bring greater savings photo by Ben Gray on Flickr, http://www.flickr.com/photos/ben_grey/4582294721/, Licensed under CC
  • 9. Why Multi-tenancy? 2. Provide “pay for what you use” • Often there will be many accounts in a PaaS or a SaaS, but only a fraction of them will be in use. • We cannot allocate runtime resource per account (disk may be ok, as it is cheap). For example, we cannot run a VM per account. • By sharing the same server with many users, Multi-tenancy provides much reduced runtime cost per server.
  • 10. Multi-tenancy vs. Virtual Machines • Multi-tenancy provides much fine grained sharing by many applications sharing the same server. • Say there are 100k accounts, but 10k active users at a time. VM based model needs 100k VMs, which means there is a cost incurred per account. • With Multi-tenancy one server can handle many accounts, and by mixing and matching heavy and light users, Multi-tenancy can operate with much less number of servers. photo by hans s on Flickr, http://www.flickr.com/photos/archeon/2359334908/
  • 12. To fulfill Cloud Promise: Implementing PaaS • As discussed it is crucial in supporting “Pay as you go” in a Platform as a Service (PaaS) • For example (within Stratos) • Web Service Hosting as a Service ,Web Application Hosting as a Service, Message Mediation Execution as a Service (ESB), Governance as a Service, Workflow as a Service
  • 13. SMBs (Small and Medium size Business)  Most SMBs can not afforded to run their own SOA technologies.  This stops them from going to the next level.  Workflow, Service and Web hosting as a service can enable multiple SMBs to share the same infrastructure. This will lower the bar of SOA/ Middleware use, and enable SMBs to move to the next level. photo by Olaf on Flickr http://www.flickr.com/photos/okreitz/3073783437/, Licensed under CC
  • 14. E-Science Gateways • Scientific workflows has been identified as enabling technology for E-Science. • Idea is to let scientists visually compose workflows and run them. • There are many gateways that do this.  Enable multiple science gateways to share the same infrastructure thus reducing the maintenance cost and resource sharing . o Same would work for most e-Gov stuff and for most organizations. photo by Image Editor on Flickr, http://www.flickr.com/photos/11304375@N07/2769519295/, Li
  • 15. How Good is this Multi-Tenancy implementation?
  • 16. Multi-tenancy Maturity Models • Model is Defined by Chong et al. • (F. Chong and G. Carraro, “Architecture strategies for catching the long tail,” MSDN Library, Microsoft Corporation, 2006.) • Provide a way to understand Multi-tenant implementations. • Level1: Instance per Client • Level 2: Configurable instance per Client • Level 3: Single instance can serve multiple Clients • Level 4: Scaling up Level 3 by running multiple instances and distributing the load.
  • 18. Goals of Multi-tenancy • Sharing – maximize the resource sharing across multiple tenants.  Isolation – hide the fact other users are also in the same server. o Execution – enforce security. Make sure one tenant can’t call other tenants executable logic. o Data – make sure one tenant can’t see other’s data o Performance - make sure performance is not affected by existence of other tenants.  Scale o Server is distributed and it can handle larger load by adding more nodes. photo by John TrainoronFlickr http://www.flickr.com/photos/trainor/2902023575/, Licensed under CC
  • 19. It is about trading off Isolation vs. Sharing As often the case in research, implementing Multi-tenancy is a tradeoff photo by Todd Anderson on Flickr, http://www.flickr.com/photos/toddography/12034661/, Licensed
  • 21. WSO2 Platform Architecture  We break multi-tenancy into three parts (Based on Chang et al.). Execution: Business Processes, Workflows and Mashups Security: ownership and authorization of both data, as well as executions in the framework Data : User data and system runtime data
  • 23. Achieving Tenant Isolation  Each Tenant is given a Security Domain  Each domain may have its own User Store and Permissions, thus have a set of users and permissions enabling users to access resources  Each domain is isolated and do not have access to other domains
  • 24. Implementing Data Multi-tenancy • Separate DB • Separate Schema • Shared Schema
  • 25. Separate Databases • If you have no control over the code, then this is the only solution Tenant 1 Tenant 4 Tenant 8 • Horizontally scalable, but relatively expensive • Vertical scaling is challenging but solvable • WSO2 Relational Storage Service uses this models to provide users with DBs 11/29/2011 25
  • 26. Separate Schema • Relatively easy to implement • Some databases have ways to support this directly but many don’t • Failure difficult to handle • Scales reasonably well 11/29/2011 26
  • 27. Shared Databases, Shared Schema • Most efficient storage- wise and scales very well for large number of tenants • Requires all accesses to qualify with tenant • Failure is global • (Stratos uses this approach internally for all provide isolation within WSO2 Registry) 11/29/2011 27
  • 28. Implementing Execution Isolation  All executions are based on Axis2  Axis2 have stateless executions and keep all state in a Context.  So if we create different context for each tenant, they are isolated.
  • 30. Implementing Execution Isolation (Contd.) • We use Java Security to make sure one tenant cannot access or temper with other tenant’s data structures, file system data etc. • Example • Tenant ID value in the context
  • 31. Performance Isolation • Performance isolation is a challenging issue. • We currently relay on monitoring and auditing where we can kill CPU hogging processes • We are exploring the possibility of changing the priority of CPU hogging processes in the work queues (e.g. workflow engine, ESB etc.). photo Fortes by on Flickr, http://www.fotopedia.com/items/flickr- 3193056200
  • 33. Scaling Multi-tenant Middleware • So far we talked about building a single Multi- tenant Node (That is Level 3) • To reach Level 4, we have to scale. • To do that • We have to run this with many nodes, and we have to partition. • We have to replicate or partition. But we are talking about 1000s of tenants, likely one tenant can not hold all of them. • So We need to partition • We also need load balancing, and it should know about tenants.
  • 34.
  • 37. Workflow Performance  Setup Multi-tenant and non-multi-tenant versions  Run 200 workflows from each client  Overhead is minimal o MT supports only add few additional lookups and checks o Java Security does not come in to play as we do not run user provided code.
  • 38. For more details (Publications on the topic) • A. Azeez and S. Perera et al., WSO2 Stratos: An Industrial Stack to Support Cloud Computing, IT: Methods and Applications of Informatics and Information Technology Journal, the special Issue on Cloud Computing, 2011. • AfkhamAzeez, Srinath Perera, DimuthuGamage, Ruwan Linton, PrabathSiriwardana, DimuthuLeelaratne, SanjivaWee rawarana, Paul Fremantle, "Multi-Tenant SOA Middleware for Cloud Computing" 3rd International Conference on Cloud Computing, Florida, 2010 • MilindaPathirage, Srinath Perera, SanjivaWeerawarana, Indika Kumara, A Multi- tenant Architecture for Business Process Execution, 9th International Conference on Web Services (ICWS), 2011
  • 39. Conclusion • We discussed what is Multi-tenancy and why it is crucial for implementing a PaaS. • We discussed details about implementing it • Isolation (Data, Execution) .. Isolation vs. sharing tradeoff • Four level’s of multi-tenancy • Scaling Design • Lot of open questions yet to be solved. Your thoughts and code both are welcome. • Data Security (Encryption, Delegation etc. ), Tenant Migration , Scaling, Lazy loading …