Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows Azure Storage Name Title Organization.

Similar presentations


Presentation on theme: "Windows Azure Storage Name Title Organization."— Presentation transcript:

1 Windows Azure Storage Name Title Organization

2 Agenda Windows Azure Storage Blob Storage Drives Tables Queues
Slide Objectives: Introduce the topics that will be covered in this session VALUE PROP Speaking Points: Notes:

3 Windows Azure Storage Storage in the Cloud
Scalable, durable, and available Anywhere at anytime access Only pay for what the service uses Exposed via RESTful Web Services Use from Windows Azure Compute Use from anywhere on the internet Slide Objectives: Define the Windows Azure storage and the great benefits this service provides Speaking Points: The Windows Azure storage services provide storage for binary and text data, messages, and structured data in Windows Azure Scalable Durable Available Cost REST Geo-redundant storage provides the highest level of storage durability by seamlessly replicating your data to a secondary location within the same region Locally redundant storage provides highly durable and available storage within a single location. Microsoft monitors the service, provides patches, handles scaling, and does the other work needed to keep the service available. Notes:

4 Windows Azure Storage Account User specified globally unique account name
Can choose geo-location to host storage account: US Europe Asia Northern Europe North Central US Western Europe West US East Asia East US Slide Objective Understand a Windows Azure storage account Speaking notes A storage account gives your applications access to Windows Azure Blob, Table, and Queue services located in a geographic region. You need a storage account to use Windows Azure storage. The storage account represents the highest level of the namespace for accessing the storage services. A storage account can contain up to 100 TB of blob, queue, and table data. You can create up to five storage accounts for your Windows Azure subscription. A Windows Azure subscription contains storage account Can explicitly geo-locate to a sub region or set affinity with other services Can enable CDN at the account level (means that public containers will be retrievable via the CDN URL) South Central US South East Asia

5 Windows Azure Storage Account
Can CDN Enable Account Blobs delivered via 24 global CDN nodes Can co-locate storage account with compute account Explicitly or using affinity groups Accounts have two independent 512 bit shared secret keys 100 TBs per account Slide Objective Understand a Windows Azure storage account VALUE PROP Speaking notes The Windows Azure Content Delivery Network (CDN) offers developers a global solution for delivering high-bandwidth content by caching blobs and static content of compute instances at physical nodes in the United States, Europe, Asia, Australia and South America. A Windows Azure subscription contains storage accounts Can explicitly geo-locate to a sub region or set affinity with other services Can enable CDN at the account level (means that public containers will be retrievable via the CDN URL) 100 TBs per account means a lot of storage for very little cost Notes You should change the access keys to your storage account periodically to help keep your storage connections more secure. Two access keys are assigned to enable you to maintain connections to the storage account using one access key while you regenerate the other access key.

6 New Features Geo-Replication Storage Analytics
Logs: Provide trace of executed requests for your storage accounts Metrics: Provide summary of key capacity and request statistics for Blobs, Tables, and Queues Improved HTTP headers for Blobs Slide Objectives: Explain the new features recently added to Windows Azure storage. VALUE PROP Recently added features provide increased functionality and value to Azure storage. Speaking Points: Shared Access Signatures (Signed URLs) for Tables and Queues – similar to the Shared Access Signature feature previously available for Blobs, this allows account owners to issue URL access to specific resources such as tables, table ranges, queues, blobs and containers while specifying granular sets of permissions. In addition, there are some smaller improvements to Shared Access Signatures for Blobs Expanded Blob Copy – For Blobs, we now support copying blobs between storage accounts and copy blob (even within accounts) is performed as an asynchronous operation. This is available in the new version, but will only work if the destination storage account was created on or after June 7, Of course, Copy Blob operations within the same account will continue to work for all accounts Improved Blob Leasing – Leasing is now available for blob containers, and allows infinite lease duration. In addition, lease durations between seconds are also supported. Changing the lease id (in order to rotate the lease-id across your components) is now supported Introducing Locally Redundant Storage - Storage users are now able turn off geo-replication by choosing Locally Redundant Storage (LRS). LRS provides highly durable and available storage within a single location (sub region). Choosing Geo Redundant Storage or Locally Redundant Storage – By default storage accounts are configured for Geo Redundant Storage (GRS), meaning that Table and Blob data is replicated both within the primary location and also to a location hundreds of miles away (geo-replication). As detailed in this blog post, using LRS may be preferable in certain scenarios, and is available at a 23-34% discount compared to GRS. The price of GRS remains unchanged. Please note that a one-time bandwidth charge will apply if you choose to re-enable GRS after switching to LRS. Configuration of Storage Analytics – While our analytics features (metrics and logging) have been available since last summer, configuring them required the user to call the REST API. In the new management portal, users can easily configure these features. Monitoring Storage Metrics – Storage users can now also monitor any desired set of metrics tracked in your account via the management portal Notes:

