SlideShare a Scribd company logo
1 of 20
Download to read offline
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Migrating Single-Tenant
Applications to Multi-Tenant SaaS
Judah Bernstein
Partner Solutions Architect
AWS Partner Program
A R C 3 2 6
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The Monolith
Client
Browser
• User Interface
• Accounting
• Products
• Orders
• Inventory
• Shipping
• Delivery
• Billing
App server
(Tomcat)
Web server
(Apache)
Database
(Oracle)
Logging
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Multi-tenant migration strategies
New product
Develop a
Greenfield AWS
Cloud-Native Multi-
Tenant SaaS
Solution with best
practices.
Layered
Migrate incrementally
to Multi-Tenancy
layer by layer, service
by service, or
component by
component
methodically.
Optimize
Improving an existing
solution to obtain the
benefits of multi-tenancy
while introducing
minimal changes to the
existing codebase and
architecture.
Full redesign
Big-bang re-write of
platform, business
logic, and interface
to deliver like-new
cloud-integrated
multi-tenant
solution.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
An incremental journey: Phase 1
Onboard customers
• Registration
• Auto Sign-up
• Provision
Tenant
• Introduce
Tenant Context
• Bind Tenant to
User
• Inject Tenant
Context
Optimize compute
• Distribute AZ’s
• Externalize
State
• Auto-Scaling
Groups
• Optimize
Scaling Policies
Identify tenant
• Introduce
Tenant Logging
• Extract Tenant
Context
• Isolate Tenant
Data
• Develop Tenant
Monitoring
• Enhance Tooling
Partitioning tenants
• Partition
Storage, or
Database
• Partition Library
• Connection
Pooling
• Resolve Tenant
Mapping
• Pool Compute
Meter and bill
• Choose
Pricing/Billing
Model
• Instrument
Telemetry
• Aggregate
Consumption
• Integrate Billing
Provider
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing tenant context
User context
Tenant context
• Tenant ID
• Company name
• Status
• Billing tier
SaaS
identity
• Sub
• Email
• Name
SAML
headers
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tenant isolation motivation
Tiering
strategy
Noisy neighbor Cross tenant
access
Compliance
requirements
Legacy
architecture
Opportunity
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ContainersCompute Instances
Network
Storage
VPC Subnet
AZ A
Subnet 1
AZ B
Subnet 2
Security
group
Security
group
Account
Database
Tiers
Schema Table
Serverless
Overlay
Records
Multi-tenant infrastructure design
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring and logging a multi-tenant app
Tenant activityUnified view
Tenant activityPod sanity
Tech + Bus KPI Tier performance
Isolation eventsCustom attributes
LoggingMonitoring
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Integrating metering and billing
SaaS
Billing
provider
Merchant
account
Service
handles
request & meters
2 Creates
secure
card transaction
5
Authorize
transaction
and payment
3 Subscription
processing
logic4
Authorize
transaction
and payment
6
Customer
Customer
subscribes to
service
1
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Minimally invasive multi-tenancy with tenant context
AWS
Lambda
function
Amazon
Route 53
Amazon
CloudFront
Tenant 1
ENT
RDS
ASGElastic Load
Balancing*
ASGElastic Load
Balancing*
Tenant 3
Tenant 2
SMB
ServiceMeshServiceMesh
Tenant3Tenant2
Amazon
EKS
Amazon
EKS
Tenant3
Tenant3 Tenant2
Tenant2
Application
Load Balancer
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
An incremental journey: Phase 2
Improve agility
• Decompose services
• Scale datastores
• Select service
storage profile
(silo/pooled)
• Breathe DevOps (CD,
IaC, DevSecOps)
• Data ownership
Optimize security
• Isolate every layer
• Tie RBAC to AWS
Identity and Access
Management (IAM)
• Federate STS
Credentials
• Encryption and data
masking
• Minimize impact
Enhance analytics
• Enable detailed
Metering
• Surface detailed
analytics
• Associate cost per
tenant
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Decomposing the monolith into MicroServices
Bounded ContextContract
Consistency
A formal, precise and
verifiable interface
specification for clients to
interact with a service.
An approach to define the
boundaries of a complex
domain into business
context.
All storage clients see the
same data with concurrent
updates.
Versioning
An approach to evolving an
API to accommodate for
changes, additions, and
removals while preserving
the client interface.
Authorization
Verifying and providing the
client or user access to
resources, features, and/or
functionality.
Authentication
Identification and verification
of client or user, generally
involves verifying credentials
or a token.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Selecting the tenant service storage profile
Multi-source &
multi-master
Database, schema,
table per tenant
Read replication
& sharding
NoSQL, schema-less,
& eventual consistency
Encryption key per
tenant
Dependency injection,
filters, interceptors, cut
points
First, second
level caching
Performance Security
Row or policy-based
isolation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Resolving tenant based authorization
Trust
Access
Role-based access control
Entity, System, or user which
is granted the access.
Actions which may be
requested on corresponding
resources.
Federation
Variation
Multi-tenant access control
Managing authorized and
unauthorized cross-tenant
access.
Tenant specific authorization
configuration may vary per
tenant in a SaaS solution.
Trust entity flexibility
Access policy generation
Cross-account access
Tenant specific encryption
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Minimizing the impact of a multi-tenant design
Throttling Tiering
Blocking Prioritizing Dedicating
SecuringIsolating
Self-healing
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A refactored multi-tenant architecture design
Amazon
CloudFront
Application
Load Balancer
Amazon
EKS
Amazon
EKS
Amazon
Route 53
Service1 Service2
Amazon API
Gateway
Lambda Service
/service3
Lambda
authorizer
Lambda Service
/service4
Prefix
S3
/Tenant1
/Tenant2
/Tenant3
Tag
Tenant: 1
Tenant: 2
Tenant: 3
Service1 Service2
Table
Amazon DynamoDB
Tenant1
Tenant2
Tenant3
Hash
Tenant: 1
Tenant: 2
Tenant: 3
Static
Website
ShardMap
Shard1: 1, 2
Shard2: 3
Aurora
Postgres
V9.5
Row Level
Amazon
Cognito
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Learn more and next steps
• Learn more about SaaS on AWS
• https://aws.amazon.com/partners/saas-on-aws/#why
• Explore AWS SaaS factory content
• https://aws.amazon.com/partners/saas-factory/
• Sign up for the AWS SaaS interest list
• http://go.awspartner.com/saas
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Judah Bernstein
judahb@amazon.com
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

