a complete guide to azure storage

30
A complete Guide to Windows Azure Storage Himanshu Sahu Mindfire Solution himanshus@mindfiresolutions. com

Upload: himanshussahu

Post on 18-Aug-2015

19 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: A complete guide to azure storage

A complete Guide to Windows Azure Storage

Himanshu SahuMindfire [email protected]

Page 2: A complete guide to azure storage

Windows Azure Storage

Windows Azure Storage (WAS) is a scalable cloud storagesystem that has been in production since November 2008. It is used inside Microsoft for applications such as social networking search, serving video, music and game content, managing medical records, and more.

Page 3: A complete guide to azure storage

Windows Azure Storage

Cloud Storage – Anywhere and anytime Access

Durable and higly Available

Massively Scalable – Easily Build “internet-scale” application

Pay for what you use

Exlopsed via REST API and easy to use client libraries in .NET, JAVA, Node.js, etc

Page 4: A complete guide to azure storage

Windows Azure StorageAbstraction

Blobs

Tables

Queue

Page 5: A complete guide to azure storage

Windows Azure Storage

Blob

Simple Interface to store and retrieve large amount of unstructured data like files, images, videos, etc

A single blob can be hundreds of gigabytes in size, and a single storage account can contain up to 200TB of blobs if it was created on June 8th, 2012, or later and storage accounts created prior to that date can contain up to 100TB of blobs.

Page 6: A complete guide to azure storage

Windows Azure Storage

Blob

Concept

Page 7: A complete guide to azure storage

Windows Azure StorageBlob

Concept

Storage Account – All access to Windows Azure Storage is done through a storage account.This is the highest level of the namespace for accessing blobsAn account can have many Blob Containers

Blob Container – A container provides a grouping of a set of blobs. The container name is scoped by the account.Sharing policies are set at the container level, where a container can be set to private or to be publicly accessible. The ability to list all of the blobs within the container is also provided.

Page 8: A complete guide to azure storage

Windows Azure Storage

Blob

Concept

Blob – Blobs are stored in and scoped by Blob Containers. Blobs can have meta data associated with them, which are <name, value> pairs, and they are up to 8KB in size per blob. The blob metadata can be set and retrieved separately from the blob data bits.

URL format- Blobs are addressable using the following URL format: http://<storageaccount>.blob.core.windows.net/<container>/<blob>

Page 9: A complete guide to azure storage

Windows Azure StorageBlob

Concept

<configuration> <appSettings> <add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=[AccountName];AccountKey=[AccountKey]" /> </appSettings></configuration>

Page 10: A complete guide to azure storage

Windows Azure Storage

Blob

Common uses of Blob storage:

Serving images or documents directly to a browser

Storing files for distributed access

Streaming video and audio

Performing secure backup and disaster recovery

Storing data for analysis by an on-premises or Windows Azure-hosted service

Page 11: A complete guide to azure storage

Windows Azure Storage

Blob

Practical Scenarios where we use Blobs:

Enterprise document store, logs, etc.

Social sharing like photos, videos, blogs.

Backups – file, database, devices, computer, etc.

Page 12: A complete guide to azure storage

Windows Azure Storage

Table

NoSQL datastore which accepts authenticated calls from inside and outside the Windows Azure cloud.

Used for storing structured, non-relational data.

Page 13: A complete guide to azure storage

Windows Azure Storage

Table

Concept

Page 14: A complete guide to azure storage

Windows Azure Storage

Table

Concept

Storage Account – All access to Windows Azure Storage is done through a storage account.This is the highest level of the namespace for accessing tablesAn account can have many Tables

Table – contains a set of entities. Table names are scoped by the account. An application may create many tables within a storage account.

Page 15: A complete guide to azure storage

Windows Azure Storage

Table

Concept

Entity (Row) – Entities (an entity is analogous to a "row") are the basic data items stored in a table. An entity contains a set of properties. Each table has two properties, “PartitionKey and RowKey”, which form the unique key for the entity.

Combined size of all of the properties in an entity cannot exceed 1MB. This size includes the size of the property names as well as the size of the property values or their types.