7 Storage in the Development Fabric
Provides a local “Mock” storage Emulates storage in cloud Allows offline development Requires SQL Express 2005/ or above There are some differences between Cloud and Dev Storage: A good approach for developers: To test pre-deployment, push storage to the cloud first Use Dev Fabric for compute connect to cloud hosted storage Finally, move compute to the cloud Slide Objective Understand the Development Storage Service VALUE PROP Speaking notes Client side simulator of storage in the cloud. Allows completely disconnected (e.g. while travelling on a plane) development of Windows Azure apps Can consume just like Cloud storage- from Development Fabric, from another application running locally Is locked down so that it cannot be called from off the box If you need this capability run a reverse proxy on the dev machine Can use CSRun to start and stop service More on this in Day 3 Uses a single fixed account. The account name and key are always the same Anyone memorized the Account key yet? Eby8vd….. Notes The Windows® Azure™ SDK development environment includes development storage, a utility that simulates the Blob, Queue, and Table services available in the cloud. If you are building a hosted service that employs storage services or writing any external application that calls storage services, you can test locally against development storage. The development storage utility provides a user interface to view the status of the local storage services and to start, stop, and reset them. This topic contains the following subtopics:

8 The Storage Client API In this presentation we’ll cover the underlying RESTful API Can call these from any HTTP client e.g. Flash, Silverlight, etc… Client API from SDK Microsoft.WindowsAzure.StorageClient Provides a strongly typed wrapper around REST services Slide Objective Discuss the underlying REST API Discuss the Client API in the SDK- that provides convenient way to call REST service Speaking notes Windows Azure Storage is exposed as RESTdful web service Can be called from any HTTP client For .NET developers Microsoft ships a client SDK Managed code library for calling the RESTful services Hides many of the complexities of the service Auto retries Also provide a lower level Protocol library with useful helper tools Important to understand the fundamentals of the REST APIs. This deck discusses the REST APIs Hands on lab demonstrates the SDK

9 Storage Libraries in Many Languages
C#/.NET Python Ruby Perl JavaScript (Node) Java PHP Erlang Common LISP Objective-C C#/VB on Windows Phone 7 Slide Objectives: Explain the different Storage Libraries and languages that can be used to work with Windows Azure Storage. VALUE PROP Programmatic access to the Blob, Queue, and Table services is available via the Windows Azure client libraries and the Windows Azure storage services REST API. Speaking Points: Windows Azure is an open cloud platform that enables you to quickly build, deploy and manage applications across a global network of Microsoft-managed datacenters.You can build applications using any language, tool or framework. Notes:

10 Storage Security Windows Azure Storage provides simple security for calls to storage service HTTPS endpoint Digitally sign requests for privileged operations Two 512bit symmetric keys per storage account Can be regenerated independently More granular security via Shared Access Signatures Slide Objective Describe security principles Speaking notes Simple shared secret security Can use HTTP or HTTPS to access Use HTTP for public content Use HTTPS for secure content (i.e. where using es or Shared Access Signatures) Two 512bit keys Keys used to sign priv requests Two keys supports rolling of keys E.g. if one key is compromised can use the second key while first is regenerated More on SAS’s soon Notes More on Security on Day 3

11 Windows Azure Storage Abstractions
Blobs Simple named files along with metadata for the file. Drives Durable NTFS volumes for Windows Azure applications to use. Based on Blobs. Tables Structured storage. A table is a set of entities; an entity is a set of properties. Queues Reliable storage and delivery of messages for an application. Slide Objectives Understand each of the storage types at a high level Speaker Notes The Windows Azure storage services provide storage for binary and text data, messages, and structured data in Windows Azure. The storage services include: The Blob service, for storing binary and text data The Queue service, for storing messages that may be accessed by a client The Table service, for structured storage for non-relational data Windows Azure drives, for mounting an NTFS volume accessible to code running in your Windows Azure service Programmatic access to the Blob, Queue, and Table services is available via the Windows Azure Managed Library and the Windows Azure storage services REST API Notes

12 Blob Storage

