Slot deployment for static website hosted on storage account

suvra jyoti 151 Reputation points
2021-06-06T05:39:02.88+00:00

Hi,

We have downloaded the source code of developer Portal in Azure APIM, customized the same and hosted it as a static website on a storage account. We need to support the slot based deployment model for the same so that swapping between staging and production is possible when we execute the deployment pipeline.

Some options that i think would have fit:

  • Using Azure Static web app - this is not possible as we would need to change the full deployment model that we already have in
    place.
  • Two separate storage accounts, one for stage and one for production, we swap the contents of the $web container in the respective
    storage accounts. Need to look into the cost perspective as in keeping LRS for Stage and RAGRS for the production. Not sure if this is
    the best solution possible.

Please suggest what options i can take.

Thanks,
SuvraJyoti

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,175 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,223 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
968 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,256 Reputation points Microsoft Employee
    2021-06-08T21:27:31.897+00:00

    Hello @suvra jyoti ,
    Thanks for your query !
    Considering your above scenario , using 2 storage account is the best option as a part of slot based deployment.
    When you write data to a RA-GRS storage account, the data is replicated to another Azure region. The geo-replication data transfer charge is for bandwidth used to replicate data to the second Azure region.

    As $web container will have block blobs so the total cost of block blob storage depends on:

    1) Volume of data stored per month.
    2) Quantity and types of operations performed, along with any data transfer costs.
    3) Data redundancy option selected.

    I am just thinking , how about having stage environment storage account with RAGRS instead of Production storage account ?

    Let's say if we consider second parameter i.e. number of operations performed - Once the website is deployed on production as the traffic gets increased which in-turn the operations which indirectly leads to cost.

    One more option which I was thinking was "How about having those 2 storage accounts in different regions , Stage - Region1 , Production - Region2 both with LRS kind"

    RAGRS is definitely a good option which does an asynchronous replication to the secondary Azure region

    I would say take a look at azure calculator https://azure.microsoft.com/en-us/pricing/details/storage/blobs/
    explore couple of options like "Azure Storage Reserved Capacity" , see the section in the above document.

    Also take a look at the section "operations & data transfer prices"

    Let us know if you have additional questions. If the above helps , don't forget to "Upvote and Accept the Answer"

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.