31
Level 200 1 st October 2011 SQL Azure-Design Concepts By Geoff Clark MCPD Azure, MCITP 2008 Admin, Dev & BI [email protected]

SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

SQL Azure-Design Concepts

By Geoff Clark

MCPD Azure, MCITP 2008 Admin, Dev & BI

[email protected]

Page 2: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

What is Azure?

Page 3: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

What is Azure?

• More than Virtual Machines – it is a Platform (PaaS) • Pay-As-You-Go • Guaranteed at least three copies of your VM • Modified Server 2008 R2 Enterprise Edition

Page 4: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

What is the Windows Azure Platform?

http://msdn.microsoft.com/en-us/library/dd163896.aspx

Page 5: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

What is the Windows Azure Platform?

http://msdn.microsoft.com/en-us/library/dd163896.aspx

Page 6: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure Compute & Storage

Web Role 1

Multiple Instances

Worker Role 1

Multiple Instances

Azure Storage Blob Table SQL

Local Storage

Queue

Instance Based

Page 7: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

How does SQL Azure fit into Azure storage options?

Page 8: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options

• Blobs - Blocks and Pages • Azure Tables • Queues • Other – local storage, Azure Drive, remote storage

including SQL Server. • SQL Azure

Page 9: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options: Blobs - Blocks and Pages

• Blobs • Large binary data – used for images, videos,

documents • Also used to create NTFS drives • Blobs are organised as either blocks or pages

Page 10: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options: Blobs - Blocks

• These blocks allow parallel activity designed for performance/scalability.

• Block blobs are limited to 200GB in size. Max block is 4MB in size ( x 50,000 blocks).

• blocks can be of different sizes. • Updating blocks is a two stage process

Page 11: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options: Blobs - Pages

• A page blob is collection of pages. • A Page blob and a pages max size 1 TB in multiples

of 512 bytes. • Pages can be randomly uploaded and accessed. • Unlike block blobs, page writes to a page blob are

committed immediately. One step to upload and commit a page blob.

Page 12: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options: Azure Tables

• Storage of structured data • No fixed schema • No Indexes, relationships or

constraints • Different entities can be stored in

same table

Page 13: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options: Azure Tables

Structure • Timestamp • PartitionKey • RowKey • Property Bag of Simple Data Types

Page 14: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options: Azure Tables

• Retrieve All entities, partition key or PartitionKey and RowKey

• Limited ‘server-side’ Filtering • ==, >, <, >=, <=, != • On Booleans &&, ! And ||

• Use ADO.Net Services or Http Rest API Directly

Page 15: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure storage options: Queues

Queues provide reliable and durable message stores for loosely coupled services (akin to MSMQ)

Web Role Worker Role

Queue

Page 16: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

What are the other options?

• Local storage • Azure Drive • Remote storage including

SQL Server.

Page 17: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

SQL Azure

“If your application works today against SQL Express edition and does not make use of some of the more advanced features of SQL Server, then your application should work in the cloud with little or no modification.”

Page 18: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

SQL Azure <? SQL Server

• SQL Provisioning - Wow • Security and Connecting - Pooling • Unavailable Commands – No Surprises • Debugging and tracing - Enough • No DTC – Design Constraint • Size Limits – Design Constraint

Page 19: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

SQL Azure Storage – Design Challenges

Page 20: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

SQL Azure Storage – Design Challenges

• SQL – Size Limits • Costs • Individual VM reliability • Throttling Issues • Backup

Page 21: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

SQL - Size Limits

CREATE DATABASE database_name { (<edition_options> [, ...n]) } <edition_options> ::= { (MAXSIZE = {1 | 5 | 10 | 20 | 30 | 40 | 50} GB) |(EDITION = {'web' | 'business'}) }

Page 22: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

SQL – No DTC

No Distributed Transaction Coordinator (DTC) No cross database Transactions

Page 23: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Costs - Storage

http://www.microsoft.com/windowsazure/pricing-calculator/?campaign=vw-calc

Page 24: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

VM Reliability & Throttling

• Excessive resource usage (5mins) • Connections that have been idle

for 30 minutes or longer • Failover because of server

failures

Page 25: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Missing Commands

• Backup & Restore • Any File Level Commands • Again think SQL Express • MSDN lists supported, partially

supported and not supported commands

http://msdn.microsoft.com/en-us/library/ee336281.aspx

Page 26: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Included DMVs

sys.dm_exec_connections sys.dm_exec_requests sys.dm_exec_sessions sys.dm_tran_database_transactions sys.dm_tran_active_transactions sys.dm_db_partition_stats

http://msdn.microsoft.com/en-us/library/ee336281.aspx

Page 27: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Azure Storage – Design Challenges

Page 28: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

All the New Storage facilities are there basically to help systems scale

out

Page 29: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Solutions

• Large • BASE & Small

• ACID & Large

• Highly ACID

SQL Azure Shard / hybrid /

leave

SQL Azure Tables &

Pages

Tables

Blobs

http://queue.acm.org/detail.cfm?id=1394128

Page 30: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Further Reading

• Azure in Action – Hay & Prince • Microsoft SQL Azure Enterprise Application

Development - Krishnaswamy • Programming Windows Azure - Krishnan • Scalability Rules: 50 Principles for Scaling Web

Sites – Abbott & Fisher

informit.com, manning.com, oreilly.com & packtpub.com

Page 31: SQL Azure-Design Concepts · 2019. 3. 8. · SQL Azure “If your application works today against SQL Express edition and does not make use of some of the more advanced features of

Level 200

1st October 2011

Useful Links

• Azure main site http://www.microsoft.com/windowsazure/

• Windows Azure Storage Team Blog http://blogs.msdn.com/b/windowsazurestorage/archive/2010/03/28/windows-azure-storage-resources.aspx

• SQL Azure Database Concepts http://msdn.microsoft.com/en-us/library/ee336256.aspx

• Port Bridge http://vasters.com/clemensv/CommentView.aspx?guid=3e35d8bd-b755-453f-8c63-1a57c570eb4c

informit.com, manning.com, oreilly.com & packtpub.com