SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tod Golding, Partner Solutions Architect
November 2016
Architecting Next Generation
SaaS Applications on AWS
ARC 301
Where Does SaaS Fit?
Identity
Billing &
Metering
Management
& Monitoring
Analytics
Scale &
Availability
Storage
Partitioning
Continuous
Delivery
Agility
SaaS
Multi-Tenancy Patterns
Tenant Tenant
Tenant Tenant
Tenant TenantTenant
Tenant TenantTenant
Tenant TenantTenant
Silo Bridge Pool
Partitioning Tug of War
Silo Model Pool Model
• Compliance alignment
• Partitioned environments
• No cross-tenant impacts
• Tenant-specific tuning
• Tenant level availability
• Cost
• Agility compromised
• Management complexity
• Deployment challenges
• Analytics/metering aggregation
• Agility
• Cost optimization
• Centralized management
• Simplified deployment
• Analytics/metering aggregation
• Cross-tenant impacts
• Compliance challenges
• All or nothing availability
Pros
Cons
Pros
Cons
SaaS Reference Architecture Landscape
Identity
Tenant Isolation
Data Partitioning
Management&Monitoring
Profiling&Analytics
Metering,Billing&Tenant
Administration
Operational View
ApplicationView
Technical/Business Agility
SaaS Identity: Beyond the Front Door
Injecting Tenant
Context
Security &
Isolation
Tenant
Access
Tenant
Provisioning
On-Boarding a Tenant
New Tenant
On-Boarding
Tenant
Identity Broker
Identity
Provider
Tenant
Management
Billing
• User: bob@test.com
• TenantID: 491048735
• TenantID: 491048735
• Domain: abc.com
• Tier: Platinum
• Status: Active
Domain
Provisioning SSL
Certificate
Tenant
IAM Policy
User Identity + Tenant Identity = SaaS Identity
SaaS Identity Flow
Web
Application
Tenant
Identity Broker
Identity
Provider
Multi-Factor
Authentication
AWS Cloud
IAM Policy
UserID: bob@abc.com
TenantID: “93194942”
Role: “Admin”
IAM Policies Scope Tenant Access
Web Tier
App Tier
Tenant1 Access
Policy
CustomerTable
Tenant2 Access
Policy
T1-Bucket T2-Bucket
Applying Tenant Context
Tenant
Access Control
Homepage
Access Control
Catalog
Service
Access Control
Cart Service
TenantContext
{
UserID: “bob@abc.com”
Role: “Admin”,
TenantID: “93194942”
}
JWT Token
Authorization: Bearer<JWT>
Authorization: Bearer<JWT>
Authorization: Bearer<JWT>
Access Control
Auth ServiceTenant Service
SaaS Identity Considerations
• SaaS identity is bigger than authentication
• Leave the heavy lifting, risk, and innovation to someone
else
• Use identity broker pattern to decouple from identity
providers
• Automate role and policy provisioning/management
• Add tenant context to identity token to limit bottlenecks
• If your identity solution is invasive, you’re doing it wrong
Tenant Isolation
Layered Isolation
App Tier
Web Tier
App Tier
Full Stack Isolation Network Isolation
Full Stack Isolation
EC2 Full Stack Isolation
Container Isolation
Container
Instance
Container
Instance
Container
Instance
Container
Instance
Tenant 1 Tenant 2
Tenant 1
Web Tier
App Tier
Tenant 2
On-Boarding, Billing, Provisioning, Routing
Web Tier
App Tier
Account Isolation
Tenant 1 (AWS Account A) Tenant 2 (AWS Account B)
Auto Scaling Group
Web Server Web Server
Auto Scaling Group
App Server App Server
Availability Zone 1
Availability Zone 2
Region
Auto Scaling Group
Web Server Web Server
Auto Scaling Group
App Server App Server
Availability Zone 1
Availability Zone 2
Region
On-Boarding, Billing, Provisioning, Routing
Hybrid Isolation
Mix of single and multi-tenant models
Web Tier
App Tier
Tenant 1
Web Tier
App Tier
Tenant 2
Web Tier
Tenants 3 … N
(multi-tenant shared)
App Tier
• Build with pooled model in mind
• Unified on-boarding and billing
• Siloes are a standalone instance of
the pooled environment
• Avoid one-off customization
• Shared tooling and provisioning
• New features go to all tenants (agility)
Network Isolation
Web Tier
App Tier
Web Tier
App Tier
Tenant 1 Tenant 2
T2– App SubnetT1 – App Subnet
T2 – Web SubnetT1 – Web Subnet
VPC Partitioning Subnet Partitioning
Layered Tenant Isolation
Billing
Administration
On-Boarding
Tenant 1 Tenant 2
Web
App
Web
App
Route 53
Web Tier
App: Tenant 1 App: Tenant 2
Billing
Administration
On-Boarding Route 53
Web Tier
Billing
Administration
On-Boarding Route 53
AppTier
Serverless SaaS
REST API
Static web content
AWS Lambda Functions
Amazon
CloudFront
Storage Services
• Finer-grained mapping of tenant
consumption
• Simplifies scaling policies
• Improved fault tolerance model
• Better deployment agility
• Separates API management from
execution
Aligning with SaaS Tenets
Compute Partitioning Considerations
• Don’t assume isolation is required for all tenants
• Start with pooled and let isolation earn its way in
• Resist the temptation for one-off tenant customization
• Create an aggregate view of health and activity
• Adjust service limits when provisioning new tenants
• Use tags to identify tenant resources
• Limit the impact of partitioning on agility
Data Partitioning
Separate database
for each tenant
Tenant 1 Tenant 2
Storage Storage
Tenant 1
Tenant 2
Schema
Schema
Single database,
multiple schemas
Tenant Id Item Id
A93-9494 239
B38-3929 3434
Schema
Shared database,
single schema
The Hot Key Problem
Tenant Key Distribution
TenantID Shard
Tenant1 1
Tenant7 2
Tenant9 1
Tenant4 3
Shard1
Shard2
Shard3
Shard of Shards
Multi-Tenant RDS
Tenant 1
Instance
Tenant 2
Instance
Tenant 2
Tenant 1
Instance Per Tenant Table Per Tenant Multi-Tenant Tables
Tenant 1 84049-49 True
Tenant 2 82-84-949 False
Tenant 1 Bob Smith
Tenant 2 Lisa Johnson
Tables partitioned by tenant id
Multi-Tenant DynamoDB: Silo Model
Tenant1_Account Tenant1_CustomerIAM_Tenant1_Role
Tenant3_Account Tenant3_Customer
IAM_Tenant3_Role
Tenant2_Account Tenant2_Customer
IAM_Tenant2_Role
Multi-Tenant DynamoDB: Pool Model
Partition Key Attributes
TenantID
Tenant1
CustomerTable
{
ShardCount: 3,
ShardSize: [4, 9, 5],
ShardIds: [“93”, “932”, “21”]
}
AccountTable
{
ShardCount: 4,
ShardSize: [3, 4, 4, 5],
ShardIds: [“43”, “19”, “971”, “85”]
}
Partition Key Attributes
ShardID
93
CustomerID
4923000093
Name
Bob Jones
ShardID
932
CustomerID
9839839939
Name
Sally Smith
ShardID
932
CustomerID
4394992099
Name
Mary Young
Partition Key Attributes
ShardID
43
AccountID
739193984
Status
Active
ShardID
43
AccountID
113948390
Status
Active
ShardID
19
AccountID
732933209
Status
Inactive
CustomerTable
AccountTable
TenantLookup
Real-Time Optimization: Dynamic DynamoDB
• Dynamic configuration of PIOPS
• Aligns storage throughput with
real-time tenant load
• Optimizes tenant costs
• Improves tenant experience
Average consumed write capacity
Provisioned write capacity
Minimizing Tenant Awareness
Service Authorization (RBAC)
Your Service Code
Data Access
ServiceLifecycle
(config,bootstrap,discovery)
Logging Analytics
Tenant
Configuration
Metrics
System
Configuration
• Abstracting away tenant awareness & policies
• Maximizing developer productivity
Management & Monitoring
S3
CloudWatch
AWS Config
CloudTrailTenantContext
Splunk
Sumologic
Kibana
• Create custom views that aggregate
and summarize cross-tenant activity
• Proactively identify cross-tenant issues
• Introduce cross tenant policies
Application Services
Catalog
Service
Cart
Service
Ratings
Service
Tax
Service
Capturing Tenant Level Metrics
Application Flows
Service Activity
Storage Activity
Scaling Activity
…
Tenant-Level Metrics
Order Service Cart Service
Tenant-centric Dashboard
• Use system and tenant level metrics to drive optimization
• Must attribute resource consumption to individual tenants
Tenant1: Catalog search
Tenant4: Ship order
Tenant2: Cart update IOPS
Tenant7: Ship order
CloudWatch
Takeaways
• Always have an eye on agility
• Third-party solutions free you up to focus on innovation
• Weigh business and technical merits when selecting a
partitioning scheme
• Isolation must be enforced through policies
• Storage must consider impact of tenant data distribution
• Tenant aware monitoring is essential to SaaS agility
• Metering and metrics will drive the evolution and
optimization of your SaaS architecture model
Thank you!
Remember to complete
your evaluations!
Related Sessions
ARC408 - Optimizing SaaS Solutions for AWS
ARC304 - Effective Application Data Analytics for Modern Applications
ARC310 - Cost Optimizing Your Architecture: Practical Design Steps
For Big Savings
ARC402 - Serverless Architectural Patterns and Best Practices

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (19)

