View
2.455
Download
4
Category
Tags:
Preview:
Citation preview
Introduction to Windows
Azure™ and Windows Azure ™ SQL DatabaseVikas Sahni
Agenda
• Azure Overview
• What is SQL Azure?
• Value Proposition
• Usage scenarios
• Concepts & Architecture
• What is there and what is not
• Federation and Reporting
Everything as a Service
Infrastructure As a Service
• Uses VMs• Consumer manages, patches
and monitors machines• Good for Legacy Apps• Not great for scalability
Platform As a Service
• Provides APIs• Building Block Services• Provider manages VMs and
patches• Requires a migration of apps• Great opportunity for
scalability
Software As a Service
• Web Front End to Software• Multi-Tenant• Logical Separation of data• Very little customisation• Commodity
ITPros Devs End Users
Everything as a Service
Infrastructure As a Service
Platform As a Service
Software As a Service
ITPros Devs End Users
Office 365Windows Azure
flexible open solid
Windows Azure
99.95% monthly SLA
Use as much as you need
When you need it
Pay only for what you use
True to The Cloud Manifesto
Why Are We Here?Because Cloud Computing is Huge
At Microsoft:
1 billion: Windows Live ID authentications each day 3 to 4 billion: the # of emails filtered daily from >6 million mail boxes by
Forefront 2 billion: the # of queries each month Bing 450 million: Hotmail users (now 16 years old) 100 million: users that get Windows Update worldwide, (now 14 years old) 20 million: Xbox Live users (now 10 years old) +400,000: square footage of new datacenters
ChicagoQuincy
Dublin Amsterdam
Hong Kong
Singapore
Japan
San Antonio
BoydtonDes Moines
Quincy, Washington: approx 500K sq ft, 27MW, uses entirely hydro-electric power
San Antonio, Texas: approx 477K sq ft, 27MW, uses recycled water for cooling
Chicago, Illinois: 707K square feet with critical power of 60 MW, uses water side economization, containers
Dublin, Ireland: approx 570K sq ft, up to 27MW, uses outside air for cooling.
More than 10 and less than 100 DCs worldwidePlus multiple global CDN locations
Microsoft Data Centres
Global Physical Infrastructureservers/network/datacenters
automated
elastic
managed resources
usage based
CDN cachingidentity
& securitybusiness analytics commercemedia HPC
integration
compute data management networking
SQL database blob connect
virtual network
traffic manager
noSQL databasewebsites
cloud services VMs
Page 12
Defining Windows Azure Architecture
Page 13
GOAL: Massive ScalabilityCompute Services in Windows Azure
Page 14
Windows Azure storage is an application managed by the Fabric Controller
Windows Azure applications can use native storage, Windows Azure SQL Database, or any other mechanism within a Windows Azure VM
Application state is kept in storage services, so worker roles can replicate as needed
Blobs can be stored in global Windows Azure Content Delivery Network (CDN)
Storage Services in Windows AzureGOAL: Scalable, durable utility-based storage
Page 15
Windows Azure Virtual Machines can run Windows AND Linux
Use standard VHD format, easy to move between Windows Azure and On-Premises Data Centers
Equally easy to directly move to another service provider that supports VHDs
Windows Azure Virtual Machines have persistent drives
Continuous Storage Geo-replication, with Opt-Out discount
Windows Azure Virtual MachinesGOAL: Flexible, No Lock-in
Windows Azure
Your Data Center
Microsoft Data Center
Page 16
Build with ASP.NET, Node.js or PHP
Use Windows, Mac or Linux machines for development
Deploy using FTP, Git or TFS
Deploy from Gallery, includes DotNetNuke, Drupal, Joomla, WordPress
Start with free shared instance, Scale up and Scale Out as traffic grows
Windows Azure Web SitesGOAL: Build with familiar tools, Deploy in Seconds, Start for free
Page 17
Build with ASP.NET, Node.js or PHP
Use Windows, Mac or Linux machines for development
Deploy using FTP, Git or TFS
Deploy from Gallery, includes DotNetNuke, Drupal, Joomla, WordPress
Start with free shared instance, Scale up and Scale Out as traffic grows
Windows Azure Web SitesGOAL: Build with familiar tools, Deploy in Seconds, Start for free
Page 18
Build with ASP.NET, Node.js or PHP
Use Windows, Mac or Linux machines for development
Deploy using FTP, Git or TFS
Deploy from Gallery, includes DotNetNuke, Drupal, Joomla, WordPress
Start with free shared instance, Scale up and Scale Out as traffic grows
Windows Azure Web SitesGOAL: Build with familiar tools, Deploy in Seconds, Start for free
Page 19
Build with ASP.NET, Node.js or PHP
Use Windows, Mac or Linux machines for development
Deploy using FTP, Git or TFS
Deploy from Gallery, includes DotNetNuke, Drupal, Joomla, WordPress
Start with free shared instance, Scale up and Scale Out as traffic grows
Windows Azure Web SitesGOAL: Build with familiar tools, Deploy in Seconds, Start for free
Page 20
Build with ASP.NET, Node.js or PHP
Use Windows, Mac or Linux machines for development
Deploy using FTP, Git or TFS
Deploy from Gallery, includes DotNetNuke, Drupal, Joomla, WordPress
Start with free shared instance, Scale up and Scale Out as traffic grows
10 Free Shared Instances
Windows Azure Web SitesGOAL: Build with familiar tools, Deploy in Seconds, Start for free
Page 21
Other Services
Application
Service
Service
Windows Azure Service Bus
Service Bus
Windows Azure Active Directory Access Control
Application
Service
SDS Authority
Active Directory
Page 22
Extending SQL Server to the Cloud
Database
Data SyncReporting Business Intelligence
Symmetric Programming Model and tools
Future OfferingsAdditional data platform capabilities: BINew services: Data and Web Services
Windows Azure SQL Database On-premises SQL Server
Workload Patterns Optimal for Cloud
23
Business need: Periodic batch process
Ex. scenario: Credit card co. doing risk scoring for portfolio on a monthly basis
Evidence: RiskMetrics financial analysis, monte carlo simulations
Business need: stay ahead of steady but fast growing customer demand
Ex. scenario: Digital syndication
Evidence: Associated Press Breaking News API
Average Usage
Com
pu
te
Time
“Growing Fast”
Com
pu
te
Time
“On and Off”
UsageAverage
InactivityPeriod
Workload Patterns Optimal for Cloud
24
Business need: safely handle highly unpredictable spikes in customer demand
Ex. scenario: Marketing campaigns, event ticketing, retail fads, disaster response/recovery
Evidence: TicketDirect ticketing system
Business need: respond to periodic peaks in customer usage and business cycle
Ex. scenario: Ecommerce system, internal payroll portal, corporate website
Evidence: Kelley Blue Book website
Com
pu
te
Time
“Unpredictable Bursting”
Average Usage Com
pu
te
Time
“Predictable Bursting”
Average Usage
Workload Patterns not for the Cloud today
25
Business need: extreme uptime requirements, extreme transaction processing speeds
Ex. scenario: Credit Card Authorization,Stock Exchanges
Business need: specific latency requirements, single transaction scope across large database
Ex. scenario: Betting exchanges, Commodity exchanges, Global Airline Reservation Distribution Systems
Com
pu
te
Presenter should insert her / his own case study
26
28
Windows Azure SQL DatabaseThe first and only true relational database as a service
Elastic Scale Developer AgilitySelf-managed
• Database utility; pay as you grow• Flexible load balancing• Business-ready SLAs• Enable multi-tenant solutions• World-wide presence
• Easy provisioning and deployment• Auto high-availability and fault
tolerance• Self-maintaining infrastructure;
self-healing• No need for server or VM
administration
• Build cloud-based database solutions on consistent relational model
• Leverage existing skills through existing ecosystem of developer and management tools
• Explore new data application patterns
29
Windows Azure SQL Database Network TopologyApplication
Load Balancer
TDS (tcp:1433)
TDS (tcp: 1433)
TDS (tcp: 1433)
Applications use standard SQL client libraries: ODBC, ADO.Net, …
Load balancer forwards ‘sticky’ sessions to TDS protocol tier
Data Node Data Node Data Node Data Node Data NodeData Node
Gateway Gateway Gateway Gateway Gateway Gateway
Scalability and Availability: Fabric, Failover, Replication and Load balancing
30
Performance Considerations
The distance your application travels to perform data access will affect performanceRedesign your application for fewer trips to the databaseUse the same Data Center for all components of your application
31
Application Topologies
MSDatacenter
SOAP/RESTHTTP/S
Windows Azure SQL Database access from within MS Datacenter (Azure compute – ADO.NET)
Windows Azure
T-SQL (TDS)
MSDatacenter
T-SQL (TDS)
App Code / Tools
Windows Azure SQL Database access from outside MS Datacenter (On-premises – ADO.NET)
App Code(ASP.NET)
ADO.NET Data Svcs/REST - EFHTTP/S
Code Far
SQL Data Services SQL Data Services
Application/ Browser
Code Near
32
Data Hub “An aggregation of Enterprise, Partner, Desktop, and Device data within Windows Azure SQL Database”
Sync Sync
DesktopClient App
Device
Sync
Enterprise
Enterprise
On-premises App
User Management
Device Management
Sync GatewayBusiness Logic / Rules
Windows Azure SQL Database
Windows Azure
Azure App
Sync Client
Client App
Sync Client
33
Service Provisioning Model
Each account has zero or more serversAzure wide, provisioned via a common portalEstablishes a billing instrument
The servers are logical, not tied to physical machinesEach server has one or more databases
Logical concept equal to a master DBContains metadata about database & usageUnit of authentication, geo-location, billing, reportingGenerated DNS-based name
Each database has standard SQL objectsUsers, Tables, Views, Indices, etcUnit of consistency
Account
Server
Database
34
Database Replicas and Failover
Replica 1
Replica 2
Replica 3
DB
Single Database Three Replicas
Single Primary
Replica 4
!
35
Windows Azure SQL DatabaseDeployment
SQL AzureTDS Gateway
DB Script
36
Windows Azure SQL DatabaseAccessing databases
Your App
Change Connection String
Windows Azure SQL Database
TDS Gateway
37
Connecting to Windows Azure SQL Database
Connect via Entity Framework, ADO.NET, ODBC, etc.OLE DB provider is NOT supportedMay need to include <login>@<server>Attaching a database is NOT supportedUse familiar tools (sqlcmd, osql, SSMS, etc)Use SQL Server Management Studio 2008 R2 / 2012
38
Windows Azure SQL Database SecuritySupports SQL Server Security
On-premise SQL Server security concepts still applyServer-level: sds_dbcreator, sds_securityadmin rolesDatabase-level: same as on-premise SQL Server
Administrative user is equivalent to sa
39
T-SQL Support (full or partial)
ConstantsConstraintsCursorsIndex management and rebuilding indexesLocal temporary tablesReserved keywordsStored proceduresStatistics managementTransactionsTriggers
Tables, joins, and table variablesTransact-SQL language elements such as
Create/drop databasesCreate/alter/drop tablesCreate/alter/drop users and logins…
User-defined functionsViews
40
T-SQL Not Supported
Common Language Runtime (CLR)Database file placementDatabase mirroringDistributed queriesDistributed transactionsFilegroup managementFull Text SearchGlobal temporary tables
SQL Server configuration optionsSQL Server Service BrokerSystem tablesTrace Flags
Database EditionsTwo SQL Database SKUs: Web & Business
You specify Web or Business EditionWeb: EDITION = WebBusiness: EDITION = Business
You specify MAXSIZEWeb: MAXSIZE = 1GB| 5GBBusiness: MAXSIZE = 10GB | 20GB | 30GB | 40GB | 50GB | 100GB | 150GBThis is the size we will not let you grow beyondYou will be charged for the actual (peak) size (in any one day)
CREATE DATABASE foo1 (EDITION='business', MAXSIZE=50GB);CREATE DATABASE foo2 (EDITION='business', MAXSIZE=30GB);
CREATE DATABASE bar1 (EDITION='web', MAXSIZE=5GB);CREATE DATABASE bar2 (EDITION='web'); -- Defaults to 1GB
Up to 150 GBBusiness Edition
Up to 5 GBWeb Edition
Database Editions – Pricing as on June 7, 2012 Windows Azure SQL Database Database is billed based on a graduated rate based on the size of the database, available as Web and Business Editions. The Web Edition supports up to a 5 GB maximum T-SQL based relational database. The Business Edition supports up to a 150 GB maximum size T-SQL-based relational database.
Billing DetailsCalculated on a daily basis, charged at a monthly rate for each SQL Azure database you utilizeFor databases greater than 1 GB, you will be billed in the next whole gigabyte increment
Example:If you utilized two Business Edition databases, one that was 4.4 GB and one that was 14.4 GB for 1 day during a billing month, you would be charged for a 5 GB and 15 GB database for that day, which would total $2.643. Below are the calculations:
5 GB: ($9.99 for the first GB + $3.996 per GB for the next 4 GB) / 31 days = $0.83815 GB: ($45.954 for the first 10 GB + $1.998 per GB for the next 5 GB) / 31 days = $1.805
Database Size Price Per Database Per Month
0 to 100 MB Flat $4.995
Greater than 100 MB to 1 GB Flat $9.99
Greater than 1 GB to 10 GB $9.99 for first GB, $3.996 for each additional GB
Greater than 10 GB to 50 GB $45.954 for first 10 GB, $1.998 for each additional GB
Great than 50 GB to 150 GB $125.874 for first 50 GB, $0.999 for each additional GB
43
Migrating Databases“Just change the connection string” * once database is migrated
SQL Server Management Studio 2012 has increased support for Windows Azure SQL Database
Migrating Databases Hands On Lab in the Windows Azure Platform Training Kit
44
Moving data
Scripted INSERT statements
SQL Server Integration Services
BCP (bulk copy) is supported
SQL Data Sync
45
Special Considerations: Database Size
Maximum single database size is currently 150GBDatabase size calculation
Includes: primary replica data, objects and indexesDoes NOT include: logs, master database, system tables, server catalogs or additional replicas
Must handle partitioning logic within the application
46
Special Considerations: ThrottlingMSDN
• Use traditional SQL Server best practices• Build in retry logic especially if you expect very high throughput demands• Consider scaling out for high throughput scenarios
47
Scaling Up v Scaling Out
1 x 10GB database
10 x 1GB databases
48
Why scale out?
Scale out on low cost commodity hardware
Increased throughput for massive load
Increased relational database storage volume
49
Sharding basics
Several databases are used to store a portion of the application’s data
The same schema is used across all databases
Data is horizontally partitioned among databases (shards) based on certain criteria (i.e.: geographical info, customer)
50
Analyzing the sharding modelPrimary Shard
Shard Child
Global
Global Country, OrderDate ContactID could be the partition field
51
Scale Out Considerations
Database sharding causes complexityCan you separate your database per tenant?Partitioning strategy is highly dependant on scenario
Is there natural partitioning that facilitates use cases?Uniform partitioning via round-robin (modulo) can be highest performance
Apps may need to be changed/re-architected to take advantage SQL Federation provides support
you can do scale-out manuallyEffective scale/load testing is important to understand how to federate
SQL FederationProvides Scale-Out Support in SQL Database
Partition data and load across many serversBring computational resources of many to bear
Take advantage of elastic provisioning of databasesPay as you go benefitsZero physical administrationFederation includes
Robust Connection ManagementOnline repartition operationsSplit & Merge Databases
53
SQL Federation: Concepts
FederationRepresents the data being partitioned
Federation KeyThe value that determines the routing of a piece of data
Atomic UnitAll rows with the same federation key value: always together!
Federation Member (aka Shard)A physical container for a range of atomic units
Federation RootThe database that houses federation directory
Root
Federation “CustData”
Member: PK [min, 100)
AUPK=5
AUPK=25
AUPK=35
Member: PK [100, 488)
AUPK=105
AUPK=235
AUPK=365
Member: PK [488, max)
AUPK=555
AUPK=2545
AUPK=3565
(Federation Key: CustID)
Introducing SQL Reporting
Extend Reporting to the Cloud
55
Developer Agility & Choice
Elastic Scale & Reliability
Extended Reach & Accessibility
SQL Reporting
Off-premises reporting infrastructure lowers TCO
Highly available Windows Azure environment
Scales to meet the demands of the business as needed
Secure and reliable access to reports
Access reports within an application or via a web browser
Render and export to the format desired
Build reports using familiar design tools
Publish reports to the cloud or embed directly within applications
Use consistent API’s to view, execute and manage reports
SQL Reporting Scenarios
Operational reports over SQL Database dataCustomers can report over their SQL Database data, not necessarily with the intent to embed them into an application.
Embedding reports into my Windows or Azure applicationDevelopers can use same patterns and tools they use today to embed reports into their applications in connected mode against SQL Reporting Service.
57
Learning Windows Azure SQL Database
www.azure.com
Hands on Labs in Windows Azure Platform Training Kit
Follow the team bloggers
58
Want to Know More?Windows Azurehttp://windowsazure.com/
Windows Azure Training Kithttp://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8396
MSDN Development Centerhttp://msdn.microsoft.com/en-us/library/windowsazure/gg619386.aspx
Recommended