Quantcast
Channel: blog.atwork.at
Viewing all articles
Browse latest Browse all 1136

How to save costs in Azure PaaS

$
0
0

Recently, I wanted to do a cleanup in my various Azure subscriptions. A lot of websites and databases were created during the last months and years, so the idea was to cleanup and to combine websites into one (or just a few) App Service Plan(s) and to do the same with multiple SQL Databases into one Elastic Database Pool. The goal was to reduce costs from multiple App Plans and single databases into few ones. Here’s how this works.

Azure Facts

In my scenario I had a lot of websites with a SQL database running in Azure. Well, in some webs there were more components used, for example Application Insights, Cloud Services and more. But I concentrated on the website and database because they produced the largest costs in the cloud services.

To make it very short, here are some Azure facts that help to save money:

  • One App Service Plan represents one virtual machine. So, multiple websites (App Services) can be hosted in ONE App Service Plan.
  • The limits of an Azure Service Plan are valid for the sum of all Apps.
  • The same goes for Elastic SQL databases: ONE POOL can host multiple SQL databases for a fixed price.
  • As requirements, all resources must be in the SAME Resource Group.

Ok, now have a look into the optimization…

How to optimize

The goal is to host as many resources in one App Service Plan or in one Elastic Database Pool as possible. Of course, this is dependent on size and performance. See how to reduce costs as shown in these samples here.

  • I reduced the Apps into 3 App Service Plans that are not in the “Free” ricing tier and they contain one or more websites, for example the first plan hosts 11 Apps that are running in North Europe. The other App Service Plans may contain only 1 App, but are “free”.
    image
    Later, I also integrated the “HP-atworkblog” (“HP” was for “Hosting Plan”, before we renamed that to “App Plan”) into the first App Service Plan as well… So now I have only 2 App Service Plans that cost money, one in North Europe and one in West Europe.
  • As mentioned above, the limits of an Azure Service Plan are valid for the sum of all Apps. So, for example, pricing tier “S1” offers the resources defined below and can store up to 50GB for all Apps in that plan. Should be enough for standard websites…
    image
  • Tip: Check with performance and use Scale Up or Scale out for large traffic loads!
  • An Elastic Database Pool can store many SQL databases. This is extremely helpful for many small SQL databases, which is often the case when hosting websites. In this sample you see that there’s one pool with the resources of 100 eDTU’s, in total 100GB size, and there are 53 databases running in that pool – with dynamic and automatic resource-optimization. Cool!
    image
  • The good part is that this pool costs about 200USD per month for ALL SQL databases (with automatic backup). On the other side you cannot configure a lot, except the minimum and maximum resources that shall be used for each database, but that’s usually sufficient for small databases.

Do it!

So, basically, that’s it! Reorganize your resources to use these optimizations and you will reduce your Azure PaaS costs (dramatically).

I will post another article describing the stumbling blocks for this reorganization…


Viewing all articles
Browse latest Browse all 1136

Trending Articles