Blazor Hosting Cost Analyst
I have spent some time looking at if Server-Side Blazor App is better than the Client-Side Blazor App, Blazor Hosting Models post. I decided to look at it from a cost position and see if there is any benefit of one way over the other.
I took a simple Blazor Application that I wrote Inspirational Quotes and create both a server-side application and a client-side application. I then deployed each. For the server-side application, I deployed as an Azure app service, free trier. For the cient-side application, I deployed that with Azure blob storage statice web site. The goal was to just focus on the cost of each deployment.
After the deployment I had several users access each web site several times a day. This was to simulate a light usage, such as a sample app from a blog or portfolio would get. I monitored the sites for 30 days.
Actual Cost
I was a little surprised to see the cost for each deployment and utilization for 30 days was $0.00!
Other Interesting Findings
Even though there was no winner in the cost aspect of the test, I was able to learn a couple of other tidbits of comparison information.
1. Custom Domain Names
Advantage: Client-Side
I wanted to add a custom domain name to each web site. For the client-side, it is very straight forward to add the custom domain. And there is no additional cost.
On the server-side, in order to add a custom domain, you have to upgrade to the next service tier. This increased the cost to $9.99 per month.
2. Ease of deployment
Advantage: Server-side
Deploying to Azure app service is quick and easy, whether you are doing it via Visual Studio, Azure DevOps, or Github.
On the client-side, We deployed by publishing to a file folder and updating the Azure blob storage. You can set up a Github for the publish folders and then automatically deploy on check-in. This is still an additional overhead than using an app service.
Thanks for this info! Very useful!
ReplyDelete