How to choose the optimal tier for Azure web applications and databases with cost in mind

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.

  1. Use your home computer as web server. Ref: How to set up local PC as a web server | Joe’s Happy Life (moneystock.net)
  2. Use cheap web hosting services. Economic Web Hosting Sites | Joe’s Happy Life (moneystock.net)
  3. 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.

  1. Design app service plan hierarchy because app service charged based on the number of app service plans not the number of app services.
    1. Set up app service plan for Production and Development environment.
    2. 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.
  2. Database
    1. Use elastic pool, which share a single database resources with multiple databases. Manage multiple databases with elastic pools – Azure SQL Database | Microsoft Learn
    2. 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.
    3. 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.

Leave a comment

Your email address will not be published. Required fields are marked *