Upload
darlene-norah-reynolds
View
240
Download
0
Tags:
Embed Size (px)
Citation preview
2-678
Building Highly Scalable and Available SaaS Applications with Azure SQL Database
Bill Gibson,Principal Program Manager
Torsten Grabs,Principal Program Manager
Azure SQL Database from 40,000 feet
SaaS applications on SQL Database
Developing and managing large groups of databases
Handling unpredictable workloads
Topics
Built for SaaS and enterprise applications Elastic database model for unpredictable
workloads 99.99% availability with global reach Geo-replication and restore services for
data protection Secure, protected, compliant Fully compatible with SQL Server 2014
databases Easy development, simple self-service
management
Azure SQL Database
DB
DB
DB
DB
DB
PREVIEW
Global, fully managed database-as-a-service built on SQL with near zero administration
Database Service Tiers
Basic Standard Premium
Light transactional workloads
Go-to option for most business applications
High throughput and business-critical
databases
Intended Use
99.99%*Availability
• •• •••Performance
Fully compatible with SQL Server 2014 databasesProgrammingSurface
Isolated databases and elastic database poolsWorkload Elasticity
*The 99.99% availability SLA does not apply to Web and Business editions, which continue to be supported at 99.9% availability.
Demo: Wingtip Tickets SaaS Application
Data isolation, privacy, protection
Scaling to unlimited customers
Unpredictable usage
(Data-intensive) SaaS applications
SaaS provider
customer
end-user
Database independence, isolation simplifies development and management
Security, auditing, monitoring Lifecycle and capacity management Oops recovery Schema unchanged by scale
SQL Database tools and experiences Cross-database query for reporting,
integration Multi-database job execution for
maintenance Visual Studio data tools, SSMS, Azure
portal Familiar programming experiences
SaaS on Azure SQL Database
Database-per-customer
model leverages
SQL Database strengths
Catalog
Cust 1 Cust 2
Cloud ServiceScalable cloud service,
load balanced in normal use
Customer DatabasesScale out data tier by adding additional customer databases
Customer Catalog
Cust 3 Cust N
Wingtip Tickets SaaS Application Architecture
Catalog database holds mapping to customer databases
Catalog
Cust 1 Cust 2
Cloud Service
2. Cloud service looks up customer in catalog
Customer Databases
3. Cloud service routes directly to customer database
Customer Catalog
1. End users connect to cloud service
Cust 3 Cust N
Challenge: Data-Dependent Routing
Multi-database management Define the set of databases that is the
data tier of your application Map customers (tenants) to databases
Data-dependent routing Route incoming requests to the correct
database Ensure correct routing if databases move Cache routing information
Elastic database development and management
Generally Available now Easily accessible download from NuGet
Elastic Database
Tooling
Demo: Scale out, adding a customer
Catalog
Cust 1 Cust 2
Cloud Service
Customer Databases
Customer Catalog
Cust 3 Cust N
Challenge: Predictable Performance Levels
Database performance and throughput
Compute
Wri
tes Read
s
Memory
DTUdatabase
throughput unit
0 0 0
DTUs
2341
Challenge: Predictable Performance Levels• Basic, Standard, and Premium provide increasing
performance levels• Scale via portal, PS, REST APIs, or T-SQL to reflect actual or
anticipated demand• Database remains online while scaling• Hourly billing provides cost efficiency
5 10 20 50 100 250 1000DTUs
B S0 S1S2
S3
P2
P3
P1
125
Challenge: Predictable Performance Variations• Basic, Standard, and Premium provide increasing
performance levels• Scale via portal, PS, REST APIs, or T-SQL to reflect actual or
anticipated demand• Database remains online while scaling• Hourly billing provides cost efficiency
5 10 20 50 100 250 1000DTUs
B S0 S1S2
S3
P2
P3
P1
125
ALTER DATABASE JacarandaJazzCub MODIFY (edition='Standard')Set-AzureSqlDatabase -ResourceGroupName wtpdemo -ServerName wtpcustomers-sc -DatabaseName JacarandaJazzClub -RequestedServiceObjectiveName Standard;
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.sql/servers/{serverName}/databases/{databaseName}?api-version=2014-04-01
https://msdn.microsoft.com/en-us/library/azure/mt163571.aspx
{ "location": “<location>”, "properties": { "requestedServiceObjectiveId":“<serviceObjectiveID>“ }}
Request body
T-SQL:
PowerShell:
REST API:
Catalog
Cust 1 Cust 2
Cloud Service
Customer Databases
Customer Catalog
Cust 3 Cust N
Scale databases to match customer needs
Cust 1Cust 2
Cust 3
Challenge: Unpredictable performance, massive scale
Catalog
Cloud Service
Customer Catalog
Cust 3 Cust 4Cust 2Cust 1Cust 9Cust 3 Cust 4
Cust 9Cust 1
Customer Databases
Cust 2 Cust NCust 6 Cust 7Cust 5 Cus Cus
Cust 6 Cust 7 Cust 8Cust 5
Elastic Database Model
200 1200eDTUs
400 800
PREVIEW
• Elastic databases, Elastic database pools• Pooled resources leveraged by many databases• Standard elastic pool provides 200-1200* eDTUs for up to 100*
databases• Elastic Standard databases can burst up to 100 eDTUs (S3 level)• Create/configure pool via portal, PowerShell, REST APIs • Move databases in/out using portal, PowerShell, REST APIs, T-SQL• Databases remain online throughout• Monitoring and alerting is available on both pool and databases
*Additional pricing tiers may be introduced, and the ranges and limits may be increased during the preview
Max per-database burst level
Elastic databases grouped into one or more pools
Catalog
Cloud Service
Customer Catalog
Cust 3 Cust 4Cust 2Cust 1Cust 9Cust 3 Cust 4
Cust 9Cust 1
Customer Databases
Cust 2Cust 6 Cust 7Cust 5 Cus
Cust 6 Cust 7Cust 5 Cust NCusCust 8
Demo: Elastic Database Pools
Challenge: Handling occasional intense workloads
Catalog
Cloud Service
Customer Catalog
Cust 3 Cust 4Cust 2Cust 1 Cust 3 Cust 4Cust 2Cust 9Cust 3 Cust 4
Cust 9Cust 1
Customer Databases
Cust 2Cust 6 Cust 7Cust 5 Cus
Cust 6 Cust 7Cust 5 Cust NCusCust 8
Catalog
Cust 1 Cust 2
Cloud Service
Customer Databases
Cust 3 Cust N
Challenge: Querying across database sets
PowerBI
Customer Catalog
Elastic Query
• Connect to a single SQL DB database using familiar SQL DB connection strings
• Simple setup with T-SQL DDL
• Transparent querying of many databases from a single database
• Familiar programming experience with T-SQL, ADO. NET Linq, EF etc.
• Use familiar development and BI tools to query across many databases
• Designed for interactive querying
Querying across many databases
Elastic Database
Query
Demo: Elastic Query
Catalog
Cust 1 Cust 2
Cloud Service
Customer Databases
Customer Catalog
Cust 3 Cust N
Challenge: Managing database sets
T-SQL
• Apply changes or administrative operations to many databases
• Use familiar T-SQL scripts to define jobs
• Built-in automatic retries in case of transient failures
• Tightly integrated with elastic pools in the new Azure Portal
• Designed for batch processing
Managing many databases
Elastic Database
Jobs
Demo: Elastic Job Management
Global database-as-a-service Predictable workloads Unpredictable workloads at
massive scale for SaaS applications
Easy development, simple self-service management
Azure SQL Database Summary
DB
DB
DB
DB
DB
Start //building SaaS applications in Azure today
Explore Azure SQL DB and its new elastic capabilities designed for SaaS
FIND OUT MORE:
http://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-pool-portal/
Call to Action
Improve your skills by enrolling in our free cloud development courses at the Microsoft Virtual Academy.
Try Microsoft Azure for free and deploy your first cloud solution in under 5 minutes!
Easily build web and mobile apps for any platform with AzureAppService for free.
Resources
© 2015 Microsoft Corporation. All rights reserved.