13 Blob Storage Concepts Account Container Blob Pages/ Blocks
Account Container Blob Pages/ Blocks PIC01.JPG images Block/Page PIC02.JPG contoso Slide Objectives Understand the hierarchy of Blob storage Speaker Notes The Blob service provides storage for entities, such as binary files and text files. The REST API for the Blob service exposes two resources: Containers Blobs. A container is a set of blobs; every blob must belong to a container. The Blob service defines two types of blobs: Block blobs, which are optimized for streaming. Page blobs, which are optimized for random read/write operations and which provide the ability to write to a range of bytes in a blob. Blobs can be read by calling the Get Blob operation. A client may read the entire blob, or an arbitrary range of bytes. Block blobs less than or equal to 64 MB in size can be uploaded by calling the Put Blob operation. Block blobs larger than 64 MB must be uploaded as a set of blocks, each of which must be less than or equal to 4 MB in size. Page blobs are created and initialized with a maximum size with a call to Put Blob. To write content to a page blob, you call the Put Page operation. The maximum size currently supported for a page blob is 1 TB. Notes Using the REST API for the Blob service, developers can create a hierarchical namespace similar to a file system. Blob names may encode a hierarchy by using a configurable path separator. For example, the blob names MyGroup/MyBlob1 and MyGroup/MyBlob2 imply a virtual level of organization for blobs. The enumeration operation for blobs supports traversing the virtual hierarchy in a manner similar to that of a file system, so that you can return a set of blobs that are organized beneath a group. For example, you can enumerate all blobs organized under MyGroup/. Block/Page videos VID1.AVI

14 Blob Details Main Web Service Operations PutBlob GetBlob DeleteBlob
CopyBlob SnapshotBlob LeaseBlob Main Web Service Operations Slide Objectives Understand the hierarchy of Blob storage Speaker Notes Put Blob - Creates a new blob or replaces an existing blob within a container. Get Blob - Reads or downloads a blob from the system, including its metadata and properties. Delete Blob - Deletes a blob Copy Blob - Copies a source blob to a destination blob within the same storage account. SnapShot Blob - The Snapshot Blob operation creates a read-only snapshot of a blob. Lease Blob - Establishes an exclusive one-minute write lock on a blob. To write to a locked blob, a client must provide a lease ID. Using the REST API for the Blob service, developers can create a hierarchical namespace similar to a file system. Blob names may encode a hierarchy by using a configurable path separator. For example, the blob names MyGroup/MyBlob1 and MyGroup/MyBlob2 imply a virtual level of organization for blobs. The enumeration operation for blobs supports traversing the virtual hierarchy in a manner similar to that of a file system, so that you can return a set of blobs that are organized beneath a group. For example, you can enumerate all blobs organized under MyGroup/. Notes The Blob service provides storage for entities, such as binary files and text files. The REST API for the Blob service exposes two resources: containers and blobs. A container is a set of blobs; every blob must belong to a container. The Blob service defines two types of blobs: Block blobs, which are optimized for streaming. This type of blob is the only blob type available with versions prior to Page blobs, which are optimized for random read/write operations and which provide the ability to write to a range of bytes in a blob. Page blobs are available only with version Containers and blobs support user-defined metadata in the form of name-value pairs specified as headers on a request operation. Using the REST API for the Blob service, developers can create a hierarchical namespace similar to a file system. Blob names may encode a hierarchy by using a configurable path separator. For example, the blob names MyGroup/MyBlob1 and MyGroup/MyBlob2 imply a virtual level of organization for blobs. The enumeration operation for blobs supports traversing the virtual hierarchy in a manner similar to that of a file system, so that you can return a set of blobs that are organized beneath a group. For example, you can enumerate all blobs organized under MyGroup/. A block blob may be created in one of two ways. Block blobs less than or equal to 64 MB in size can be uploaded by calling the Put Blob operation. Block blobs larger than 64 MB must be uploaded as a set of blocks, each of which must be less than or equal to 4 MB in size. A set of successfully uploaded blocks can be assembled in a specified order into a single contiguous blob by calling Put Block List. The maximum size currently supported for a block blob is 200 GB. Page blobs are created and initialized with a maximum size with a call to Put Blob. To write content to a page blob, you call the Put Page operation. The maximum size currently supported for a page blob is 1 TB. Blobs support conditional update operations that may be useful for concurrency control and efficient uploading. Blobs can be read by calling the Get Blob operation. A client may read the entire blob, or an arbitrary range of bytes. For the Blob service API reference, see Blob Service API.

