In this article I will be discussing the nature of traffic received by the Web apps hosted and share a real screenshot of my Azure bill for the month of Jun 2020. I also be covering how I am hosting and maintaining a MySQL Database Server and a handful of Web Applications such as WordPress, Python based REST API framework FastAPI and Flask apps within a single Azure App Service Plan. I’ll also be detailing about costs incurred by these resources before and after scaling up my App Service Plan.
I have the following setup in a Resource Group of Azure Cloud Account. In this Resource group I have an App Service Plan and an Azure Database for MySQL. The architecture in the picture below gives an overview of how I am hosting handful of web apps within a single App Service Plan and multiple MySQL databases within a single Azure database for MySQL server.
So lets dive deep into the infrastructure that I am maintaining to host multiple Web Apps and databases.
App Service Plan ( B2: 1)
Earlier I used to have
B1: 1 App Service Plan (ASP). I scaled it to
B2: 1 a fortnight ago. Under this
App Service Plan, I have 7 App Services running. Two of the Azure App Services were hosting WordPress and rest other are dummy Python based REST APIs using FastAPI , Flask that no one use. Out of the two WordPress Web App Services, one has mediocre ~150 to ~200 monthly visitors and other one, which is this site TutLinks has moderate ~1200 monthly visitors.
Check out this resource on App Service Plans in case you are interested to know more about limitations of Azure App Service Plan for different configurations such as basic, standard, premium and isolated.
One observation I made is that, though I scaled the App Service Plan from B1 to B2 in June 2020, there is no significant increase in price charged for the month of June which I have tabulated below. There could be two reasons for this.
One reason obviously is the resources were not fully utilizing the capacity offered by the plan B1 and that signifies there was no need to scale the app service plan in reality. The other reason probably could be that, after an upgrade to B2, there is no full month bill generated as I vaguely remember that I might have scaled it around 19 Jun 2020. So I better wait for a full month cycle and come back to provide an update on this.
Azure Database for MySQL Server
I have an Azure Database for MySQL Server as a shared database server for multiple hosted instances of RESTAPIs each pointing to a separate database. And there are two WordPress web apps deployed in
App Service Plan each again in turn has its separate database in the same MySQL server.
Azure Database for MySQL Server has the following configuration:
- MySQL version : 5.7
- Performance configuration : Basic, 1 vCore(s), 5 GB
This database server is consumed by at least 3 to 4 Web App Services hosted in
B2:1 App Service Plan.
Currently there is no limit on the number of databases you create on a single Azure MySQL database server. But creating more databases come at the cost of shared server resource and thus the performance may degrade.
I have total of three of DNS Zones, out of which one domain is registered on GoDaddy and Pointed to Azure App Service that hosts WordPress. The domain that was externally registered on GoDaddy, pointed to Azure App Service that hosts WordPress as Custom Domain does not seem to generate any bill for DNS zone.
I also have registered two domains directly on Azure. The DNS Zones for each of the domains will generate a bill of approximately $0.47 per month per DNS Zone per domain.
Azure Cost Analysis Breakdown
So here is the breakdown of my Azure bill for the past four months starting March 2020 to Jun 2020. As I’m documenting this on 30 Jun 2020, the bill for that last day is excluded for the month of Jun 2020 as it will be generated on later day.
|Month/ Year||Azure Database for MySQL Server||App Service Plan (B2: 1)||DNS Zone (Cost/Domain)|
Below is the snapshot of the Azure Cost Analysis based on actual cost incurred by various Azure resources for the Month of June 2020.
Azure bill for the month of Jun 2020
To Summarize, if you have
Azure App Service Plan and a
Azure Database for MySQL Server, and having said that you have around four to six web apps or WordPress websites that receive moderate traffic that are configured with Azure Custom Domain with DNS zone will generate the average monthly bill around USD 50.
So for approximately $50 a month you can have 3 to 4 WordPress websites deployed on Azure that attract a moderate traffic of roughly 1k to 1.5k visitors a month.
What is your experience and how are you maintaining the infrastructure of applications on Azure to optimize costs? Have you got better thoughts? Please do comment and share your story.