1

Once deployed the Trigger functions are long running tasks that trigger on certain events is what I believe to be true.

To be precise, consider a scenario where I have deployed a Blob trigger which checks for file upload to blob storage.

After executing the trigger function. does my application still uses Host resources since it always listens to the blob storage for changes.

Is it like a websocket? Or the blob itself calls the function? Or what is it?

Is it the same with the timer trigger?

Just wanted to know if the resources are being used even after the triggers are already been executed.

8
  • Is this is a more "theoretical" question on whether resources are being consumed somewhere, or are you simply asking whether you're going to be billed simply for having a function with a timer trigger or a blob trigger? Commented Oct 30, 2023 at 22:44
  • Yes @akseli it's from a theoretical perspective as to how it operates exactly in a high level view, Will it be active and always be listening like a socket connection? or some other event starts the process? how is it? Commented Oct 31, 2023 at 7:26
  • No. AFAIK, trigger is not listening always same as WebSocket. It doesn't continuously consume resources while waiting for an event, it only runs when an actual trigger event happens. Commented Oct 31, 2023 at 9:08
  • Also why do we have to restart the application if we want reflect the changes in local.settings.json in our function?, if we have to restart an application doesn't it mean that its always running? P.S I'm new to this please help me out here. Commented Oct 31, 2023 at 9:36
  • 1
    Function is Always running after deployment but you will be charged based on the service plan you have selected. if you have selected consumption you will charged only when you trigger is executed and if you are selecting Premium or App service plans, then you will be charges based on the plan you have selected. charges will be mentioned when selcting the plans. you can also check here using calculator Commented Oct 31, 2023 at 9:53

1 Answer 1

1

Will Timer/blob triggers in azure always use host resources even though it's not executing?

Azure Function has Consumption and Premium service plans,
Also, The App service plan can be used for azure function too.

enter image description here

Consumption Plan: It charges based on the times your function has executed or ran; it will be shown as the Y1 plan name. For reference, you can check this Pricing calculator for functions, also mentioned in the document for consumption plan.

The first 400,000 GB/s of execution and 1,000,000 executions are free.

Premium Plan: This plan has multiple options for instances, vCore, storage size. Each has different pricing; you can check it in Pricing calculator too.

Storage account is created with every function app and that will be charged differently based on usage. You can check the pricing for the storage account in the calculator.
For reference, check this Document.

Just wanted to know if the resources are being used even after the triggers are already been executed.

No, the trigger function is not "always listening" in the same way that a WebSocket is. Instead, it's an event-driven function. It doesn't continuously consume resources while waiting for an event; it only runs when there is an actual trigger event.

I have created a timer trigger and blob trigger function in my Azure function. This is the accumulated cost for 20 runs and 5 runs for Azure storage, as shown below.
enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.