Microsoft recently introduced a dynamic pricing model for the Azure App Service Plan. The app service plan is the infrastructure that hosts your Web App, Function Apps or Logic Apps. Currently the dynamic service plan is only available for function and logic apps. In fact going forward from the 1st November 2016, it will be the only plan for Logic Apps if you are on a pay-as-you-go subscription, also know as Azure Direct customers (wonder why, then read this blog post)
The dynamic pricing plan, enables you to pay for only the resources you use, instead of paying a fixed monthly price (depending on the SKU) as it was the case with the classic app service plan.
But when is the dynamic plan the better options from a price perspective? Easy enough if your function app or logic app very seldom runs, you are better off with a dynamic service plan. But what about those scenarios where you start to do a little more what is the cut off, for when you should switch to the classic plan.
I did a few calculations trying to figure it out myself. For functions app it is hard to predict the price when the dynamic pricing model is used, as the price is very dependent on the application as it is a function of memory and CPU usage.
For logic apps on the other hand it is very straight forward. For logic apps on the dynamic pricing service plan, you are paying for every action execution that your logic app does. An action execution is an execution of a single element in your logic app, e.g. a call to a queue trigger would constitute an action execution. Also note that looping over actions would count the action executions for each loop iteration. Actions that are not executed due to errors or because they are conditional, are not counted.
The price for an action execution is 0,0008$ on the dynamic plan, when using logic apps on the classic plan you are for some reason limited to 10.000 action executions per day. On the Free, Shared or Basic plan the limit is only 200 actions, while it goes up to 50.000 on the premium plan.
If we try to plot a graph, with different numbers of action executions per day, we can see that Microsoft is doing something sneaky with the dynamic pricing if you need lot of action executions.
If your action execution count on average per day is more than 3100, you are better off switching to the classic plan, as the dynamic plan is going to be more expensive for you.
The reason why dynamic pricing is the only price option going forward, should probably also be found in those numbers, it is simple a better deal for Microsoft.
Bottom line, the cloud is awesome for penny pinching, but you need to spend the some time investigating how to best fit within the limits.
Categories: Windows Azure