You are developing a lightweight Azure Function that runs once per day to prune expired user sessions from a database. The function takes approximately 30 seconds to run. You must minimize costs by only paying for the exact compute resource time that the function consumes. Which hosting plan should you select for the function app?
- Consumption planCevap
- BPremium plan
- CDedicated App Service plan
- DDurable Functions plan
Cevap
The Consumption plan is the correct choice because it scales automatically and only charges for the time that the function executes, making it ideal for a lightweight daily task.
The Consumption plan is designed for serverless workloads where billing is based on resource consumption and execution count. For a function that runs only once per day for 30 seconds, this model ensures you only pay for those 30 seconds of compute time, minimizing total expenses.
Adım Adım Çözüm
Anahtar Kavram
Azure Functions hosting plans and their billing models
Tahmini Süre:45s