Windows Azure. Worker role billing - azure

Can somebody tell please what is the billing policy for worker role instance?
Here Cloud Services Pricing at the bottom a FAQ section tells
If my deployed instance is in the "stopped" state, do I still get billed?
Yes, a stopped instance still occupies the compute resource that powers the instance, and therefore you still get billed. In order to stop billing, you need to delete your deployment.
If my web or worker role was deployed for less than an hour, how much do I get billed for?
Cloud services are billed based on the duration of time your service was deployed for. If your instance was deployed for less than an hour or, multiple hours plus some fraction of hour, you will be charged for that duration only. Azure does not round up the partial hour to full hour for billing - you pay for exactly the duration of time that your Cloud Services instance was in 'running' state.
So what is the exact billing policy? Whether a deployed but "stopped" state worker role is get billed or not?

You're still getting billed.
The analogy here is a like a hotel room. If you still occupy a room (deployed) but you're not there (stopped) you still occupy the room and consume resources (the room cannot be reused).

Related

Azure FunctionApps vs Azure App Services for Compute intensive work

I have 2 questions first related to hosting, second related to sdk/library to use:
I need to write a kind of work allocation service scheduler to people, which will run say every 1 hour to run compute intensive logic in background and push the results in our database. The input may be number of days to create schedule for, number of people available, count of tasks to be done. So primarily its compute intensive.
Should i host it in App Service or in Azure Function (TimerTrigger)? This scheduler run as total background job and never called from UI or any backend API.
If i go App service way i have choice of either Hangfire or WebJob. How should i decide which is good for me.
Certainly quick execution with lesser cost is my criteia to move ahead.
One consideration for Azure function is how long the processing will take. Azure functions have a maximum time limit that depends on hosting plan. When you create a function app in Azure, you must choose a hosting plan for your app. There are three hosting plans available for Azure Functions: Consumption plan, Premium plan, and Dedicated (App Service) plan. An overview of hosting plans and their timeout durations is here: Azure Functions scale and hosting.
Unlimited duration is in Premium plan or Dedicated plan (Unlimited execution duration - 60 minutes guaranteed).
Maximum duration for Consumption plan is 10 minutes.

Freeze Cloud Services for no billing

We have few cloud services with both VMs and web worker roles in it. Is there a way to "freeze" or stop them to not be billed but if we want to start them again?
I saw some answers but most of them are outdated.
Thank you in advance!
Is there a way to "freeze" or stop them to not be billed but if we
want to start them again?
Unfortunately no. You must delete the cloud service deployment to stop the billing. Stopped cloud service will continue to incur charges.
One detail not covered in #gaurav's answer: with Cloud Services, you can scale your number of web or worker instances down to 1, minimizing cost. If you won't be using them for an extended period of time, you can also choose to scale down to a smaller instance size.
Virtual Machines may be stopped (where they're no longer billed, aside from the storage costs related to OS + data disks).

Maximum cloud computing utilization - pay for computing, not idle time

I have one big task to do every day, with no need to scale, that takes about 30 minutes and is DB, processor and memory intensive.
This means actual 16h/month of computation time.
WebJobs require constantly running WebSite 744h/month
WebRole is also constantly running 744h/month
Azure Batch - suited for scaled storage input - storage output
processing (or that is how I understand it)
Stopped cloud service still cost you. Setting instance count to 0 is not available. And paying for 728h/month unused computation time looks like madness. Only thing I can imagine is automatic deployment of cloud service every day and automatic deletion of deployment once task is finished, but this also looks like madness.
Are there any options for this scenario in Azure?
Cloud service will be charged continuously until the deployment is deleted. Yes you can delete it every day and redeploy...
Azure VMs in Stopped (Deallocated) status, does not incur any charge. You can shut them down in portal or by script when you don't need them.
I think there is a large difference in billing if you only use it 62h/month. Would you consider switch this deployment to VM? WorkerRole and VMs can be placed on the same subnet, they can still connect to each other.

cloud services payments

All cloud payments described in hours.
Let's look at situation when server spend 0.75s to generate page and only one time this month (because nobody requested website).
Here is text from AWS and Azure website
"Pay only for what you use. There is no minimum fee. Estimate your
monthly bill using the AWS Simple Monthly Calculator."
"Windows Azure Pricing No upfront costs. Pay only for what you use"
Does it mean that I will pay just for 0.75s or for entire month?
You'll have to pay for one hour:
AWS:
Pricing is per instance-hour consumed for each instance, from the time
an instance is launched until it is terminated. Each partial
instance-hour consumed will be billed as a full hour.
Azure:
Compute hours are billed based on the number of clock hours your
service was deployed multiplied by the number of equivalent small
compute instances included in your deployment. Partial compute
instance hours (prior to conversion) are billed as full compute hours
for each clock hour an instance is deployed.

What about expenses on unused resources in Windows Azure?

The main question is: do I have to pay for unused resources? For instance, Azure pricing calculator says approximately $30/month for XS box. This includes about 750 hours. What if I don't use them all? This is normal for early stage, while development is in progress.
This is just to make it clear if its cheaper to have a virtual hosting for development and beta-testing purposes.
Not exactly a programming question.
That said: Windows Azure Compute instances are metered by the hour, and metering happens when you have deployed instances (whether running or stopped). If you're doing dev work, deploy for an hour or two (or how long it takes you to test), then delete the deployment. Very easy to delete, very easy to redeploy. Just don't delete the actual hosted service definition (urlname.cloudapp.net, associated certificates, affinity group, etc.). Following this pattern, it's easy to test with 5-10 concurrent instances in a deployment throughout the month - just remember to delete the deployment after each test cycle.
#Bart is partially right about SQL Azure being billed for the month. It's actually amortized daily. This also means: If you set up a 5GB db and only have 99MB on a given day (or days), you're billed at the $4.999 monthly rate / # of days in month). That's about 17 cents daily if you stay under 100MB. And if you delete the db, you're no longer billed.
Same goes for Cache - the cost is amortized daily.
I'd look at the full pricing page here.
You do not have to pay for unused resources in SOME of the services.
In your example, if you deploy a website for 10 hours you will be billed for the 10 hours of usage. PLUS any transactions/bandwidth associated with it.
However, some the services do have a flat fee. For example, if you deploy a 5 gig DB to SQL Azure and u do not use it...u will be billed the monthly rate even if it just sits there.
Also your definition of "use it" needs to be clear. Azure will bill you, if you have ANYTHING deployed. Even if the VM is stopped, you are getting billed. Therefore, the best solution is to:
- monitor your usage (its updated multiple times per day)
- use a free trial, MSDN account or promotion to see what the charges will be
- call MIcrosoft...Azure is the hot thing now and they WILL give you a break on charges if they are within reason.

Resources