51
Azure Data Overview Presenter Name Position or role Microsoft Azure

Azure Data Overview Presenter Name Position or role Microsoft Azure

Embed Size (px)

Citation preview

Page 1: Azure Data Overview Presenter Name Position or role Microsoft Azure

Azure Data OverviewPresenter NamePosition or role

Microsoft Azure

Page 2: Azure Data Overview Presenter Name Position or role Microsoft Azure

Agenda

SQL Database

SQL on IaaS

NoSQL Blobs

Page 3: Azure Data Overview Presenter Name Position or role Microsoft Azure

SQL Database

Page 4: Azure Data Overview Presenter Name Position or role Microsoft Azure

IaaS SaaSPhysical Virtual

A Continuous Offering From Private To

Public Cloud

PaaS

Page 5: Azure Data Overview Presenter Name Position or role Microsoft Azure

ArchitectureSQL Database

Page 6: Azure Data Overview Presenter Name Position or role Microsoft Azure

A Server Is Not A Machine

SQL Server

A Machine

SQL Database

Server

A TDS Endpoint

Page 7: Azure Data Overview Presenter Name Position or role Microsoft Azure

How It Works

ArchitectureClient Layer - Used by application to communicate directly with SQL Database.

Services Layer – Gateway between Client layer and Platform layer.

Platform Layer – Includes physical servicers and services that support the Services layer.

Infrastructure Layer – IT administration of the physical HW and OS.

Infrastructure Layer

PHPWCF Data Services

SQL ServerApplications

and Tools

ODBC ADO.NET

Tabular Data Stream (TDS)

Client Layer

Services Layer

Provisioning

Billing and Metering

Connection Routing

Provisioning

Billing and Metering

Connection Routing

Provisioning

Billing and Metering

Connection Routing

TDS+SSL

Platform Layer

SQL Server

SQL Database

Fabric

Management Services

SQL Server

SQL Database

Fabric

Management Services

SQL Server

SQL Database

Fabric

Management Services

Page 8: Azure Data Overview Presenter Name Position or role Microsoft Azure

Starting With The BasicsSQL Database

Page 9: Azure Data Overview Presenter Name Position or role Microsoft Azure

The Basics

SQL DatabaseSQL Server database technology as a service Fully ManagedEnterprise-ready with automatic support for HADesigned to scale out elastically with demandIdeal for simple and complex applications

Page 10: Azure Data Overview Presenter Name Position or role Microsoft Azure

Server ProvisioningServer DefinedService head that contains databases

Connect via automatically generated FQDN (xxx.database.windows.net)

Initially contains only a master database

Provision Servers InteractivelyLog on to Microsoft Azure Management Portal

Create a SQL Database server

Specify admin login credentials

Add firewall rules and enable service access

Automate Server ProvisioningUse Microsoft Azure Platform PowerShell cmdlets (or use REST API directly)

wappowershell.codeplex.com

Page 11: Azure Data Overview Presenter Name Position or role Microsoft Azure

Selecting the right EditionService Tier

Performance Level

Common App Pattern

Performance Business Continuity

Max DB Size

Trans. Perf. Objective

DTUs PITR DR / GEO-Rep

Basic Basic Small DB, SQL opp

2 GB Reliability / Hr.

5 Past 7 Days

DB Copy + Manual Export

Standard

S1 / S2 Wrkgp/cloud app, multiple concurrent operations

250 GB

Reliability / Min.

15/ 50

Past 14 Days

DB Copy + Manual Export

Premium

P1 / P2 / P3 Mission Critical, High volume, Many concurrent Users

500 GB

Reliability / sec.

100/200/800

Past 35 Days

Active Geo-replication

Page 12: Azure Data Overview Presenter Name Position or role Microsoft Azure

DemoCreating A SQL Database Server

Page 13: Azure Data Overview Presenter Name Position or role Microsoft Azure

Create And Deploy Your Database

Page 14: Azure Data Overview Presenter Name Position or role Microsoft Azure

Create Database…

Use Familiar TechnologiesTransact-SQL

