Are Azure Functions Right For Your Business Needs?

Are Azure Functions Right For Your Business Needs?

“Azure Functions is a serverless application platform. It allows developers to host business logic that can be executed without provisioning infrastructure.”

Benefits

  • Write your business logic in the language of your choice
  • Get automatic scaling
  • You will be charged only for the running time of the function
  • Great for stateless logic (but if state is required it can be stored in associated storage service)
  • Functions are event-driven – they run only in response to an event trigger (HTTP request, time trigger, Service Bus message being added to the queue)

Drawbacks

  • Execution time is 5 mins by default and can be changed to a max 10 mins. If your service initiated by an HTTP request and requires HTTP response, the time-out is restricted to 2.5 minutes. You can, however, use Durable Functions to orchestrate functions without enforced time-out.
  • Execution frequency – if you expect your fuction to be executed a lot by multiple clients, it will be cheaper to run this service on a VM.
  • Scaling – only one function app instance can be created every 10 seconds, for up to 200 total instances. However, each instance can have multiple concurrent executions. Note that different types of triggers have different scaling limitations.

How Much Does It Cost?

There are two pricing plans for Azur Functions

Azure Functions consumption plan is billed based on resource consumption and executions per second. “Consumption plan pricing includes a monthly free grant of 1 million requests and 400,000 GBs of resource consumption per month per subscription in pay-as-you-go pricing across all function apps in that subscription.”

At the time of writing this post here are the prices for Azure Functions (note, that storage is required for any azure function and it will be charged separately)

Azure App Service plan allows to avoid timeouts and run continuously on a VM that you define. In this case it is not a serverless plan and you need to manage the resources that your app requires.

Conclusion

It is safe to say that if you are performing heavy calculations that can take hours, Azure Functions is not the right solution for you.

If you need to react to a certain event and run a quick task then Azure Functions can be perfect and cost almost nothing.

Leave a Reply

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