AWS re:Invent 2016: Building the Future of DevOps with Amazon Web Services (D...
AWS re:Invent 2016: Building the Future of DevOps with Amazon Web Services (D...AWS re:Invent 2016: Building the Future of DevOps with Amazon Web Services (D...
AWS re:Invent 2016: Building the Future of DevOps with Amazon Web Services (D...
 
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
AWS re:Invent 2016: Running Batch Jobs on Amazon ECS (CON310)
 
AWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar SeriesAWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar Series
 
AWS re:Invent 2016: Getting Started with Docker on AWS (CMP209)
AWS re:Invent 2016: Getting Started with Docker on AWS (CMP209)AWS re:Invent 2016: Getting Started with Docker on AWS (CMP209)
AWS re:Invent 2016: Getting Started with Docker on AWS (CMP209)
 
AWS January 2016 Webinar Series - Introduction to Docker on AWS
AWS January 2016 Webinar Series - Introduction to Docker on AWSAWS January 2016 Webinar Series - Introduction to Docker on AWS
AWS January 2016 Webinar Series - Introduction to Docker on AWS
 
AWS re:Invent 2016: Simplifying Microsoft Architectures with AWS services (WI...
AWS re:Invent 2016: Simplifying Microsoft Architectures with AWS services (WI...AWS re:Invent 2016: Simplifying Microsoft Architectures with AWS services (WI...
AWS re:Invent 2016: Simplifying Microsoft Architectures with AWS services (WI...
 
AWS re:Invent 2016: Creating Your Virtual Data Center: VPC Fundamentals and C...
AWS re:Invent 2016: Creating Your Virtual Data Center: VPC Fundamentals and C...AWS re:Invent 2016: Creating Your Virtual Data Center: VPC Fundamentals and C...
AWS re:Invent 2016: Creating Your Virtual Data Center: VPC Fundamentals and C...
 
AWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the CloudAWS Lambda: Event-driven Code for Devices and the Cloud
AWS Lambda: Event-driven Code for Devices and the Cloud
 
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
 
Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...
Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...
Deep Dive on Microservices and Amazon ECS by Raul Frias, Solutions Architect,...
 
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWSAWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
AWS January 2016 Webinar Series - Introduction to Deploying Applications on AWS
 
Managing Your Infrastructure as Code
Managing Your Infrastructure as CodeManaging Your Infrastructure as Code
Managing Your Infrastructure as Code
 
AWS re:Invent 2016: State of the Union: Containers (CON316)
AWS re:Invent 2016: State of the Union:  Containers (CON316)AWS re:Invent 2016: State of the Union:  Containers (CON316)
AWS re:Invent 2016: State of the Union: Containers (CON316)
 
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
AWS re:Invent 2016: Infrastructure Continuous Delivery Using AWS CloudFormati...
 
AWS re:Invent 2016: How to Scale and Operate Elasticsearch on AWS (DEV307)
AWS re:Invent 2016: How to Scale and Operate Elasticsearch on AWS (DEV307)AWS re:Invent 2016: How to Scale and Operate Elasticsearch on AWS (DEV307)
AWS re:Invent 2016: How to Scale and Operate Elasticsearch on AWS (DEV307)
 
AWS re:Invent 2016: Automated DevOps and Continuous Delivery (DEV211)
AWS re:Invent 2016: Automated DevOps and Continuous Delivery (DEV211)AWS re:Invent 2016: Automated DevOps and Continuous Delivery (DEV211)
AWS re:Invent 2016: Automated DevOps and Continuous Delivery (DEV211)
 
AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...
AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...
AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...
 
AWS Batch: Simplifying Batch Computing in the Cloud
AWS Batch: Simplifying Batch Computing in the CloudAWS Batch: Simplifying Batch Computing in the Cloud
AWS Batch: Simplifying Batch Computing in the Cloud
 
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

AWS re:Invent 2016: Architecting Next Generation SaaS Applications on AWS (ARC301)

  • 1. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Tod Golding, Partner Solutions Architect November 2016 Architecting Next Generation SaaS Applications on AWS ARC 301
  • 2. Where Does SaaS Fit? Identity Billing & Metering Management & Monitoring Analytics Scale & Availability Storage Partitioning Continuous Delivery Agility SaaS
  • 3. Multi-Tenancy Patterns Tenant Tenant Tenant Tenant Tenant TenantTenant Tenant TenantTenant Tenant TenantTenant Silo Bridge Pool
  • 4. Partitioning Tug of War Silo Model Pool Model • Compliance alignment • Partitioned environments • No cross-tenant impacts • Tenant-specific tuning • Tenant level availability • Cost • Agility compromised • Management complexity • Deployment challenges • Analytics/metering aggregation • Agility • Cost optimization • Centralized management • Simplified deployment • Analytics/metering aggregation • Cross-tenant impacts • Compliance challenges • All or nothing availability Pros Cons Pros Cons
  • 5. SaaS Reference Architecture Landscape Identity Tenant Isolation Data Partitioning Management&Monitoring Profiling&Analytics Metering,Billing&Tenant Administration Operational View ApplicationView Technical/Business Agility
  • 6. SaaS Identity: Beyond the Front Door Injecting Tenant Context Security & Isolation Tenant Access Tenant Provisioning
  • 7. On-Boarding a Tenant New Tenant On-Boarding Tenant Identity Broker Identity Provider Tenant Management Billing • User: bob@test.com • TenantID: 491048735 • TenantID: 491048735 • Domain: abc.com • Tier: Platinum • Status: Active Domain Provisioning SSL Certificate Tenant IAM Policy User Identity + Tenant Identity = SaaS Identity
  • 8. SaaS Identity Flow Web Application Tenant Identity Broker Identity Provider Multi-Factor Authentication AWS Cloud IAM Policy UserID: bob@abc.com TenantID: “93194942” Role: “Admin”
  • 9. IAM Policies Scope Tenant Access Web Tier App Tier Tenant1 Access Policy CustomerTable Tenant2 Access Policy T1-Bucket T2-Bucket
  • 10. Applying Tenant Context Tenant Access Control Homepage Access Control Catalog Service Access Control Cart Service TenantContext { UserID: “bob@abc.com” Role: “Admin”, TenantID: “93194942” } JWT Token Authorization: Bearer<JWT> Authorization: Bearer<JWT> Authorization: Bearer<JWT> Access Control Auth ServiceTenant Service
  • 11. SaaS Identity Considerations • SaaS identity is bigger than authentication • Leave the heavy lifting, risk, and innovation to someone else • Use identity broker pattern to decouple from identity providers • Automate role and policy provisioning/management • Add tenant context to identity token to limit bottlenecks • If your identity solution is invasive, you’re doing it wrong
  • 12. Tenant Isolation Layered Isolation App Tier Web Tier App Tier Full Stack Isolation Network Isolation
  • 13. Full Stack Isolation EC2 Full Stack Isolation Container Isolation Container Instance Container Instance Container Instance Container Instance Tenant 1 Tenant 2 Tenant 1 Web Tier App Tier Tenant 2 On-Boarding, Billing, Provisioning, Routing Web Tier App Tier
  • 14. Account Isolation Tenant 1 (AWS Account A) Tenant 2 (AWS Account B) Auto Scaling Group Web Server Web Server Auto Scaling Group App Server App Server Availability Zone 1 Availability Zone 2 Region Auto Scaling Group Web Server Web Server Auto Scaling Group App Server App Server Availability Zone 1 Availability Zone 2 Region On-Boarding, Billing, Provisioning, Routing
  • 15. Hybrid Isolation Mix of single and multi-tenant models Web Tier App Tier Tenant 1 Web Tier App Tier Tenant 2 Web Tier Tenants 3 … N (multi-tenant shared) App Tier • Build with pooled model in mind • Unified on-boarding and billing • Siloes are a standalone instance of the pooled environment • Avoid one-off customization • Shared tooling and provisioning • New features go to all tenants (agility)
  • 16. Network Isolation Web Tier App Tier Web Tier App Tier Tenant 1 Tenant 2 T2– App SubnetT1 – App Subnet T2 – Web SubnetT1 – Web Subnet VPC Partitioning Subnet Partitioning
  • 17. Layered Tenant Isolation Billing Administration On-Boarding Tenant 1 Tenant 2 Web App Web App Route 53 Web Tier App: Tenant 1 App: Tenant 2 Billing Administration On-Boarding Route 53 Web Tier Billing Administration On-Boarding Route 53 AppTier
  • 18. Serverless SaaS REST API Static web content AWS Lambda Functions Amazon CloudFront Storage Services • Finer-grained mapping of tenant consumption • Simplifies scaling policies • Improved fault tolerance model • Better deployment agility • Separates API management from execution Aligning with SaaS Tenets
  • 19. Compute Partitioning Considerations • Don’t assume isolation is required for all tenants • Start with pooled and let isolation earn its way in • Resist the temptation for one-off tenant customization • Create an aggregate view of health and activity • Adjust service limits when provisioning new tenants • Use tags to identify tenant resources • Limit the impact of partitioning on agility
  • 20. Data Partitioning Separate database for each tenant Tenant 1 Tenant 2 Storage Storage Tenant 1 Tenant 2 Schema Schema Single database, multiple schemas Tenant Id Item Id A93-9494 239 B38-3929 3434 Schema Shared database, single schema
  • 21. The Hot Key Problem Tenant Key Distribution TenantID Shard Tenant1 1 Tenant7 2 Tenant9 1 Tenant4 3 Shard1 Shard2 Shard3 Shard of Shards
  • 22. Multi-Tenant RDS Tenant 1 Instance Tenant 2 Instance Tenant 2 Tenant 1 Instance Per Tenant Table Per Tenant Multi-Tenant Tables Tenant 1 84049-49 True Tenant 2 82-84-949 False Tenant 1 Bob Smith Tenant 2 Lisa Johnson Tables partitioned by tenant id
  • 23. Multi-Tenant DynamoDB: Silo Model Tenant1_Account Tenant1_CustomerIAM_Tenant1_Role Tenant3_Account Tenant3_Customer IAM_Tenant3_Role Tenant2_Account Tenant2_Customer IAM_Tenant2_Role
  • 24. Multi-Tenant DynamoDB: Pool Model Partition Key Attributes TenantID Tenant1 CustomerTable { ShardCount: 3, ShardSize: [4, 9, 5], ShardIds: [“93”, “932”, “21”] } AccountTable { ShardCount: 4, ShardSize: [3, 4, 4, 5], ShardIds: [“43”, “19”, “971”, “85”] } Partition Key Attributes ShardID 93 CustomerID 4923000093 Name Bob Jones ShardID 932 CustomerID 9839839939 Name Sally Smith ShardID 932 CustomerID 4394992099 Name Mary Young Partition Key Attributes ShardID 43 AccountID 739193984 Status Active ShardID 43 AccountID 113948390 Status Active ShardID 19 AccountID 732933209 Status Inactive CustomerTable AccountTable TenantLookup
  • 25. Real-Time Optimization: Dynamic DynamoDB • Dynamic configuration of PIOPS • Aligns storage throughput with real-time tenant load • Optimizes tenant costs • Improves tenant experience Average consumed write capacity Provisioned write capacity
  • 26. Minimizing Tenant Awareness Service Authorization (RBAC) Your Service Code Data Access ServiceLifecycle (config,bootstrap,discovery) Logging Analytics Tenant Configuration Metrics System Configuration • Abstracting away tenant awareness & policies • Maximizing developer productivity
  • 27. Management & Monitoring S3 CloudWatch AWS Config CloudTrailTenantContext Splunk Sumologic Kibana • Create custom views that aggregate and summarize cross-tenant activity • Proactively identify cross-tenant issues • Introduce cross tenant policies Application Services Catalog Service Cart Service Ratings Service Tax Service
  • 28. Capturing Tenant Level Metrics Application Flows Service Activity Storage Activity Scaling Activity … Tenant-Level Metrics Order Service Cart Service Tenant-centric Dashboard • Use system and tenant level metrics to drive optimization • Must attribute resource consumption to individual tenants Tenant1: Catalog search Tenant4: Ship order Tenant2: Cart update IOPS Tenant7: Ship order CloudWatch
  • 29. Takeaways • Always have an eye on agility • Third-party solutions free you up to focus on innovation • Weigh business and technical merits when selecting a partitioning scheme • Isolation must be enforced through policies • Storage must consider impact of tenant data distribution • Tenant aware monitoring is essential to SaaS agility • Metering and metrics will drive the evolution and optimization of your SaaS architecture model
  • 32. Related Sessions ARC408 - Optimizing SaaS Solutions for AWS ARC304 - Effective Application Data Analytics for Modern Applications ARC310 - Cost Optimizing Your Architecture: Practical Design Steps For Big Savings ARC402 - Serverless Architectural Patterns and Best Practices