350 likes | 490 Views
Introduction to SQL Azure. Orange County SQL User’s Group Adnan Masood www.AdnanMasood.com. Slides courtesy of Lynn Langit – www.socaldevgal.com. Windows Azure Platform. Compute: Virtualized compute environment based on Windows Server Storage: Durable, scalable, & available storage
E N D
Introduction to SQL Azure Orange County SQL User’s Group Adnan Masood www.AdnanMasood.com Slides courtesy of Lynn Langit – www.socaldevgal.com
Windows Azure Platform Compute:Virtualized compute environment based on Windows Server Storage: Durable, scalable, & available storage Management: Automated, model-driven management of the service • Database:Relational processing for structured/unstructured data • Service Bus: General purpose application bus • Access Control: Rules-driven, claims-based access control
Extending SQL Data Platform to Cloud • Initial Services • Database – Core SQL Server database capabilities • Future Services • Data Sync – Enables the sync framework (soon after PDC) • Additional SQL Server capabilities available as a service: Business Intelligence and Reporting • New services: Reference Data and Secure Data Hub Reference Data Business Intelligence Data Sync Reporting SQL Azure Database Symmetric Programming Model Data Hub Aggregation
Microsoft SQL Azure Clear Feedback: “I want a database in the Cloud” • Familiar SQL Server relational model • Uses existing APIs & tools • Friction free provisioning and reduced management • Built for the Cloud with availability and scale • Accessible to all from PHP, Ruby, and Java Focus on combining the best features of SQL Server running at scale with low friction
The Evolution of SQL Azure Application BrowserApplication Evolves Application BrowserApplication Application ODBC, OLEDB, ADO.Net PHP, Ruby, … REST Client REST Client SQL Client* Cloud Cloud Windows Azure REST (Astoria) Web App ADO.Net + EF REST Client HTTP+REST HTTP+REST HTTP TDS HTTP Windows Azure Web App SQL Client* Data Center Data Center REST/SOAP + ACE Model TDS + TSQL Model SQL Azure OLD SDS * Client access enabled using TDS for ODBC, ADO.Net, OLEDB, PHP-SQL, Ruby, …
Database Choices • Value Props: • Full h/w control – size/scale • 100% compatibility • Roll-your-own HA/DR/scale • Value Props: • 100% of API surface area • Roll-your-own HA/DR/scale Dedicated On-premise SQL Server or other s/w on-premise Resource governance @ machine Security @ DB Server/OS • Value Props: • Auto HA, Fault-Tolerance • Friction-free scale • Self-provisioning • High compatibility Resources Hosted Hosted SQL Server or other Resource governance @ VM Security @ DB Server/OS SQL Azure (RDBMS) Virtual DB server Resource governance @ LDB Security @ LDB Shared Low “Friction”/Control High SQL Azure V1 targets scenarios that live in the lower left quadrant
Scenarios for V1 • Departmental Applications • Simple application built by individual or department • Need simple deployment, self-management, IT: “Empowerment and Governance” • Web Applications • Small business or startup that uses the cloud as their IT • Simple deployment, self-management, scale on demand • ISV • ISV hosting software on behalf of customer • Multi-tenant support for billing and isolation • Data Hub (Shortly After V1) • Sharing and aggregating of data across tiers and across enterprises • Centralized place for data, high scale, sync with existing data sources
V1 Application Topologies SQL Azure access from outside MS Datacenter (On-premises – ADO.NET) SQL Azure access from within MS Datacenter (Azure compute – ADO.NET) Application/ Browser App Code / Tools ADO.NET Data Svcs/REST - EF HTTP/S SOAP/REST HTTP/S App Code (ASP.NET) Windows Azure T-SQL (TDS) T-SQL (TDS) SQL Data Services SQL Data Services MS Datacenter MS Datacenter Code Far Code Near
Service Provisioning Model • Each account has zero or more servers • Azure wide, provisioned in a common portal • Billing instrument • Each server has one or more databases • Contains metadata about the databases and usage • Unit of authentication • Unit of Geo-location • Generated DNS based name • Each database has standard SQL objects • Unit of consistency • Unit of multi-tenancy • Contains Users, Tables, Views, Indices, etc. • Most granular unit of billing Account Server Database
Shared infrastructure at SQL database and below Request routing, security and isolation Scalable HA technology provides the glue Automatic replication and failover Provisioning, metering and billing infrastructure Architecture Machine 5 Machine 4 Machine 6 SQL Instance SQL Instance SQL Instance SQL DB SQL DB SQL DB UserDB1 UserDB1 UserDB1 UserDB2 UserDB2 UserDB2 UserDB3 UserDB3 UserDB3 UserDB4 UserDB4 UserDB4 SDS Provisioning (databases, accounts, roles, …, Metering, and Billing Scalability and Availability: Fabric, Failover, Replication, and Load balancing Scalability and Availability: Fabric, Failover, Replication, and Load balancing
SQL AzureDeployment Web Portal (API) DB Script SQL Azure TDS
SQL AzureAccessing databases Web Portal (API) Your App SQL Azure TDS Change Connection String
Database Replicas Single Database Multiple Replicas Replica 1 Single Primary Replica 2 DB Replica 3
Shared Environment Hardware Boundary Hardware Boundary C D A B D Hardware Boundary Hardware Boundary C C B A A B D
SQL AzureDatabase Monitoring & Recovery Web Portal (API) ! Your App SQL Azure TDS
Programming Model • Small Data Sets • Use a single database • Same model as on premise SQL Server • Large Data Sets and/or Massive Throughput • Partition data across many databases • Use parallel fan-out queries to fetch the data • Application code must be partition aware in v1 • For v1 will publish best practices for scale out • Post-v1 we are looking at building an abstraction to hide some of the complexities of partitioning
Sharding Databases • 1 x 10GB database • 1 Instances • 10 x 1GB databases • 10 Instances
Compatibility Goals • Support common application patterns • Logical/policy based administration • Patterns work from SQL Server to SQL Azure • Multi-tenancy considerations • Throttling and load balancing • Limits on DB size, transaction duration, … V1: Address the needs of the majority of web and departmental application
Sample of SQL Compatibility In Scope for v1 Out of Scope for v1 Distributed Transactions Distributed Query CLR Service Broker Spatial Physical server or catalog DDL and views • Tables, indexes and views • Stored Procedures • Triggers • Constraints • Table variables, session temp tables (#t) • …
Connection Model • Use existing client libraries • ADO.NET, ODBC, PHP • Client libraries pre-installed in Azure roles • Support for ASP.NET controls • Clients connect directly to a database • Cannot hop across DBs (no USE)
Logical vs. Physical Administration • SQL Azure focus on logical administration • Schema creation and management • Query optimization • Security management (Logins, Users, Roles) • Service handles physical management • Automatically replicated with HA “out of box” • Transparent failover in case of failure • Load balancing of data to ensure SLA DBA role places more focus on logical management
Deployment • Support for basic deployment options • SQL scripts work (but not attach database) • Geo-location of Windows Azure compute and SQL Azure Databases • Support for Application and multi-server management model • Support for application packages • Cloud or on-premise is a deployment time choice • Visibility of data across on-premise and the cloud Support existing and new forms of deployment
Security Model • Uses regular SQL security model • Authenticate logins, map to users and roles • Authorize users and roles to SQL objects • Limited to standard SQL Auth logins • Username + password • Future AD Federation, WLID, etc as alternate authentication protocols Security model is 100% compatible with on-premise SQL
Pricing Web Edition Business Edition 10GB Database $99.99 / month Bandwidth $0.10 /GB inbound $0.15 /GB outbound • 1 GB Database • $9.99 / month • Bandwidth • $0.10 /GB inbound • $0.15 /GB outbound • Specified by MAXSIZE on CREATE DATABASE command or portal (post-CTP1) • Can NOT switch betweenen Web and Business Editions • Monthly billing period
Platform Readiness (EHA) • Exchange Hosted Archive (EHA) is high scale archival service • Runs on SQL Azure infrastructure • In production prior to SQL Azure v1 • Rebuilt to address cost and scale issueshttp://www.microsoft.com/casestudies/Case_Study_Detail.aspx?CaseStudyID=4000003098 • Reduced COGS with increased customerand business benefit: • Larger scale (e.g. larger customers ~20TB+ each) • More self-managing (e.g. fault-tolerance) • Better query performance for fan-out • Faster provisioning of new customers
SQL AzureOpportunities and Futures • Partitioned databases • Geo-location and geo-redundancy • Distributed query • Security w/AD, WLID, etc • Support for multiple levels of hardware and software isolation
Release Plan SQL Azure Early Adopters CTP – On-board invitation-only early adopters SQL Azure CTP - Register for an invitation code Commercial Availability with Windows Azure in 2009 Sign up for our CTP: http://msdn.microsoft.com/en-us/sqlserver/dataservices/default.aspx InternalAdoption SQL Azure CTP Commercial Availability (V1) SQL Azure Early Adopters PDC MIX ‘09 WWPC WWPC TechEd Apr 09 May 09 Jun 09 Jul 09 Aug 09 Sep 09 Oct 09 Mar 09 Nov 09
Key Takeaways • SQL Azure available – PDC ’09 • Integrated part of the SQL Data Platform • Leverage you existing SQL Server knowledge and tools • SQL Azure is the data platform of the Windows Azure Platform
Want to Know More? • Windows Azure Platformhttp://www.azure.com/ • Windows Azure Platform Training Kithttp://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&displaylang=en • MSDN Development Centerhttp://msdn.microsoft.com/en-us/sqlserver/dataservices • Team Bloghttp://blogs.msdn.com/ssds