15 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 Associate Metadata with Blob Slide Objectives Understand the hierarchy of Blob storage Speaker Notes Put Blob - Creates a new blob or replaces an existing blob within a container. Get Blob - Reads or downloads a blob from the system, including its metadata and properties. Delete Blob - Deletes a blob Copy Blob - Copies a source blob to a destination blob within the same storage account. SnapShot Blob - The Snapshot Blob operation creates a read-only snapshot of a blob. Lease Blob - Establishes an exclusive one-minute write lock on a blob. To write to a locked blob, a client must provide a lease ID. Using the REST API for the Blob service, developers can create a hierarchical namespace similar to a file system. Blob names may encode a hierarchy by using a configurable path separator. For example, the blob names MyGroup/MyBlob1 and MyGroup/MyBlob2 imply a virtual level of organization for blobs. The enumeration operation for blobs supports traversing the virtual hierarchy in a manner similar to that of a file system, so that you can return a set of blobs that are organized beneath a group. For example, you can enumerate all blobs organized under MyGroup/. Notes The Blob service provides storage for entities, such as binary files and text files. The REST API for the Blob service exposes two resources: containers and blobs. A container is a set of blobs; every blob must belong to a container. The Blob service defines two types of blobs: Block blobs, which are optimized for streaming. This type of blob is the only blob type available with versions prior to Page blobs, which are optimized for random read/write operations and which provide the ability to write to a range of bytes in a blob. Page blobs are available only with version Containers and blobs support user-defined metadata in the form of name-value pairs specified as headers on a request operation. Using the REST API for the Blob service, developers can create a hierarchical namespace similar to a file system. Blob names may encode a hierarchy by using a configurable path separator. For example, the blob names MyGroup/MyBlob1 and MyGroup/MyBlob2 imply a virtual level of organization for blobs. The enumeration operation for blobs supports traversing the virtual hierarchy in a manner similar to that of a file system, so that you can return a set of blobs that are organized beneath a group. For example, you can enumerate all blobs organized under MyGroup/. A block blob may be created in one of two ways. Block blobs less than or equal to 64 MB in size can be uploaded by calling the Put Blob operation. Block blobs larger than 64 MB must be uploaded as a set of blocks, each of which must be less than or equal to 4 MB in size. A set of successfully uploaded blocks can be assembled in a specified order into a single contiguous blob by calling Put Block List. The maximum size currently supported for a block blob is 200 GB. Page blobs are created and initialized with a maximum size with a call to Put Blob. To write content to a page blob, you call the Put Page operation. The maximum size currently supported for a page blob is 1 TB. Blobs support conditional update operations that may be useful for concurrency control and efficient uploading. Blobs can be read by calling the Get Blob operation. A client may read the entire blob, or an arbitrary range of bytes. For the Blob service API reference, see Blob Service API.

16 Blob Details Blob always accessed by name
Can include ‘/‘ or other delimeter in name e.g. /<container>/myblobs/blob.jpg Blob always accessed by name Slide Objectives Understand the hierarchy of Blob storage Speaker Notes Put Blob - Creates a new blob or replaces an existing blob within a container. Get Blob - Reads or downloads a blob from the system, including its metadata and properties. Delete Blob - Deletes a blob Copy Blob - Copies a source blob to a destination blob within the same storage account. SnapShot Blob - The Snapshot Blob operation creates a read-only snapshot of a blob. Lease Blob - Establishes an exclusive one-minute write lock on a blob. To write to a locked blob, a client must provide a lease ID. Using the REST API for the Blob service, developers can create a hierarchical namespace similar to a file system. Blob names may encode a hierarchy by using a configurable path separator. For example, the blob names MyGroup/MyBlob1 and MyGroup/MyBlob2 imply a virtual level of organization for blobs. The enumeration operation for blobs supports traversing the virtual hierarchy in a manner similar to that of a file system, so that you can return a set of blobs that are organized beneath a group. For example, you can enumerate all blobs organized under MyGroup/. Notes The Blob service provides storage for entities, such as binary files and text files. The REST API for the Blob service exposes two resources: containers and blobs. A container is a set of blobs; every blob must belong to a container. The Blob service defines two types of blobs: Block blobs, which are optimized for streaming. This type of blob is the only blob type available with versions prior to Page blobs, which are optimized for random read/write operations and which provide the ability to write to a range of bytes in a blob. Page blobs are available only with version Containers and blobs support user-defined metadata in the form of name-value pairs specified as headers on a request operation. Using the REST API for the Blob service, developers can create a hierarchical namespace similar to a file system. Blob names may encode a hierarchy by using a configurable path separator. For example, the blob names MyGroup/MyBlob1 and MyGroup/MyBlob2 imply a virtual level of organization for blobs. The enumeration operation for blobs supports traversing the virtual hierarchy in a manner similar to that of a file system, so that you can return a set of blobs that are organized beneath a group. For example, you can enumerate all blobs organized under MyGroup/. A block blob may be created in one of two ways. Block blobs less than or equal to 64 MB in size can be uploaded by calling the Put Blob operation. Block blobs larger than 64 MB must be uploaded as a set of blocks, each of which must be less than or equal to 4 MB in size. A set of successfully uploaded blocks can be assembled in a specified order into a single contiguous blob by calling Put Block List. The maximum size currently supported for a block blob is 200 GB. Page blobs are created and initialized with a maximum size with a call to Put Blob. To write content to a page blob, you call the Put Page operation. The maximum size currently supported for a page blob is 1 TB. Blobs support conditional update operations that may be useful for concurrency control and efficient uploading. Blobs can be read by calling the Get Blob operation. A client may read the entire blob, or an arbitrary range of bytes. For the Blob service API reference, see Blob Service API.

