Top Banner
Data storages in Microsoft Azure Andriy Deren CEO, Onlizer/Dreams IT [email protected]
32

GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Apr 16, 2017

Download

Software

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Data storages in Microsoft Azure

Andriy DerenCEO, Onlizer/Dreams [email protected]

Page 2: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Agenda

• Why cloud storages? • Cheap multipurpose NoSQL cloud storage (Azure Cloud Storage)• Cloud-based relational storage (MS SQL Azure)• Document-oriented storage in cloud (Azure DocumentDb)• Fast and furious in cloud (Azure Redis Cache)

Page 3: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Pros/Cons, Usage CasesWhy cloud storages?

Page 4: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Solution search

• When engineer has hummer in hands all problems looks like nails• When engineer has screwdriver in hands all problems looks like screws

Use wrong tool

Use tool wrong way

We are trying to topple a tree with a

sledgehammerWe are trying to

topple a tree with a saw

Page 5: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

First conclusions

• Universal solution - a solution that is equally bad for all tasks.• Specialized solution - well-suited to address only specific tasks.• Best the enemy of the good.

Page 6: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

So when cloud storages are useful?

• On and off (short-time and periodical load)• Fast grow• Unpredictable load• Predictable load• Geo-redundant access• Real-time sync and near 100% transactions success

Page 7: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

General Pros & Cons

Pros• SaaS & PaaS models – lower developer responsibility• Easier management and scale• Transparent work & API models• Predictable cost

Cons• Lower control• Public cloud• Cost

Page 8: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Storages in Microsoft AzureSQL VM SQL Azure Document DB Table Storage Blob Storage

Relational DBMS

Reach query syntax

Transactions support

Service model

Elastic scale

Schema less

Access via HTTP(S)

Any data formats

Page 9: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Cheap multipurpose NoSQL storageAzure Storage

Page 10: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Azure Storage• Exposed via RESTful web services• Scalable, durable, available globally• Only pay for what the service uses

Page 11: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Storage SDKs on many languages

C#/.NET Python Ruby

Perl Node.JS Java

PHP Erlang Common LISP

Objective-C

Page 12: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Storage security

• HTTP or HTTPS• Two independent 512bit symmetric master keys• Shared access signatures for more granular access

Page 13: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Storage artifacts

Blobs Drives Queues

Tables Files

Page 14: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Blob storage concepthttps://contoso.blob.core.windows.net/image/pic01.jpg

Block/Page

Blob

Container

Account contoso

image

pic01.jpg

block01 block02

pic02.jpg

video

mov01.avi

page01 page02

Page 15: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Blob storage operations

• Get• Put• Delete• Copy• Snapshot• Lease

Page 16: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

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

blockId1,…,blockIdN);

TheBlob.wmv

Bloc

k Id

1

Bloc

k Id

2

Bloc

k Id

3

Bloc

k Id

N

BenefitEfficient continuation and retryParallel and out of order upload of blocks

Page 17: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Page blobs0

10 GB

512

1024

1536

2048

2560

10 GB Address Space

Page 18: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Table storage concept

Entity

Table

Account contoso

users

FName=Bob

LName=Smith

FName=Inga

Phone=123

groups

Name=Admin

Page 19: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Entity details• Entity can have up to 255 properties–Up to 1MB per entity

• Mandatory Properties for every entity–PartitionKey & RowKey (only indexed properties)•Uniquely identifies an entity•Defines the sort order

–Timestamp •Optimistic Concurrency•Exposed as an HTTP Etag

• No fixed schema for other properties–Each property is stored as a <name, typed value> pair–No schema stored for a table–Properties can be the standard .NET types: String, binary, bool, DateTime, GUID, int and double

Page 20: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Entity details• Entity Locality–Entities in the same partition will be stored together–Efficient querying and cache locality–Endeavour to include partition key in all queries

• Entity Group Transactions–Atomic multiple Insert/Update/Delete in the same partition in a single transaction

• Table Scalability–Target throughput – 2 000 tps/partition, 20 000 tps/account–Azure monitors usage patterns of partitions–Automatically load balance partitions–Each partition can be served by a different storage node–Scale to meet traffic needs of your table

Page 21: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Data operations

• Create• Query• Delete

Table operations Entity operations• Insert• Update• Merge• Replace• Upsert• Query• Delete

Page 22: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Cloud-based relational storageMicrosoft SQL Azure

Page 23: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Relational DBMS as a ServiceService

Resources management

Routing

Platform

Infrastructure

Billing & monitoring

SQL Server

Database Management

General Management

Page 24: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

SQL Azure Scale

Page 25: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Document-oriented storage in cloudAzure DocumentDb

Page 26: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Azure DocumentDb

NoSQL database solution designed “from scratch” for better JavaScript and

JSON support on data-engine level.

Page 27: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Azure DocumentDb

Transactions support Service model Schema less

Elastic scale Access via HTTP(S) Rich query syntax

Page 28: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Azure DocumentDb Conception

Page 29: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Azure DocumentDb access via HTTP

POST https://<REST URI>/docs HTTP/1.1...x-ms-documentdb-isquery: TrueContent-Type: application/query+json

{ "query": "SELECT * FROM Families f WHERE f.id = @familyId", "parameters": [ {"name": "@familyId", "value": "AndersenFamily"} ]}

Page 30: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Fast and furious in cloudAzure Redis Cache Service

Page 31: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

#dfua

Azure Redis Cache

• Simple but powerful Key/Value storage• Service model• Easy scale to cluster• Monitoring and metrics• Web-based CLI• Persistent save (Premium)

Page 32: GDG Ternopil TechTalks Web #1 2015 - Data storages in Microsoft Azure

Thank you!Questions?

@dralligierihttps://www.facebook.com/dalligieriwww.onlizer.com