What's hot

Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Simplilearn
 

What's hot (20)

Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)Amazon Relational Database Service (Amazon RDS)
Amazon Relational Database Service (Amazon RDS)
 
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
 
Building an open data platform with apache iceberg
Building an open data platform with apache icebergBuilding an open data platform with apache iceberg
Building an open data platform with apache iceberg
 
AWS Big Data Platform
AWS Big Data PlatformAWS Big Data Platform
AWS Big Data Platform
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
Securing Hadoop with Apache Ranger
Securing Hadoop with Apache RangerSecuring Hadoop with Apache Ranger
Securing Hadoop with Apache Ranger
 
SeaweedFS introduction
SeaweedFS introductionSeaweedFS introduction
SeaweedFS introduction
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
 
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
Improving fault tolerance and scaling out in Kafka Streams with Bill Bejeck |...
 
Grafana introduction
Grafana introductionGrafana introduction
Grafana introduction
 
How to Choose The Right Database on AWS - Berlin Summit - 2019
How to Choose The Right Database on AWS - Berlin Summit - 2019How to Choose The Right Database on AWS - Berlin Summit - 2019
How to Choose The Right Database on AWS - Berlin Summit - 2019
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark Meetup
 
Introduction to Amazon DynamoDB
Introduction to Amazon DynamoDBIntroduction to Amazon DynamoDB
Introduction to Amazon DynamoDB
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Cloud arch patterns
Cloud arch patternsCloud arch patterns
Cloud arch patterns
 
Encryption and Key Management in AWS
Encryption and Key Management in AWSEncryption and Key Management in AWS
Encryption and Key Management in AWS
 
ORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big DataORC File - Optimizing Your Big Data
ORC File - Optimizing Your Big Data
 
Introduction to AWS Glue
Introduction to AWS Glue Introduction to AWS Glue
Introduction to AWS Glue
 
A visual introduction to Apache Kafka
A visual introduction to Apache KafkaA visual introduction to Apache Kafka
A visual introduction to Apache Kafka
 

Similar to Migrating Single-Tenant Applications to Multi-Tenant SaaS (ARC326-R1) - AWS re:Invent 2018

Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Amazon Web Services
 

Similar to Migrating Single-Tenant Applications to Multi-Tenant SaaS (ARC326-R1) - AWS re:Invent 2018 (20)

Deep Dive into AWS X-Ray: Monitor Modern Applications (DEV324) - AWS re:Inven...
Deep Dive into AWS X-Ray: Monitor Modern Applications (DEV324) - AWS re:Inven...Deep Dive into AWS X-Ray: Monitor Modern Applications (DEV324) - AWS re:Inven...
Deep Dive into AWS X-Ray: Monitor Modern Applications (DEV324) - AWS re:Inven...
 
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
 
A New Approach to Continuous Monitoring in the Cloud: Migrate to AWS with NET...
A New Approach to Continuous Monitoring in the Cloud: Migrate to AWS with NET...A New Approach to Continuous Monitoring in the Cloud: Migrate to AWS with NET...
A New Approach to Continuous Monitoring in the Cloud: Migrate to AWS with NET...
 