17 Blob Containers Multiple Containers per Account Blob Container
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 Slide Objective Understand containers Speaker Notes Account can contain unlimited number of containers Root container useful when serving Silverlight and flash out of Blob storage. May need to store Cross domain access policy files in root of the domain Metadata is up to 8KB of name value pairs per container Notes A root container serves as a default container for your storage account. A storage account may have one root container. The root container must be explicitly created and must be named $root. A blob stored in the root container may be addressed without referencing the root container name, so that a blob can be addressed at the top level of the storage account hierarchy. For example, you can now reference a blob that resides in the root container in the following manner:

18 Enumerating Blobs GET Blob operation takes parameters Prefix Delimiter
Include= (snapshots, metadata etc…) 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 GET <Blob>Tents/PalaceTent.wmv</Blob> <Blob>Tents/ShedTent.wmv</Blob> Slide Objective Understand basics of listing blobs in a container Speaker Notes The List Blobs operation enumerates the list of blobs under the specified container. Can include uncommitted Blobs- see discussion on Blocks and Block Lists Can include snapshots Notes

19 Pagination Large lists of Blobs can be paginated
Either set maxresults or; Exceed default value for maxresults (5000) <Blob>Canoes/Whitewater.jpg</Blob> <Blob>Canoes/Flatwater.jpg</Blob> <NextMarker>MarkerValue</NextMarker> &marker=MarkerValue <Blob>Canoes/Hybrid.jpg</Blob> Slide Objective Understand pagination when listing blobs Speaker Notes Reponses over multiple pages return a marker value This marker is sent to get subsequent page Notes

20 Tour of the Blob Service
demo No specific demo identified. Use the MMC or MyAzureStorage.com or Visual Studio to interact with blob storage.

21 Two Types of Blobs Under the Hood
Block Blob Targeted 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 Blob Targeted 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 Slide Objective Understand different blob types Speaker Notes Block blobs are comprised of blocks, each of which is identified by a block ID. You create or modify a block blob by uploading a set of blocks and committing them by their block IDs. If you are uploading a block blob that is no more than 64 MB in size, you can also upload it in its entirety with a single Put Blob operation. When you upload a block to Windows Azure using the Put Block operation, it is associated with the specified block blob, but it does not become part of the blob until you call the Put Block List operation and include the block's ID. The block remains in an uncommitted state until it is specifically committed. Writing to a block blob is thus always a two-step process. Each block can be a maximum of 4 MB in size. The maximum size for a block blob in version is 200 GB, or up to 50,000 blocks. Page blobs are a collection of pages. A page is a range of data that is identified by its offset from the start of the blob. To create a page blob, you initialize the page blob by calling Put Blob and specifying its maximum size. To add content to or update a page blob, you call the Put Page operation to modify a page or range of pages by specifying an offset and range. All pages must align 512-byte page boundaries. Unlike writes to block blobs, writes to page blobs happen in-place and are immediately committed to the blob. The maximum size for a page blob is 1 TB. A page written to a page blob may be up to 1 TB in size but will typically be much smaller Notes

22 Uploading a Block Blob Uploading a large blob THE BLOB Benefit
blobName = “TheBlob.wmv”; PutBlock(blobName, blockId1, block1Bits); PutBlock(blobName, blockId2, block2Bits); ………… PutBlock(blobName, blockIdN, blockNBits); PutBlockList(blobName, blockId1,…,blockIdN); THE BLOB 10 GB Movie Block Id 1 Block Id 2 Block Id 3 Block Id N Benefit Efficient continuation and retry Parallel and out of order upload of blocks Slide Objective Understand uploading a block blob VALUE PROP Block blobs let you upload large blobs efficiently. Block blobs are comprised of blocks, each of which is identified by a block ID. Speaking notes When you upload a block to a blob in your storage account, it is associated with the specified block blob, but it does not become part of the blob until you commit a list of blocks that includes the new block's ID. New blocks remain in an uncommitted state until they are specifically committed or discarded. Writing a block does not update the last modified time of an existing blob. With a block blob, you can upload multiple blocks in parallel to decrease upload time. Each block can include an MD5 hash to verify the transfer, so you can track upload progress and re-send blocks as needed. You can upload blocks in any order, and determine their sequence in the final block list commitment step. Notes TheBlob.wmv TheBlob.wmv Windows Azure Storage

23 Page Blob – Random Read/Write
Create MyBlob Specify Blob Size = 10 Gbytes Sparse storage - Only charged for pages with data stored in them Fixed Page Size = 512 bytes Random 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 bytes Next 512 bytes are data stored in [1536,2048) 512 1024 1536 2048 2560 10 GB Address Space Slide Objective Understand page blob VALUE PROP Page blobs are a collection of 512-byte pages optimized for random read and write operations. Speaking notes The maximum size for a page blob is 1 TB. To create a page blob, you initialize the page blob and specify the maximum size the page blob will grow. To add or update the contents of a page blob, you write a page or pages by specifying an offset and a range that align to 512-byte page boundaries. A write to a page blob can overwrite just one page, some pages, or up to 4 MB of the page blob. Writes to page blobs happen in-place and are immediately committed to the blob. Notes 10 GB

