@Lyubomir-3610 Thanks for reaching out.
The billing differs depending upon which plan you have created your Azure Container apps.
Let's say if you are under the consumption plan and if you are in idle state then the usage is charged at a reduced idle rate when a replica is inactive. The billing document already covers this in detail: https://azure.microsoft.com/en-us/pricing/details/container-apps/
To answer your question
- request comes :
- Request is handled for about 15 seconds
- response sent back
You will be charged per second based on CPU and memory for 15 seconds. If there are n replica, then it would be n * per second based on CPU * per second based on memory * 15 (sec) for consumption plan
- some time passes without requests (maybe 15 minutes?)
- scale to 0 stops the container.
You will still be charged based on Idle usage price for consumption plan $0.000003 per second each for CPU and memory * min replicas during that time * time (in sec)
You can also refer to the billing document: https://video2.skills-academy.com/en-us/azure/container-apps/billing
To calculate the pricing please refer to this : https://azure.microsoft.com/en-us/pricing/calculator/
Feel free to get back to me if you have any queries or concerns.
Please "Accept Answer" if the answer is helpful so that it can help others in the community.