SaaS Reference Architectures: Review of Real-World Patterns & Strategies (GPS...
SaaS Reference Architectures: Review of Real-World Patterns & Strategies (GPS...SaaS Reference Architectures: Review of Real-World Patterns & Strategies (GPS...
SaaS Reference Architectures: Review of Real-World Patterns & Strategies (GPS...
 
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
 
[NEW LAUNCH!] Introducing AWS App Mesh – service mesh on AWS (CON367) - AWS r...
[NEW LAUNCH!] Introducing AWS App Mesh – service mesh on AWS (CON367) - AWS r...[NEW LAUNCH!] Introducing AWS App Mesh – service mesh on AWS (CON367) - AWS r...
[NEW LAUNCH!] Introducing AWS App Mesh – service mesh on AWS (CON367) - AWS r...
 
Serverless on AWS: Architectural Patterns and Best Practices
Serverless on AWS: Architectural Patterns and Best PracticesServerless on AWS: Architectural Patterns and Best Practices
Serverless on AWS: Architectural Patterns and Best Practices
 
SaaS Operations: The Foundation of SaaS Agility (ARC216) - AWS re:Invent 2018
SaaS Operations: The Foundation of SaaS Agility (ARC216) - AWS re:Invent 2018SaaS Operations: The Foundation of SaaS Agility (ARC216) - AWS re:Invent 2018
SaaS Operations: The Foundation of SaaS Agility (ARC216) - AWS re:Invent 2018
 
Building Massively Parallel Event-Driven Architectures (SRV373-R1) - AWS re:I...
Building Massively Parallel Event-Driven Architectures (SRV373-R1) - AWS re:I...Building Massively Parallel Event-Driven Architectures (SRV373-R1) - AWS re:I...
Building Massively Parallel Event-Driven Architectures (SRV373-R1) - AWS re:I...
 
Breaking Down the 'Monowhat'
Breaking Down the 'Monowhat'Breaking Down the 'Monowhat'
Breaking Down the 'Monowhat'
 
How can your business benefit from going Serverless
How can your business benefit from going ServerlessHow can your business benefit from going Serverless
How can your business benefit from going Serverless
 
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
 
Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...
Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...
Hands-on SaaS: Constructing a Multi-Tenant Solution on AWS (ARC327-R1) - AWS ...
 
How can your business benefit from going serverless?
How can your business benefit from going serverless?How can your business benefit from going serverless?
How can your business benefit from going serverless?
 
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
Enabling Your Organization’s Amazon Redshift Adoption – Going from Zero to He...
 
Virtual AWSome Day October 2018 - Amazon Web Services
Virtual AWSome Day October 2018 - Amazon Web ServicesVirtual AWSome Day October 2018 - Amazon Web Services
Virtual AWSome Day October 2018 - Amazon Web Services
 
Implementing Governance@Scale
Implementing Governance@ScaleImplementing Governance@Scale
Implementing Governance@Scale
 
Enabling a Digital Platform with Microservices Architecture (ARC218-S) - AWS ...
Enabling a Digital Platform with Microservices Architecture (ARC218-S) - AWS ...Enabling a Digital Platform with Microservices Architecture (ARC218-S) - AWS ...
Enabling a Digital Platform with Microservices Architecture (ARC218-S) - AWS ...
 
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
Getting Started with Serverless Architectures with Microservices_AWSPSSummit_...
 
When, how and if to adopt Microservices, AWS Startup Day Cape Town 2018
When, how and if to adopt Microservices, AWS Startup Day Cape Town 2018When, how and if to adopt Microservices, AWS Startup Day Cape Town 2018
When, how and if to adopt Microservices, AWS Startup Day Cape Town 2018
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Migrating Single-Tenant Applications to Multi-Tenant SaaS (ARC326-R1) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Migrating Single-Tenant Applications to Multi-Tenant SaaS Judah Bernstein Partner Solutions Architect AWS Partner Program A R C 3 2 6
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. The Monolith Client Browser • User Interface • Accounting • Products • Orders • Inventory • Shipping • Delivery • Billing App server (Tomcat) Web server (Apache) Database (Oracle) Logging
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Multi-tenant migration strategies New product Develop a Greenfield AWS Cloud-Native Multi- Tenant SaaS Solution with best practices. Layered Migrate incrementally to Multi-Tenancy layer by layer, service by service, or component by component methodically. Optimize Improving an existing solution to obtain the benefits of multi-tenancy while introducing minimal changes to the existing codebase and architecture. Full redesign Big-bang re-write of platform, business logic, and interface to deliver like-new cloud-integrated multi-tenant solution.
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. An incremental journey: Phase 1 Onboard customers • Registration • Auto Sign-up • Provision Tenant • Introduce Tenant Context • Bind Tenant to User • Inject Tenant Context Optimize compute • Distribute AZ’s • Externalize State • Auto-Scaling Groups • Optimize Scaling Policies Identify tenant • Introduce Tenant Logging • Extract Tenant Context • Isolate Tenant Data • Develop Tenant Monitoring • Enhance Tooling Partitioning tenants • Partition Storage, or Database • Partition Library • Connection Pooling • Resolve Tenant Mapping • Pool Compute Meter and bill • Choose Pricing/Billing Model • Instrument Telemetry • Aggregate Consumption • Integrate Billing Provider
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Introducing tenant context User context Tenant context • Tenant ID • Company name • Status • Billing tier SaaS identity • Sub • Email • Name SAML headers
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tenant isolation motivation Tiering strategy Noisy neighbor Cross tenant access Compliance requirements Legacy architecture Opportunity
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. ContainersCompute Instances Network Storage VPC Subnet AZ A Subnet 1 AZ B Subnet 2 Security group Security group Account Database Tiers Schema Table Serverless Overlay Records Multi-tenant infrastructure design
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring and logging a multi-tenant app Tenant activityUnified view Tenant activityPod sanity Tech + Bus KPI Tier performance Isolation eventsCustom attributes LoggingMonitoring
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Integrating metering and billing SaaS Billing provider Merchant account Service handles request & meters 2 Creates secure card transaction 5 Authorize transaction and payment 3 Subscription processing logic4 Authorize transaction and payment 6 Customer Customer subscribes to service 1
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Minimally invasive multi-tenancy with tenant context AWS Lambda function Amazon Route 53 Amazon CloudFront Tenant 1 ENT RDS ASGElastic Load Balancing* ASGElastic Load Balancing* Tenant 3 Tenant 2 SMB ServiceMeshServiceMesh Tenant3Tenant2 Amazon EKS Amazon EKS Tenant3 Tenant3 Tenant2 Tenant2 Application Load Balancer
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. An incremental journey: Phase 2 Improve agility • Decompose services • Scale datastores • Select service storage profile (silo/pooled) • Breathe DevOps (CD, IaC, DevSecOps) • Data ownership Optimize security • Isolate every layer • Tie RBAC to AWS Identity and Access Management (IAM) • Federate STS Credentials • Encryption and data masking • Minimize impact Enhance analytics • Enable detailed Metering • Surface detailed analytics • Associate cost per tenant
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Decomposing the monolith into MicroServices Bounded ContextContract Consistency A formal, precise and verifiable interface specification for clients to interact with a service. An approach to define the boundaries of a complex domain into business context. All storage clients see the same data with concurrent updates. Versioning An approach to evolving an API to accommodate for changes, additions, and removals while preserving the client interface. Authorization Verifying and providing the client or user access to resources, features, and/or functionality. Authentication Identification and verification of client or user, generally involves verifying credentials or a token.
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Selecting the tenant service storage profile Multi-source & multi-master Database, schema, table per tenant Read replication & sharding NoSQL, schema-less, & eventual consistency Encryption key per tenant Dependency injection, filters, interceptors, cut points First, second level caching Performance Security Row or policy-based isolation
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Resolving tenant based authorization Trust Access Role-based access control Entity, System, or user which is granted the access. Actions which may be requested on corresponding resources. Federation Variation Multi-tenant access control Managing authorized and unauthorized cross-tenant access. Tenant specific authorization configuration may vary per tenant in a SaaS solution. Trust entity flexibility Access policy generation Cross-account access Tenant specific encryption
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Minimizing the impact of a multi-tenant design Throttling Tiering Blocking Prioritizing Dedicating SecuringIsolating Self-healing
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. A refactored multi-tenant architecture design Amazon CloudFront Application Load Balancer Amazon EKS Amazon EKS Amazon Route 53 Service1 Service2 Amazon API Gateway Lambda Service /service3 Lambda authorizer Lambda Service /service4 Prefix S3 /Tenant1 /Tenant2 /Tenant3 Tag Tenant: 1 Tenant: 2 Tenant: 3 Service1 Service2 Table Amazon DynamoDB Tenant1 Tenant2 Tenant3 Hash Tenant: 1 Tenant: 2 Tenant: 3 Static Website ShardMap Shard1: 1, 2 Shard2: 3 Aurora Postgres V9.5 Row Level Amazon Cognito
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Learn more and next steps • Learn more about SaaS on AWS • https://aws.amazon.com/partners/saas-on-aws/#why • Explore AWS SaaS factory content • https://aws.amazon.com/partners/saas-factory/ • Sign up for the AWS SaaS interest list • http://go.awspartner.com/saas
  • 19. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Judah Bernstein judahb@amazon.com
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.