24 Shared Access Signatures
Fine grain access rights to blobs and containers Sign URL with storage key – permit elevated rights Revocation Use short time periods and re-issue Use container level policy that can be deleted Two broad approaches Ad-hoc Policy based Slide Objective Introduce Shared Access Signatures Speaker Notes Shared Access Signatures provide access rights to containers and blobs at a more granular level than by simply setting a container’s permissions Grant users access to a specific blob or to any blob within a specified container for a specified period of time. Specify what operations a user may perform on a blob that's accessible via a Shared Access Signature. Use HTTPS to protect the signature (it is like a short dated password) Two approaches Ad-hoc Use for very short dated single use scenarios Policy based Use for longer dated revocable permission sets Always endeavour to use Least Permission set possible Notes

25 Ad Hoc Signatures Create Short Dated Shared Access Signature Use case
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 Silverlight client to upload to container Slide Objective Understand Ad-Hoc Shared Access signatures Speaker Notes Ad-hoc Use for very short dated single use scenarios Include all permissions and expiry in the signed URL Can only revoke by deleting the blob or waiting for expiry Use very short dated URLs Notes sr=c&st= T08:20Z&se= T08:30Z&sp=w &sig= dD80ihBh5jfNpymO5Hg1IdiJIEvHcJpCMiCMnN%2fRnbI%3d

26 Policy Based Signatures
Create 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 sr=c&si=MyUploadPolicyForUserID12345 &sig=dD80ihBh5jfNpymO5Hg1IdiJIEvHcJpCMiCMnN%2fRnbI%3d Slide Objective Understand Ad-Hoc Shared Access signatures Speaker Notes Policy Based Points to a Container level policy User where want a longer dated permission with ability to revoke Include all permissions and expiry in the signed URL Can only revoke by deleting the blob or waiting for expiry Use very short dated URLs Notes

27 Content Delivery Network (CDN)
High-bandwidth global blob content delivery 24 locations globally (US, Europe, Asia, Australia and South America), and growing Same experience for users no matter how far they are from the geo-location where the storage account is hosted Blob service URL vs. CDN URL: Windows Azure Blob URL: Windows Azure CDN URL: Custom Domain Name for CDN: Slide Objectives Understand basic concept of a CDN Understand at a high level how Windows Azure CDN works Speaker Notes The Windows Azure CDN provides edge nodes around the world Data stored in CDN enabled storage accounts is retrieved from the origin storage container and cached at each edge node in a lazy load fashion Windows Azure Customers have control over how long data is cached for. Windows Azure CDN has 18 locations globally (United States, Europe, Asia, Australia and South America) and continues to expand The benefit of using a CDN is better performance and user experience for users who are farther from the source of the content stored in the Windows Azure Blob service. Windows Azure CDN provides worldwide high-bandwidth access to serve content for popular events. Notes

28 Windows Azure CDN To Enable CDN: GET Register for CDN via Dev Portal
Edge Location 404 To Enable CDN: Register for CDN via Dev Portal Set container images to public Edge Location Edge Location TTL Content Delivery Network  Slide Objective Understand how to enable CDN VALUE PROP The Windows Azure Content Delivery Network (CDN) offers developers a global solution for delivering high-bandwidth content that's hosted in Windows Azure. Speaking notes Log into the Windows Azure Platform Management Portal. In the navigation pane, click Hosted Services, Storage Accounts & CDN. In the upper portion of the navigation pane, click CDN. On the ribbon, click New Endpoint. This will open the Create a New CDN Endpoint window. On the Create a New CDN Endpoint window select a subscription from the Choose a Subscription dropdown on which to enable CDN. Select the source of the CDN content from the Chose a content provider dropdown. If you need to use HTTPS connections check HTTPS. If you are caching content from a hosted service and you are using query strings to specify the content to be retrieved, check Query Strings. Click Create. Notes The content source URL will display Source URL for the CDN Endpoint. This is the URL from which the CDN will retrieve the cached content. Once you enable CDN access to a storage account or hosted service, all publicly available objects are eligible for CDN edge caching. If you modify an object that is currently cached in the CDN, the new content will not be available via the CDN until the CDN refreshes its content when the cached content time-to-live period expires. Windows Azure Blob Service pic1.jpg pic1.jpg pic1.jpg

29 Drives

