E-commerce Web App in Azure Cloud: Considerations, Components of Implementation and Schematic Design

Consumers shifted their spending to the web due to the coronavirus (Covid-19) outbreak. Businesses and organizations that once mapped digital strategy with careful planning over a transition period, now forced to scale their initiatives in a matter of days. In this regard, we are motivated by the need to develop a scalable, highly available, resilient, secure, and cost-effective e-commerce web application for demonstrating how cloud services can be leveraged for implementing such applications. This paper is a part of the aforementioned web application development project, titled “A cloud-based e-commerce storefront prototype for SMEs in Oman”. In this paper, we discuss the system considerations, components of implementation, and the schematic design of the proposed software solution. This paper provides meaningful guidelines for companies that want to adopt cloud-based E-commerce web application to bring their products and services online without much upfront cost or initial investment.


Introduction
The sudden onset of the COVID-19 pandemic forced organizations and businesses to scale their technological initiative overnight. In order to benefit from the surges in online shopping, organizations were seeking ways to bring their products and services online without much upfront cost or initial infrastructure investment. In this paper, we discuss the system considerations, components of implementation, and the schematic design of a cloud-based e-commerce web application.
Though the discussion here is in the Microsoft Azure cloud context, the proposed design can be implemented in any public cloud such as Google cloud or AWS. In our review, we did not find any authentic study that generally suggests one cloud service provider over the other.

Cloud Influence on E-commerce
Cloud adoption into the E-commerce business offers many advantages. Centralized management features of cloud computing ensure data reliability and security (Yu Jia & Ni Jun, 2013). Pay as you go advantage of cloud can help e-commerce enterprises reduce initial infrastructure investment and running costs (Ibrahim et al., 2011). Once e-commerce is migrated into clouds, the cloud service provider can provide the IT resources as a service, businesses don't have to purchase the resources. Instead, it just rents the cloud services needed (Shi, Lei & Wang et al., 2017).

Considerations
In the considerations section, the primary systems considerations are summarized.

Availability
Businesses are now considering their e-commerce portal as mission-critical. Availability of the system measured as a percentage of uptime.
The proposed design adopts geo-replicated system design which limits the failure and prevents severe impact on application and data. Automatic failover in case of an endpoint failure is also ensures high availability and this can be achieved by a Traffic Manager which monitors endpoints and acts when there is a failure.

Scalability
Scalability refers to the number of concurrent users a system can support effectively (Xiong H et al., 2014) Two different scaling approaches (Michael, M et al., 2007): 1. Scale-up or vertical scaling means increasing the power of an individual Virtual Machine (VM) through hardware improvements, e.g., increase RAM from 16 GB to 32 GB.
2. Scale-out or horizontal scaling means improving the system capacity with additional VM instances.

Security
Security assures system safety against attacks (Dave Bourgeois and David T. Bourgeois., 2014).
Security best practices such as regular updates of machines instances and software runtime, remote connectivity encryption, protection against malware, static IP restriction, disabling outdated protocols, and regular compliance checks are incorporated into the proposed system.

Resiliency
Resiliency refers to the ability of a system to recover from failures.
Different deployment slots or staging slots, prefer scale-out over scale-up, data tier geo-replication, geo-redundancy for high bandwidth resources are the major resiliency considerations. However, some of these capabilities require application-side failover to alternate endpoints in some failure scenarios, so application logic should be developed to handle these scenarios.

Azure Content Delivery Network
The Azure Content Delivery Network (CDN) accelerates website content delivery, by caching the content at the CDN end points across the world. Azure CDN is used to deliver cached, static content from locations close to users to reduce latency. Thus, it contributes to increasing the speed of the storefront which is accessed by users from different parts of the world, and it also reduce the load to the server which in turn reduces the security threats.

App Service Web App
App service is a fully managed PaaS offering from Microsoft Azure. It provides a secure, scalable hosting environment for web applications created with different frameworks (Sahay R., 2020).

Azure Traffic Manager
Infrastructure design should be resilient to failure (Ambi Karthikeyan S., 2018). Azure Traffic manager distributes the system traffic among the service endpoints based on the routing method defined, for example, redirect the client request to the nearest endpoint, and thus improve the performance. It ensures high availability by monitoring endpoints and support failover in case an endpoint is not available.

Azure AD B2C
Azure Active Directory B2C is a cloud identity access management service, which authenticates thousands of customers per day. Azure AD service authenticates customer's social, or enterprise login identities and enables quick and easy registration to the e-commerce site with social login.

Storage Queues
Azure storage queue is a solution for handling a long queue of messages. Storage queue service usually stores set of messages with a variety of sizes that can be accessed by the system.

Function App
E-commerce workflows can be automated using Azure functions and related services without worrying about the infrastructure, thus it helps to provide a personalized experience to the customers and save on cost.

Azure Cognitive Services
Azure cognitive services bring cognitive features into the application. In an e-commerce context, cognitive service text analytics emotion AI can be used to leverage new application capabilities such as customer sentiment analysis on newly launched products and insights on new product features to be introduced, by monitoring the product reviews and customer feedback.

Azure Blob Storage
Azure Blob is object storage. Product images, videos, and other static content are stored in the blob storage and render to the user directly (Daher et al., 2018). Blob content renders over CDN since blob storage and CDN are integrated, thus it brings down the load on the application server.

Azure Cache for Redis
Application performance heavily depended on the back-end data store. Adding a cache instance to the web application infrastructure improves the performance of the system. Azure cache for redi's able to handle large volumes of requests by caching frequently accessed data.

Data Storage
Azure storage in the proposed design is cost-effective, scalable, and secure. Persistent data such as product reviews, payment information, wish list items and customer purchase history has to be stored indefinitely with data storage. Azure NoSQL storage options are preferred over relational storage for large applications due to scalability reasons.

Application Insights
Application insights help to monitor the system's health and detect performance anomalies, which would help to understand what users do with the web app, thus it gives an in-depth insight to grow the e-commerce business.

Solution, Steps, and Schematic Design
There are different ways to run code on Azure, such as own stack on Azure VMs with preferred OS or Azure App Services which is a fully-managed PaaS.
The proposed design is adopted from Microsoft's Azure Reference Architecture repository (Microsoft Library, 2021)

Figure 1. Cloud E-Commerce Schematic Design
The Azure Traffic Manager routes customer requests to the system hosted in Azure App Services, Azure CDN pulls the static content and images from blob storage for the customer. Customer authenticates against Azure AD B2C tenant. Customers query database and search for products using Azure search. Query results are cached in Azure Redis Cache to ensure better performance. Products ordered from customers are placed in the message queue. Azure Functions process payments and write payment into the database. Performance metrics are provided by the application insights by monitoring the system. Cognitive services sentiment analysis helps to integrate intelligent features using machine learning API.

Conclusion
In this paper, we discussed the schematic design of a scalable, highly available, resilient, and secure e-commerce web application on the public cloud. We started by discussing the system considerations, then the components of implementation and the schematic design. The proposed design can be implemented in any organization which is looking for an e-commerce web app without much upfront cost or initial investment. Alternative cloud services are available for a few of the components chosen in this design which are not discussed in this paper. We have chosen one component over the other considering the cost-effectiveness. Future work would be carried on exploring further generalization of the proposed design and implementation of the software system.