Hosting front-end apps via Azure Blobstorage

Roy M J
4 min readJul 13, 2023

--

In traditional software development practices, the deployment of front-end applications has undergone significant transformation. Previously, the process often required the setup and configuration of dedicated servers, typically relying on web servers such as Nginx or Apache to host and serve static web applications. However, the advent of advanced cloud providers like Azure and AWS has revolutionized this approach.

Modern cloud platforms now offer static storage services that provide efficient alternatives to traditional server-based deployments. Azure Blob storage and AWS S3, for instance, have emerged as prominent solutions for deploying front-end applications built upon popular frameworks like Angular, React, or Vue.

By leveraging these static storage services, developers can now easily deploy and host their static web applications in a more streamlined and scalable manner. The cloud storage services offered by Azure and AWS enable developers to store and distribute their front-end assets, such as HTML, CSS, JavaScript, and media files, with high availability and performance.

Utilizing Azure Blob storage or AWS S3 eliminates the need for managing and maintaining dedicated servers, reducing operational complexities and costs. Developers can focus their efforts on building robust front-end applications, while relying on the reliable and scalable infrastructure provided by cloud providers.

Furthermore, cloud storage services often integrate seamlessly with other cloud-based services, allowing developers to enhance their applications with additional functionality, such as content delivery networks (CDNs) for improved global performance, security features, and scalability options.

Cloud Components

Deployment Architecture for SPA

The main cloud components that are required for hosting JavaScript based front-end apps are:

  • Azure Front-door — Azure Front door is a level 7 load balancer offerings from Azure. In Azure Front-door Premium tier, there is an option to add a private link which will enable the user to connect to an existing Azure Blobstorage that has Static Website enabled.
  • Web Application Firewall (WAF) — Azure Web application firewall within Azure Frontdoor is similar to the Firewall service, but WAF can be configured as part of Azure Frontdoor and it provides centralized protection against attacks and vulnerabilities. This is a global solution and hence deployed on the edge locations similar to Azure FD.
  • Azure Private Link — Azure Private link basically provides the connectivity of Azure PaaS services through Microsoft’s backbone network.
  • Azure Storage Account — Azure Storage accounts offers various cloud storage options like Blob Storage, Static website (Blob Storage), Data Lake Storage Gen2, Azure Files, Queue Storage and Table Storage. For static website hosting, a Blobstorage with static website enabled is required.
  • Azure Blobstorage — Azure Blobstorage is one of the storage options provided by Azure. This can act as Enabling static website option in a blobstorage will simply create a ‘$web’ folder at the root and an option to choose the index page as well as error page URLs.

Advantages

  • Azure Front Door acts as a global content delivery network (CDN) and provides efficient content delivery across different regions worldwide. It caches static content in edge locations, ensuring faster content retrieval for end-users and reduced latency.
  • Azure Front Door optimizes content delivery by leveraging edge caching and intelligent routing algorithms. It caches static content at edge locations, reducing the load on your backend storage and improving overall performance.
  • The Premium tier of Azure Front Door leverages Microsoft’s secure backbone network, utilizing Azure Private Links, to enhance the security measures in place.
  • Azure Blob Storage is a highly cost-effective storage solution for hosting static content. It offers competitive pricing compared to running and managing virtual machines or containers in App Services or AKS.
  • Azure Blob Storage provides built-in security features like authentication, authorization, and encryption at rest. Azure Front Door also supports SSL/TLS termination, allowing secure communication between clients and the CDN.
  • Azure Blob Storage is designed to handle massive scalability requirements. It can easily handle high traffic loads and automatically scales to meet demand without the need for manual intervention. This ensures that your static content remains highly available even during traffic spikes.
  • Azure Blob Storage offers built-in redundancy options, such as Zone Redundant Storage (ZRS) or Geo-Redundant Storage (GRS), ensuring high availability and data durability. Azure Front Door also provides failover capabilities, allowing for disaster recovery scenarios.

With the popularity of Single page applications (SPA) and Micro-frontend apps increasing, there is a direct demand for optimized deployment solutions for the same and static web hosting based on Azure blobstorage checks almost all the desired deployment requirements. Azure blob storage-based static web hosting is a highly efficient and optimized solution for deploying SPA and Micro-frontend apps. Its scalability, performance, versioning capabilities, and cost-effectiveness make it an ideal choice for developers looking to streamline their deployment process and deliver a seamless user experience.

--

--

Roy M J
Roy M J

Written by Roy M J

Technology Architect | AI and Blockchain Enthusiast | Speaks anything on JavaScript | Lifelong student