30 Windows Azure Drives Durable NTFS volume for Windows Azure Instances
Use existing NTFS APIs to access a network attached durable drive Use System.IO from .NET Benefits Move existing apps using NTFS more easily to the cloud Durability and survival of data on instance recycle Drives can be up to 1TB A Windows Azure Drive is an NTFS VHD Page Blob Mounts Page Blob over the network as an NTFS drive Local cache on instance for read operations All flushed and unbuffered writes to drive are made durable to the Page Blob Slide Objective Understand Windows Azure Drives VALUE PROP A Windows Azure drive acts as a local NTFS volume that is mounted on the server’s file system and that is accessible to code running in a role. Speaking notes The data written to a Windows Azure drive is stored in a page blob defined within the Windows Azure Blob service, and cached on the local file system. The data is maintained even if the role instance is recycled because data written to the drive is stored in a page blob. Windows Azure drive can be used to run an application that must maintain state, such as a third-party database application. The Windows Azure Managed Library provides the CloudDrive class for mounting and managing Windows Azure drives. The CloudDrive class is part of the Microsoft.WindowsAzure.StorageClient namespace. Notes

31 Windows Azure Drive Capabilities
An instance can dynamically mount up to 16 drives Remote Access via standard BlobUI Can’t remotely mount drive Can upload the VHD to a Page Blob using the blob interface, and then mount it as a Drive Can download the VHD to a local file and mount locally Only one instance at a time for read/write Using read-only snapshots to multiple instances at once Slide Objectives Understand Drives at a high level Speaker Notes Backed by Page blobs Allows Page blob to be accessed as a drive letter on a Compute instance Read write is limited to a single instance as a time. Data is cached for reads on local instance All write flushed operations are immediately committed Notes

32 Drive Details Operations performed via Drive API not REST Calls
Operations on Drives CreateDrive Creates a new NTFS formatted VHD in Blob storage MountDrive/UnmountDrive Mounts a drive into Instance at new drive letter Unmounts a drive freeing drive letter Get Mounted Drives List mounted drives; underlying blob and drive letter Snapshot Drive Create snapshot copy of the drive Slide Objectives Understand Drives at a high level Speaker Notes Cannot specify the drive letter to mount to. The mounted letter is returned as the result to MountDrive call To snapshot Should flush all writes and then block with a lease while snapshotting drive Then can mount new snapshot Harder to predict storage charges due to unknown transaction counts- be careful and test Notes

33 How Windows Azure Drives Works
VM Drive is a formatted page blob stored in blob service Mount obtains a blob lease Mount specifies amount of local storage for cache NTFS flushed/unbuffered writes commit to blob store before returning to app NTFS reads can be served from local cache or from blob store (cache miss) Application Drive X: OS Local Cache Slide Objectives Understand Drives Mounting and Caching Speaker Notes A Windows Azure drive acts as a local drive mounted on the file system and is accessible to code running in a role. The data written to a Windows Azure drive is stored in a page blob defined within the Windows Azure Blob service, and cached on the local file system. Because data written to the drive is stored in a page blob, the data is Durable. Notes Windows Azure Blob Service DemoBlob

34 Cloud Drive Client Library Sample
CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("CloudStorageAccount"); //Initialize the local cache for drives mounted by this role instance CloudDrive.InitializeCache(localCacheDir, cacheSizeInMB); //Create a cloud drive (PageBlob) CloudDrive drive = account.CreateCloudDrive(pageBlobUri); drive.Create(1000 /* sizeInMB */); //Mount the network attached drive on the local file system string pathOnLocalFS = drive.Mount(cacheSizeInMB, DriveMountOptions.None); //Use NTFS APIs to Read/Write files to drive //Snapshot drive while mounted to create backups Uri snapshotUri = drive.Snapshot(); //Unmount the drive drive.Unmount(); Slide Objectives Understand Drives API Speaker Notes In Storage Client API No equivalent REST calls A Windows Azure drive may be mounted as a writable drive, or as a read-only drive if it is created from a snapshot of a page blob. To create a read-only drive, call the Snapshot method to create a new snapshot and return the snapshot's URI, then create a new instance of the CloudDrive object from the snapshot's URI and mount the drive Before a role instance mounts a drive for the first time, it must initialize the cache by calling the InitializeCache method. When a role instance mounts a writable drive, it acquires an exclusive-write lease on the associated page blob that it retains as long as the drive is mounted. If the same role instance attempts to mount a drive with the same URI a second time, the operation is ignored and the Mount method returns the local path to the existing drive. Notes

35 Failover with Drives Must issue NTFS Flush command to persist data
Use System.IO.Stream.Flush() Read/Write Drives protected with leases 1 Minute lease expiry Maintained by Windows Azure OS Driver Unmount on RoleEntryPoint.OnStop On failure Lease will timeout after 1 minute Re-mount drive on new instance Slide Objectives Understand Drives under Failure scenarios Speaker Notes All writes must be flushed to be persisted to the underlying Page Blob Read/Write drives maintain a lease Unmount drives in OnStop method of Role In failure will need to wait for lease to expire < 1 minute before remounting Notes

