Azure Data Storage

78
Azure Data Storage Ken Cenerelli @KenCenerelli Microsoft Azure

Transcript of Azure Data Storage

Page 1: Azure Data Storage

Azure Data StorageKen Cenerelli@KenCenerelli

Microsoft Azure

Page 2: Azure Data Storage

Agenda

Blobs Files Queues Tables

Page 3: Azure Data Storage

Agenda

SQL

Database

SQL Server

VMDocumentDB Search HDInsight

Page 4: Azure Data Storage

Microsoft Azure

Storage Blob

Page 5: Azure Data Storage

Two Types of Blobs Under the Hood

Page 6: Azure Data Storage

Two Types of Blobs Under the Hood

Block Blob:

Page 7: Azure Data Storage

Two Types of Blobs Under the Hood

Page Blob:

Page 8: Azure Data Storage

Blob Storage Concepts

Page 9: Azure Data Storage

Blob Details –

Page 10: Azure Data Storage

Shared Access Signatures

Page 11: Azure Data Storage

Policy based:

Stored Access PolicyUse for longer dated revocable permission sets

Points to a Container level policy

Can only revoke by deleting the blob or waiting for expiry

Use case: Providing revocable permissions to certain users/groups

Shared Access Signatures – Two broad approaches

Ad-hoc:

Shared Access SignatureUse for very short dated single use scenarios

Can only revoke by deleting the blob or waiting for expiry

Use case: Single use URLs

E.g. Provide URL to mobile client to upload to container

Always endeavour to use least permission set possible

Page 12: Azure Data Storage

Microsoft Azure

Storage Files

Page 13: Azure Data Storage

Azure Files

Shared Network File Storage for Azure

Availability, durability, scalability are managed automatically

Supports two interfaces: SMB and REST

Page 14: Azure Data Storage

Azure Files – Usage

Share data across VMs and applications

Share settings throughout services

Share tools amongst developers in a group

Dev/Test/Debug

Page 15: Azure Data Storage

Azure Files vs Blobs

Description Azure Blobs Azure Files

Durability

Options

LRS, ZRS, GRS (and RA-GRS for higher

availability)LRS, GRS

Accessibility REST APIsSMB 2.1 (standard file system APIs)

REST APIs

Connectivity REST – WorldwideSMB 2.1 - Within region

REST – Worldwide

Endpointshttp://myaccount.blob.core.windows.net/

mycontainer/myblob

\\myaccount.file.core.windows.net\myshare\myfile.txt

http://myaccount.file.core.windows.net/myshare/myfile.txt

DirectoriesFlat namespace however prefix listing

can simulate virtual directoriesTrue directory objects

Case Sensitivity of Names Case sensitive Case insensitive, but case preserving

Capacity Up to 500TB containers 5TB file shares

Throughput Up to 60 MB/s per blob Up to 60 MB/s per share

Object size Up to 1 TB/blob Up to 1 TB/file

Billed capacity Based on bytes written Based on file size

Page 16: Azure Data Storage

Microsoft Azure

Storage Queue

Page 17: Azure Data Storage

Queue length reflects how well the backend processing nodes are doing.

Decouples the application and makes scaling easier.

Flexibility of efficient resource usage within an application.

Absorb traffic bursts and reduce the impact of individual component failures.

Why use a Queue?

Page 18: Azure Data Storage

Storage Account: All access to Azure Storage is done through

a storage account. It can store millions of messages until the

storage account’s maximum capacity of 500 TB is reached.

Queue: A queue contains a set of messages.

Message: A message, in any format, of up to 64KB.

Queue Components

Page 19: Azure Data Storage

Queues are addressable using the following URL format:

http://{storage-account}.queue.core.windows.net/{queue}

Queue URL format

Page 20: Azure Data Storage

Faster Web Applications with queues

using asynchronous workloads

Demo

Page 21: Azure Data Storage

Messages are ordered but not guaranteed FIFO.

Message will be processed at least once.

Message may be processed more than once.

.DequeueCount increases every time.

Messages are stored up to 7 days.

Queue Considerations

Page 22: Azure Data Storage

Microsoft Azure

Storage Table