Languages.NET Framework (C#, Visual Basic, F#) via ADO.NET

C / C++ via ODBC

Java via Microsoft JDBC provider

PHP via Microsoft PHP provider

FrameworksOData, Entity Framework, WCF Data Services, NHibernate

ToolsSQL Server Management Studio (2008 R2 and later)

SQL Server command-line utilities (SQLCMD, BCP)

CA Erwin® Data Modeler

Embarcadero Technologies DBArtisan®

SQL Server ComparisonFocus on logical vs. physical administration

Database and log files automatically placed

Three high-availability replicas maintained for every database

Tables require a clustered index

Maximum database size is 500 GB

Unsupported SQL Server FeaturesUse command, distributed transactions, distributed views

Service Broker

Common Language Runtime (CLR)

SQL Agent

SQL Profiler

Native Encryption

Page 15: Azure Data Overview Presenter Name Position or role Microsoft Azure

Enhanced Tooling

SQL Database Management PortalWeb designers for tables, views, stored procs

Interactive query editing and execution

SQL Server Data Tools (SSDT)Visual Studio IDE for database development

Includes modern designers and projects with declarative, model-driven development

Develop and test in both connected and disconnected states

Platform targeting for both SQL Server (2005 and above) and SQL Database

Get it free with Web PI, with SQL Server 2012 and with Visual Studio 11

Page 16: Azure Data Overview Presenter Name Position or role Microsoft Azure

Database DeploymentData-Tier Application Framework (DAC Fx)Alternative to traditional script based approach

Dramatically simplifies deployment, migration and versioning of databases

Provides a single unit of deployment for schema (dacpac) or for schema + data (bacpac)

Supports automatic versioning of database schemas

Supports platform targeting for both SQL Server (2005 and above) and SQL Database

Build from scratch or extract from existing db

How To Get The Latest DAC FxWith SQL Server Data Tools

With SQL Server 2012/2014 Management Studio

With SQL Database Import/Export Service

Via sqldacexamples.codeplex.com

Page 17: Azure Data Overview Presenter Name Position or role Microsoft Azure

DemoDAC Deployment From SQL Server Management Studio

Page 18: Azure Data Overview Presenter Name Position or role Microsoft Azure

Secure Your DatabaseSQL Database

Page 19: Azure Data Overview Presenter Name Position or role Microsoft Azure

There Are Two Ways To Secure A Database:

Within The Database

On The Server

Page 20: Azure Data Overview Presenter Name Position or role Microsoft Azure

Server BenefitsServer identity and access controlSQL authentication supported (No Integrated authentication)

The Admin login is similar to sa

Connect to master to administer logins

loginmanager: Server-Level security role for creating logins

dbmanager: Server-Level security role for creating databases

Page 21: Azure Data Overview Presenter Name Position or role Microsoft Azure

Database BenefitsDatabase identity and access controlLogins require an associated user account

The Admin login is automatically associated with dbo

The dbo has full rights in the database

Manage users with CREATE / ALTER / DROP USER commands

Add users to roles via sp_add_rolemember to grant privileges

Utilize schemas where appropriate

Page 22: Azure Data Overview Presenter Name Position or role Microsoft Azure

SQL Database Firewall• Securing your data• IP Address-based access control for SQL

Database

• Rules can be defined at the server and database

• No IP authorized by default

• Configurable using the SQL Database Portal and REST API

• Option to disable/enable access from applications hosted in Microsoft Azure

Page 23: Azure Data Overview Presenter Name Position or role Microsoft Azure

Application ConnectivityConnecting To SQL Database1. TDS (Tabular Data Stream) protocol over TCP/IP

supported

2. SSL required

3. Use firewall rules to connect from outside Microsoft data center

ASP.NET EXAMPLE:

Considerations And Best Practices1. login: [login]@[server]

2. Idle connections

3. Long running transactions

4. DoS guard

5. Failover events

6. Throttling

7. Connection pooling and Retry logic

8. Latency introduced for updates

9. No cross-database dependencies

<connectionStrings><addname="AdventureWorks"connectionString=

"Data Source=[server].database.windows.net;Integrated Security=False;Initial Catalog=ProductsDb;User Id=[login];Password=[password];Trusted_Connection=False;Encrypt=true;"

providerName="System.Data.SqlClient"/></connectionStrings>

Page 24: Azure Data Overview Presenter Name Position or role Microsoft Azure

SQL on IaaS

Page 25: Azure Data Overview Presenter Name Position or role Microsoft Azure

25

Run SQL on VM• Run any SQL product on cloud VM • Support for SQL Server, Oracle, MySql• Ready to go VM images available in Gallery• Persistent storage using attached disk in blob storage

Microsoft Azure

Page 26: Azure Data Overview Presenter Name Position or role Microsoft Azure

26

SQL Database vs SQL IaaS Comparison

Microsoft Azure

SQL DatabaseFully managed SQL Server environment

HA/DR features automatically included

Automatic backup enabled by default

SQL IaaSChoice of a variety of DB engines (SQL Server, Oracle, MySql)

Larger database sizes possible (16TB)

All features of native DB available

Windows authentication available (requires VM to be joined to on-premises domain)

Page 27: Azure Data Overview Presenter Name Position or role Microsoft Azure

Blob Storage

Page 28: Azure Data Overview Presenter Name Position or role Microsoft Azure

Blob Storage Concepts

BlobContainerAccount

http://<account>.blob.core.windows.net/<container>/<blobname>

Pages/ Blocks

contoso

PIC01.JPG

Block/Page

Block/Page

PIC02.JPG

images

VID1.AVIvideos

Page 29: Azure Data Overview Presenter Name Position or role Microsoft Azure

Blob Details

Main Web Service Operations

PutBlobGetBlobDeleteBlobCopyBlobSnapshotBlob LeaseBlob

Page 30: Azure Data Overview Presenter Name Position or role Microsoft Azure

Blob Details

Associate Metadata with Blob

Standard HTTP metadata/headers (Cache-Control, Content-Encoding, Content-Type, etc)

Metadata is <name, value> pairs, up to 8KB per blob

Either as part of PutBlob or independently

Page 31: Azure Data Overview Presenter Name Position or role Microsoft Azure

Blob Details

Blob always accessed by name

Can include ‘/‘ or other delimeter in name e.g. /<container>/myblobs/blob.jpg

Page 32: Azure Data Overview Presenter Name Position or role Microsoft Azure

Blob Containers• Multiple Containers per Account

• Special $root container

• Blob Container• A container holds a set of blobs• Set access policies at the container level • Associate Metadata with Container• List the blobs in a container• Including Blob Metadata and MD5 • NO search/query. i.e. no WHERE MetadataValue

= ?

• Blobs Throughput• Effectively in Partition of 1• Target of 60MB/s per Blob

Page 33: Azure Data Overview Presenter Name Position or role Microsoft Azure

GET http://.../products?comp=list&prefix=Tents&delimiter=/

<Blob>Tents/PalaceTent.wmv</Blob><Blob>Tents/ShedTent.wmv</Blob>

Enumerating Blobs

GET Blob operation takes parameters

• Prefix•Delimiter• Include= (snapshots, metadata etc…)

http://adventureworks.blob.core.windows.net/ Products/Bikes/SuperDuperCycle.jpg Products/Bikes/FastBike.jpg Products/Canoes/Whitewater.jpg Products/Canoes/Flatwater.jpg Products/Canoes/Hybrid.jpg Products/Tents/PalaceTent.jpg Products/Tents/ShedTent.jpg

Page 34: Azure Data Overview Presenter Name Position or role Microsoft Azure

http://.../products?comp=list&prefix=Canoes&maxresults=2

&marker=MarkerValue

<Blob>Canoes/Hybrid.jpg</Blob>

Pagination

Large lists of Blobs can

be paginated• Either set maxresults or;• Exceed default value for maxresults (5000)

http://.../products?comp=list&prefix=Canoes&maxresults=2

<Blob>Canoes/Whitewater.jpg</Blob><Blob>Canoes/Flatwater.jpg</Blob><NextMarker>MarkerValue</NextMarker>

Page 35: Azure Data Overview Presenter Name Position or role Microsoft Azure

Tour of the Blob Service

demo

Page 36: Azure Data Overview Presenter Name Position or role Microsoft Azure

Two Types of Blobs Under the Hood

Block BlobTargeted at streaming workloads

Each blob consists of a sequence of blocks

Each block is identified by a Block ID

Size limit 200GB per blob

Optimistic Concurrency via Etags

Page BlobTargeted at random read/write workloads

Each blob consists of an array of pages

Each page is identified by its offset from the start of the blob

Size limit 1TB per blob

Optimistic or Pessimistic (locking) concurrency via leases

Page 37: Azure Data Overview Presenter Name Position or role Microsoft Azure

TheBlob.wmv

Uploading a Block BlobUploading a large blob

10 GB Movie

Blo

ck I

d 1

Blo

ck I

d 2

Blo

ck I

d 3

Blo

ck I

d N

blobName = “TheBlob.wmv”;PutBlock(blobName, blockId1, block1Bits);PutBlock(blobName, blockId2, block2Bits);…………PutBlock(blobName, blockIdN, blockNBits);PutBlockList(blobName,

blockId1,…,blockIdN);

TheBlob.wmv

BenefitEfficient continuation and retryParallel and out of order upload of blocks

THE BLOB

Microsoft AzureStorage

Page 38: Azure Data Overview Presenter Name Position or role Microsoft Azure

Page Blob – Random Read/Write

Create MyBlobSpecify Blob Size = 10 GbytesSparse storage - Only charged for pages with data stored in them

Fixed Page Size = 512 bytesRandom Access Operations

PutPage[512, 2048)PutPage[0, 1024)ClearPage[512, 1536)PutPage[2048,2560)

GetPageRange[0, 4096) returns valid data ranges:

[0,512) , [1536,2560)GetBlob[1000, 2048) returns

All 0 for first 536 bytesNext 512 bytes are data stored in [1536,2048)

0

10 GB

512

1024

1536

2048

2560

10 G

B A

dd

ress S

pace

Page 39: Azure Data Overview Presenter Name Position or role Microsoft Azure

Shared Access SignaturesFine grain access rights to blobs and containersSign URL with storage key – permit elevated rightsRevocation

• Use short time periods and re-issue• Use container level policy that can be deleted

Two broad approaches• Ad-hoc• Policy based

Page 40: Azure Data Overview Presenter Name Position or role Microsoft Azure

Ad Hoc SignaturesCreate Short Dated Shared Access Signature

• Signedresource Blob or Container• AccessPolicy Start, Expiry and Permissions• Signature HMAC-SHA256 of above fields

Use case• Single use URLs• E.g. Provide URL to mobile client to upload to container

http://...blob.../pics/image.jpg?sr=c&st=2009-02-09T08:20Z&se=2009-02-10T08:30Z&sp=w

&sig= dD80ihBh5jfNpymO5Hg1IdiJIEvHcJpCMiCMnN%2fRnbI%3d

Page 41: Azure Data Overview Presenter Name Position or role Microsoft Azure

Policy Based SignaturesCreate Container Level Policy• Specify StartTime, ExpiryTime, Permissions

Create Shared Access Signature URL• Signedresource Blob or Container• Signedidentifier Optional pointer to container policy• Signature HMAC-SHA256 of above fields

Use case• Providing revocable permissions to certain users/groups• To revoke: Delete or update container policy

http://...blob.../pics/image.jpg?sr=c&si=MyUploadPolicyForUserID12345

&sig=dD80ihBh5jfNpymO5Hg1IdiJIEvHcJpCMiCMnN%2fRnbI%3d

Page 42: Azure Data Overview Presenter Name Position or role Microsoft Azure

NoSQL61

Page 43: Azure Data Overview Presenter Name Position or role Microsoft Azure

62

Generally more scalable

• The storage engines of NoSQL stores are designed to minimize contentions enabling higher throughput and therefore more scalable• Lower transaction capability in NoSQL results in less

contention and therefore more scalable• Less complex query processor means that a single query

can’t degrade service• Built-in replication capability means that store can scale

out which better aligns to other application tiers (e.g. websites)• No fixed schema or lower schema requirementsMicrosoft Azure

Page 44: Azure Data Overview Presenter Name Position or role Microsoft Azure

63

NoSQL on Azure

• Azure Tables service is NoSQL row store• MongoDB is a document (JSON) store • Cassandra is a columnar store with excellent replication• HBase is a Big Data (Hadoop) NoSQL store available in

HDInsight

Microsoft Azure

Page 45: Azure Data Overview Presenter Name Position or role Microsoft Azure

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 46: Azure Data Overview Presenter Name Position or role Microsoft Azure

Azure footprint

16 regions worldwide in 2014

Page 47: Azure Data Overview Presenter Name Position or role Microsoft Azure

Fortune 500 using Azure

>57%

>250kActive websites

Greater than

1,000,000

SQL Databases in Azure>20 TRILLION

storageobjects

>300

MILLIONAD users

>13BILLIONauthentication/wk

>2 MILLION

requests/sec

>1 MILLION

Developers registered with Visual Studio Online

Page 48: Azure Data Overview Presenter Name Position or role Microsoft Azure
Page 49: Azure Data Overview Presenter Name Position or role Microsoft Azure

Get startedVisit azure.microsoft.com

Page 50: Azure Data Overview Presenter Name Position or role Microsoft Azure

SQL Database Billing Rates (As of February 2012)

Database Size Price Per Database Per Month

0 to 100 MB Flat $4.995

> 100 to 1 GB Flat $9.99

> 1GB to 10 GB $9.99 for first GB, $3.99 per additional GB

> 10 GB to 50 GB $45.954 for first 10 GB, $1.998 for each additional GB

> 50 GB to 150 GB $145.874 for first 50 GB, $0.999 for each additional GB

Data TransfersNorth America and Europe regions $0.05 - $0.12 per GB outbound

Asia Pacific region $0.12 - $0.19 per GB outbound

All inbound data transfers are at no charge.

Based on graduated rate based on database sizeCharged at monthly rate per database

Amortized over month -> calculated on daily basis

No Transaction Charges

Page 51: Azure Data Overview Presenter Name Position or role Microsoft Azure

SQL Database Architecture