36 Tables

37 Table Storage Concepts
Account Table Entity Name =… = … customers Name =… Add= contoso Photo ID =… Date =… Slide Objectives Understand Tables Speaker Notes The Table service provides structured storage in the form of tables. The Table service supports a REST API that is compliant with the ADO.NET Data Services REST API. Developers may also use the .NET Client Library for ADO.NET Data Services to access the Table service. Notes photos Photo ID =… Date =…

38 Table Details Not an RDBMS! Table Entities Create, Query, Delete
Tables can have metadata Not an RDBMS! Table Insert Update Merge – Partial update Replace – Update entire entity Upsert Delete Query Entity Group Transactions Multiple CUD Operations in a single atomic transaction Entities Slide Objectives Understand Tables Speaker Notes Within a storage account, a developer may create named tables. Tables store data as entities. An entity is a collection of named properties and their values, similar to a row. Tables are partitioned to support load balancing across storage nodes. Each table has as its first property a partition key that specifies the partition an entity belongs to. The second property is a row key that identifies an entity within a given partition. The combination of the partition key and the row key forms a primary key that identifies each entity uniquely within the table. The Table service does not enforce any schema. A developer may choose to implement and enforce a schema on the client side Notes

39 Entity Properties 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, int64, and double Slide Objectives Understand Tables and Entities Speaker Notes Tables store data as entities. An entity is a collection of named properties and their values, similar to a row- not an RDBMS though Tables are partitioned to support load balancing across storage nodes. Each table has as its first property a partition key that specifies the partition an entity belongs to. The second property is a row key that identifies an entity within a given partition. The combination of the partition key and the row key forms a primary key that identifies each entity uniquely within the table. The Table service does not enforce any schema. A developer may choose to implement and enforce a schema on the client side Notes

40 No Fixed Schema FIRST LAST BIRTHDATE FAV SPORT Slide Objectives
Wade Wegner 2/2/1981 Nathan Totten 3/15/1965 Nick Harris May 1, 1976 FAV SPORT Canoeing Slide Objectives Understand Flexible Entities Speaker Notes Tables store data as entities. A table can contain entities of any shape There is no fixed schema There is no schema checking There is no strong typing- not that Birthdate is stored as both a datetime value and as a string Not that we can add additional columns Notes

41 Querying ?$filter=Last eq ‘Wegner’ FIRST LAST BIRTHDATE
Wade Wegner 2/2/1981 Nathan Totten 3/15/1965 Nick Harris May 1, 1976 Slide Objectives Understand The Basic Query Syntax Speaker Notes Tables store data as entities. Querying is per the ADO.NET Data Services spec Should endeavour to always include the Partition key to limit scope of query- partitions always served by a single storage node Notes

42 Purpose of the PartitionKey
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 same partition in a single transaction Table Scalability Target throughput – 500 tps/partition, several thousand tps/account Windows Azure monitors the usage patterns of partitions Automatically load balance partitions Each partition can be served by a different storage node Scale to meet the traffic needs of your table Slide Objectives Understand The Partition Key Speaker Notes Tables are partitioned to support load balancing across storage nodes. A table's entities are organized by partition. A partition is a consecutive range of entities possessing the same partition key value. The partition key is a unique identifier for the partition within a given table, specified by the PartitionKey property. The partition key forms the first part of an entity's unique identifier within the table. The partition key may be a string value up to 1 KB in size. You must include the PartitionKey property in every insert, update, and delete operation. Notes

43 Partitions and Partition Ranges
PartitionKey (Category) RowKey (Title) Timestamp MODELYEAR Bikes Super Duper Cycle 2009 Quick Cycle 200 Deluxe 2007 Canoes Whitewater Flatwater 2006 Rafts 14ft Super Tourer 1999 Skis Fabrikam Back Trackers Tents Super Palace 2008 PartitionKey (Category) RowKey (Title) Timestamp MODELYEAR Bikes Super Duper Cycle 2009 Quick Cycle 200 Deluxe 2007 Canoes Whitewater Flatwater 2006 Server B Table = Products [Canoes - MaxKey) Server A [MinKey - Canoes) Server A Table = Products PartitionKey (Category) RowKey (Title) Timestamp MODELYEAR Rafts 14ft Super Tourer 1999 Skis Fabrikam Back Trackers 2009 Tents Super Palace 2008 Slide Objectives Understand Partition Ranges Speaker Notes DON’T use unique PartionKey values for your entities – each entity will then belong to its own partition Range partitions group entities that have sequentially, unique PartitionKey values to improve the performance of range queries. Without range partitions, a range query will need to cross partition boundaries or server boundaries, which can decrease the performance of the query. Notes

44


Download ppt "Windows Azure Storage Name Title Organization."

Similar presentations


Ads by Google