Tutorial: Build a highly available application with Blob storage

This tutorial is part one of a series. In it, you learn how to make your application data highly available in Azure.

When you've completed this tutorial, you will have a console application that uploads and retrieves a blob from a read-access geo-zone-redundant (RA-GZRS) storage account.

Geo-redundancy in Azure Storage replicates transactions asynchronously from a primary region to a secondary region that is hundreds of miles away. This replication process guarantees that the data in the secondary region is eventually consistent. The console application uses the circuit breaker pattern to determine which endpoint to connect to, automatically switching between endpoints as failures and recoveries are simulated.

If you don't have an Azure subscription, create a free account before you begin.

In part one of the series, you learn how to:

  • Create a storage account
  • Set the connection string
  • Run the console application

Prerequisites

To complete this tutorial:

We are currently working to create code snippets reflecting version 12.x of the Azure Storage client libraries. For more information, see Announcing the Azure Storage v12 Client Libraries.

Sign in to the Azure portal

Sign in to the Azure portal.

Create a storage account

A storage account provides a unique namespace to store and access your Azure Storage data objects.

Follow these steps to create a read-access geo-zone-redundant (RA-GZRS) storage account:

  1. Select the Create a resource button in the Azure portal.

  2. Select Storage account - blob, file, table, queue from the New page.

  3. Fill out the storage account form with the following information, as shown in the following image and select Create:

    Setting       Sample value Description 
    Subscription My subscription For details about your subscriptions, see Subscriptions.
    ResourceGroup myResourceGroup For valid resource group names, see Naming rules and restrictions.
    Name mystorageaccount A unique name for your storage account.
    Location East US Choose a location.
    Performance Standard Standard performance is a good option for the example scenario.
    Account kind StorageV2 Using a general-purpose v2 storage account is recommended. For more information on types of Azure storage accounts, see Storage account overview.
    Replication Read-access geo-zone-redundant storage (RA-GZRS) The primary region is zone-redundant and is replicated to a secondary region, with read access to the secondary region enabled.
    Access tier Hot Use the hot tier for frequently-accessed data.

    create storage account

Download the sample

We are currently working to create code snippets reflecting version 12.x of the Azure Storage client libraries. For more information, see Announcing the Azure Storage v12 Client Libraries.

Configure the sample

We are currently working to create code snippets reflecting version 12.x of the Azure Storage client libraries. For more information, see Announcing the Azure Storage v12 Client Libraries.

Run the console application

We are currently working to create code snippets reflecting version 12.x of the Azure Storage client libraries. For more information, see Announcing the Azure Storage v12 Client Libraries.

Understand the sample code

We are currently working to create code snippets reflecting version 12.x of the Azure Storage client libraries. For more information, see Announcing the Azure Storage v12 Client Libraries.

Next steps

In part one of the series, you learned about making an application highly available with RA-GZRS storage accounts.

Advance to part two of the series to learn how to simulate a failure and force your application to use the secondary RA-GZRS endpoint.