When thinking about hosting a web application, there are a few considerations and tips to how to cost effectively host it.
If you have a single web application that is for personal use or tiny business, there are better cost efficient options.
- Use your home computer as web server. Ref: How to set up local PC as a web server | Joe’s Happy Life (moneystock.net)
- Use cheap web hosting services. Economic Web Hosting Sites | Joe’s Happy Life (moneystock.net)
- If you got need serious performance and security, go to cloud like Azure.
Once you decided to go to cloud like Azure, an app service and a database are required as minimal. And it turns out that it’s not cheap at all.
There are a few tips to host cost wisely.
- Design app service plan hierarchy because app service charged based on the number of app service plans not the number of app services.
- Set up app service plan for Production and Development environment.
- Add app services under the Production or Development app service plan accordingly and set the scale as needed. By adding multiple app services wisely into a single app service plan bucket, it is possible to save cost.
- Database
- Use elastic pool, which share a single database resources with multiple databases. Manage multiple databases with elastic pools – Azure SQL Database | Microsoft Learn
- If there is database like Staging that will be accessed rarely when the relevant project being tested before a release, use General Purpose – Serverless tier with auto-pause option. Be careful, if the database is constantly accessed by an backend scheduled process or monitoring app, etc. These will keep waking up the database. This will end up with much higher bill than expected.
- If the access to the database is relatively constant, choose DTU based tier that suit you.
It is needless to say that you need to constantly monitor the performance and cost of the apps and databases to adjust accordingly.