Page 23: Azure Data Storage

Table Storage Concepts

Page 24: Azure Data Storage

Table Storage Details

Page 25: Azure Data Storage

Table Storage Details

Page 26: Azure Data Storage

Table Storage Details – Entity Properties

Page 27: Azure Data Storage

Table Storage Details

Page 28: Azure Data Storage

Table Storage Details – Purpose of the PartitionKey

Page 29: Azure Data Storage

Microsoft Azure SQL Database

Page 30: Azure Data Storage

From private to public Cloud

Microsoft Relational Storage Options

A Continuous offering

Page 31: Azure Data Storage

A Server is not a machine

Page 32: Azure Data Storage

SQL Server database technology “as a Service”

Fully Managed

Enterprise-ready with automatic support for HA, DR, Backups, replication and more

SQL Database – The Basics

Page 33: Azure Data Storage

Scale out with ElasticScale

Built-in regional database replicas for additional protection

Uptime SLA of 99.99%

SQL Database – The Basics

Page 34: Azure Data Storage

The Service head contains databases

Connect via automatically generated FQDN: {name}.database.windows.net

Initially contains only a master database

SQL Database – Server Definition

Page 35: Azure Data Storage

Auto backups, transactional logs every 5 min

Backups in Azure Storage and geo-replicated

Creates a side-by-side copy, non-disruptive

Backups retention policy: 7, 14 or 35 days

Automated export of logical backups for long-term backup protection

Point-in-time restore - “oops recovery”

Page 36: Azure Data Storage

Available in all tiers: Basic, Standard and Premium

Built on geo-redundant Azure Storage

Recover to any Azure region

Geo-restore – Emergency data recovery when you need it most

Page 37: Azure Data Storage

Focus 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

Azure SQL Database vs. SQL Server

Page 38: Azure Data Storage

Transact-SQL

Use Familiar Technologies

(obviously)

Page 39: Azure Data Storage

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

C / C++: ODBC

Java: Microsoft JDBC provider

PHP: Microsoft PHP provider

Use Familiar Technologies - Languages

Page 40: Azure Data Storage

OData

Entity Framework

WCF Data Services

NHibernate (etc.)

Use Familiar Technologies - Frameworks

Page 41: Azure Data Storage

SQL Server Management Studio (>=2008 R2)

SQL Server command-line utilities (SQLCMD, BCP)

Visual Studio IDE for database development

Use Familiar Technologies - Tools

Page 42: Azure Data Storage

Use command, distributed transactions, distributed views

Service Broker

Common Language Runtime (CLR)

SQL Agent

SQL Profiler

Native Encryption

Unsupported SQL Server Features

Page 43: Azure Data Storage

Elastic Scale

Page 44: Azure Data Storage

Classic 3-tier enterprise architecture:

Scale out the front ends to multiple instances is easy

Scale the data-tier is more challenging

Web

Role

L

SQL

Worker

Role

Canonical cloud app architecture

Page 45: Azure Data Storage

SQL Database Considerations and Best Practices

Elastic Scale across thousands of databases via custom sharding

Scale out via .NET Client libraries consumed by customer applications to support sharded database pattern

Enables developer and manageability functions

Supports split, merge, and move operations on data

Page 46: Azure Data Storage

Vertical: Scale-up or scale-down

Horizontal: Scale-out or scale-in

Basic

Standard

Premium

Basic Basic Basic Basic Basic Basic

Premium

Standard

Scale out/in

Sca

le u

p/d

ow

n

Scalability options in Azure SQL DB

Page 47: Azure Data Storage

Web

Role

J

SQL

Worker

Role

J

J

Elastic Scale architecture

Page 48: Azure Data Storage

SQL Server VM

Page 49: Azure Data Storage

Run SQL on VM

Run any SQL product on cloud VM

Support for SQL Server, Oracle, MySQL

Ready to go VM images available in the Gallery

Persistent storage using attached disk in blob storage

Has all the benefits and powers of VMs combined with the full features of a SQL Engine

Page 50: Azure Data Storage

SQL Database SQL IaaS

Why (at least) two offerings of SQL in Azure?

Page 51: Azure Data Storage

