How to Create Storage Account With High Availability On Microsoft Azure.
Published: 2024-05-27 08:58:46

_An example of the need for a high-availability storage account is the storage supporting the company website. This site offers product images, videos, marketing literature, and customer success stories. Given the global customer base and rapidly increasing demand, it's vital to ensure low latency load times for this mission-critical content. Additionally, maintaining version control of documents and enabling quick restoration of deleted files are crucial._

**Our goals are as follows**:

- Create a storage account with high availability.
- Ensure the storage account has anonymous public access.
- Create a blob storage container for the website documents.
- Enable soft delete so files can be easily restored.
- Enable blob versioning.

_Lets start_
 
Create a storage account with high availability.

In the portal, **search** for and **select** Storage accounts.
![search for and select Storage accounts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9y4ktlsmjj6yefsx2tt7.png)

**Select + Create**.
![Select + Create.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/slasovmnqplifolhqipn.png)
For resource group select new. Give your resource group a name and select OK.
![name of resource group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5kfk0mxffp9nlvxleni9.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6hkjim5w1lu2xdkykzgr.png)
Set the Storage account name to publicwebsite. Make sure the storage account name is unique by adding an identifier.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5oi3tk0jpnz5h89eiyv.png)
Take the defaults for other settings.
Then Select Review and then Create.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2z1wlletu6s7q85hiuy.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5hf2au1iauriyqmvy86.png)
Wait for the storage account to deploy, and then select Go to resource
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vyy2arfrdjt2hwylr7bs.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01wxz20ghpnt3ealu25x.png)

This storage requires high availability if there’s a regional outage. Additionally, enable read access to the secondary region. 

In the storage account, in the Data management section, select the Redundancy blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wprz69wjm84d6ny298t8.png)
Ensure Read-access Geo-redundant storage is selected.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ags4jtm8bmf4w5w1tgl6.png)
Review the primary and secondary location information.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0ttq11qi7c7mxnplopt.png)
It is important to note that Information on the public website should be accessible without requiring customers to login.
Hence In the storage account, in the Settings section, select the Configuration blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/686fyeky6ek53l8o60fs.png)
Ensure the Allow blob anonymous access setting is Enabled.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0u9c7bm27tsl33s090dv.png)
Be sure to Save your changes.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v8m1dhq3fdjfuljr6gmc.png)

Ensure the storage account has anonymous public access.
The public website has various images and documents. Create a blob storage container for the content.
In your storage account, in the Data storage section, select the Containers blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2c2ilzyodnr1qwjpu8ui.png)
Select + Container.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xbuazgbvw5z376pr0tbw.png)
Ensure the Name of the container is public.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/krtgwfkrqad6r5ski98f.png)
Select Create.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/klm8udguercik6pgnobh.png)

Customers should be able to view the images without being authenticated. Configure anonymous read access for the public container blobs. Learn more about configuring anonymous public access. to do this follow the step below; 
Select your public container.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gwlqdww20gcum7l0vxy6.png)
On the Overview blade, select Change access level.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/56jpf7a7u6roijwitqxd.png)
Ensure the Public access level is Blob (anonymous read access for blobs only). Select OK.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ygu08d68msbh1hpg0w14.png)

Lets Practice uploading files and testing access to be sure of what we have done 
For testing, upload a file to the public container. The type of file doesn’t matter. A small image or text file is a good choice
Ensure you are viewing your container then Select Upload.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3h370anvmythtf83lhe.png)
Browse to files and select a file. Browse to a file of your choice.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmm193lwsataq4td9nrq.png)
Select Upload.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hy2qqdp9gst062ihc0qj.png)
Close the upload window, Refresh the page and ensure your file was uploaded.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ks8u0hpqq7a4hqlw5yn5.png)
Determine the URL for your uploaded file. Open a browser and test the URL.
Select your uploaded file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iw2tbz5lqqke3hyj0p8c.png)
On the Overview tab, copy the URL.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxwc70x41xmy7ndszvkk.png)
Paste the URL into a new browser tab, If you have uploaded an image file it will display in the browser. Other file types should be downloaded.

Now let us configure Soft Delete; It’s important that the website documents can be restored if they’re deleted. Configure blob soft delete for 21 days. 
Go to the Overview blade of the storage account.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5y2d5ypkzi423e80aci.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2s3r0dmhh9q6zuckzg9l.png)
On the Properties page, locate the Blob service section.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cvkngnnr8yh3ld4ijo7.png)
Select the Blob soft delete setting.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwf5szh0v1czeerubomb.png)
Ensure the Enable soft delete for blobs is checked.
Change the Keep deleted blobs for (in days setting is 21.
Notice you can also Enable soft delete for containers.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j0ccohx8fsy2d6z6wjkz.png)
Don’t forget to Save your changes.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/am468vqhzgnfycux8bdu.png)

If something gets deleted, you need to practice using soft delete to restore the files
Navigate to your container where you uploaded a file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ji5jmz4el1o73dk0f36w.png)
Select the file you uploaded and then select Delete.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43rffzze4gzar2fsop3x.png)
Select OK to confirm deleting the file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d1m53nkj1lgbdc41ujqz.png)
On the container Overview page, toggle the slider Show deleted blobs. This toggle is to the right of the search box.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45hnm5w26ctekxocxid5.png)
Select your deleted file, and use the ellipses on the far right, to Undelete the file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uses11n4rb1m7wp9up1y.png)
Refresh the container and confirm the file has been restored.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rm805m98u3ogzrkx8f5o.png)

Now let us configure blob versioning, this will help us keep track of the different website product document versions.
Go to the Overview blade of the storage account.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ajrroesa6gewftqmwpxv.png)
In the Properties section, locate the Blob service section.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wze5x7x2kls4ibafr6vi.png)
Select the Versioning setting.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwe0b9x26add7rtzx1hy.png)
Ensure the Enable versioning for blobs checkbox is checked.
Notice your options to keep all versions or delete versions after.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lekgj0zddt7lgd00fzf1.png)
Don’t forget to Save your changes.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2qe8c6sdvlqm3anvu26.png)

As you have time experiment with restoring previous blob versions.
Upload another version of your container file. This overwrites your existing file.
Your previous file version is listed on Show deleted blobs page.

Now you have been able to create a storage account that has high availability on Microsoft Azure