Page 16: A complete guide to azure storage

Windows Azure StorageTable

Concept

Property (Column) – A property is a name-value pair.

This represents a single value in an entity. Property names are case sensitive.

An entity can hold up to 255 properties. Each entity also has 3 system properties that specify a partition key, a row key, and a timestamp.

Page 17: A complete guide to azure storage

Windows Azure StorageTable

Concept

PartitionKey – The first key property of every table. The system uses this key to automatically distribute and load balance the table’s entities over many servers.

RowKey – A second key property for the table. This is the unique ID of the entity within the partition it belongs to. The PartitionKey combined with the RowKey uniquely identifies an entity in a table.

Timestamp – Every entity has a version maintained by the system. This is used for optimistic concurrency.

Page 18: A complete guide to azure storage

Windows Azure Storage

Table

Common uses of Table storage:

Storing TBs of structured data capable of serving web scale applications

Storing datasets that don't require complex joins, foreign keys, or stored procedures and can be denormalized for fast access

Quickly querying data using a clustered index

Page 19: A complete guide to azure storage

Windows Azure Storage

Queue

Scalable, reliable and persistent messaging system that enables building work flow application or decouple components.

Page 20: A complete guide to azure storage

Windows Azure Storage

Queue

Concept

Page 21: A complete guide to azure storage

Windows Azure Storage

Queue

Concept

Storage Account – All access to Windows Azure Storage is done through a storage account.

This is the highest level of the namespace for accessing queues

An account can have many Queues

Page 22: A complete guide to azure storage

Windows Azure Storage

Queue

Concept

Queue – A queue contains many messages. The queue name is scoped by the account.

There is no limit on the number of messages stored in a queue (the only limit is the 200TB size limit on the storage account).A message is stored for at most a week. The system will garbage collect the messages that are more than a week old.Queues can have metadata associated with them. Metadata is in the form of <name, value> pairs, and they are up to 8KB in size per queue.

Page 23: A complete guide to azure storage

Windows Azure Storage

Queue

Concept

Messages – Messages are stored in queues. Each message can be up to 8KB in size. To store larger data, one can store the data in Azure Blob store or Azure Table store, and then store the blob/entity name in the message. Note that when you put a message into the store, the message data can be binary. But when you get the messages back from the store, the response is in XML format, and the message data is returned as base64 encoded.

Page 24: A complete guide to azure storage

Windows Azure Storage

Queue

Concept

Where Azure Queues differ from traditional queue implementations is that it is not a FIFO container. This means, the message will remain in the queue until explicitly deleted. If a message is read by one process, it will be marked as invisible to other processes for a variable time period, which defaults to 30 seconds, and can be no more than 2 hours; if the message hasn't been deleted by then, it will be returned to the queue and will be available for processing again. Because of this behavior, there is also no guarantee that messages will be in any particular order.

Page 25: A complete guide to azure storage

Windows Azure Storage

Queue

Concept

Messages – Messages are stored in queues. Each message can be up to 8KB in size. To store larger data, one can store the data in Azure Blob store or Azure Table store, and then store the blob/entity name in the message. Note that when you put a message into the store, the message data can be binary. But when you get the messages back from the store, the response is in XML format, and the message data is returned as base64 encoded.

Page 26: A complete guide to azure storage

Windows Azure Storage

Queue

Common uses of Queue storage:

Creating a backlog of work to process asynchronously

Inter-Role Communication

Process/Work Flow

Page 27: A complete guide to azure storage

Windows Azure Storage

Windows Azure Storage Scalability and Performance Targets

Page 28: A complete guide to azure storage

Resources

http://www.windowsazure.com/en-us/documentation/services/storage/

http://www.windowsazure.com/en-us/develop/net/how-to-guides/table-services/

http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/

http://blogs.msdn.com/b/windowsazurestorage/archive/2010/05/10/windows-azure-storage-abstractions-and-their-scalability-targets.aspx

Page 29: A complete guide to azure storage

Questions?

Page 30: A complete guide to azure storage

Thank you!