SQL Database SQL IaaS

Page 52: Azure Data Storage

Other features SQL IaaS supports that SQL Database doesn’t (yet)

Page 53: Azure Data Storage

Microsoft Azure DocumentDB

Page 54: Azure Data Storage

Fully managed, scalable JSON document database service

Page 55: Azure Data Storage

Microsoft Azure Data Services

fully managed, scalable, queryable, schemafree JSON

document database service for modern applications

transactional processing

rich query

managed as a service

elastic scale

internet accessible http/rest

schema-free data model

arbitrary data formats

Page 56: Azure Data Storage

DocumentDB – Reasons to use

Page 57: Azure Data Storage

Ways to work with data

RESTful access methodsFor Create/Read/Update/Delete (CRUD) operations

DocumentDB SQLA query language with SQL-derived syntax

Executing logic in the database

Stored procedures

Triggers

User-defined functions (UDFs)

- Allow extending DocumentDB SQL

All written in JavaScript

Page 58: Azure Data Storage

Azure Search

Page 59: Azure Data Storage

Azure Search

Embed a sophisticated search experience into web and mobile applications without having to worry about the complexities of full-text search and without having to deploy, maintain or manage any infrastructure.

Page 60: Azure Data Storage

Azure Search

Perfect for enterprise cloud developers, cloud software vendors, cloud architects who need a fully-managed search solution.

Page 61: Azure Data Storage

Simple HTTP/JSON API for creating indexes, pushing documents, searching

Keyword search with user-friendly operators (+, -, *, “”, etc.)

Hit highlighting

Faceting (histograms over ranges, typically used in catalog browsing)

Search Functionality

Page 62: Azure Data Storage

Suggestions (auto-complete)

Rich structured queries (filter, select, sort) that combines with search

Scoring profiles to model search result relevance

Geo-spatial support integrated in filtering, sorting and ranking (such as finding all restaurants within 5 KM of your current location)

Search Functionality

Page 63: Azure Data Storage

What are customers doing with Azure Search?

high

high heelshigh topshigh arch

Azure Search doesn’t

provide any UI components

Users expect suggestions, so

Azure Search supports this

Page 64: Azure Data Storage

HDInsight

Page 65: Azure Data Storage

Data size

Access

Updates

Structure

Integrity

Scaling

Relational DB vs. Hadoop

Page 66: Azure Data Storage
Page 67: Azure Data Storage

Distributed Storage

(HDFS)

Query

(Hive)

Distributed Processing

(MapReduce)

OD

BC

Legend■ Core Hadoop

■ Data processing

■ Data Movement

■ Packages

Hadoop ecosystem

Page 68: Azure Data Storage

Hadoop Core +

Hive, Pig, HBase

C#, F#, .NET

Azure Storage (WASB)

Office 365 Power BI

(Excel, PowerQuery,

PowerView,

BI Sites)

World's Data (Azure Data

Marketplace)

HDInsight and Hadoop

ODBCSqoop for SQL

ServerPowerShell

Page 69: Azure Data Storage

Microsoft Azure

The Big Picture

Page 70: Azure Data Storage

The Big Picture

The traditional world:

Page 71: Azure Data Storage

The Big Picture

A modern view:

Page 72: Azure Data Storage

The Big Picture

Microsoft Azure technologies:

Page 73: Azure Data Storage

The Big Picture

Why Use a NoSQL Technology on Azure?

Page 74: Azure Data Storage

The Big Picture

Choosing a Data Technology

Page 75: Azure Data Storage

Resources

Page 76: Azure Data Storage

Resources

Microsoft Azure Essentials: Fundamentals of Azure

Michael S. Collier and Robin E. Shahan

February 2015

246 pages

http://bit.ly/1zRa1UW

Page 77: Azure Data Storage

Resources

• Azure Data Services series by Adarsha Datta

• http://bit.ly/1aTDSBA

• Get Ready for Global Azure Bootcamp

• http://bit.ly/1BkD0Lf

• Azure Documentation Center

• http://azure.microsoft.com/en-us/documentation/

• http://www.hadooponazure.com/

Page 78: Azure Data Storage