Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m starting to work on a project that will use the DO API to spin up large VM instances for short process runs. The idea is I will spin up the VM and provide a script that will run the task at hand. That script will do some intensive compute and upload the results somewhere. The VM will then power itself off, and a monitor process on my end will check every minute; once the VM is powered off it will be destroyed via the API. I have one question though: I’m not clear on how granular the Digital Ocean billing system is.
I’ve experimented with the lowest spec VM, but its per-hour billing is less than $0.01, so it doesn’t matter if I use it for one minute or for one hour, I’m still going to be billed $0.01.
However, if I spin up a very expensive droplet (such as a 256GB memory-optimized droplet) which runs a script doing some intensive processing that takes only around 15 minutes, am I billed for one hour of that VM, or am I billed for 15 minutes of it? The largest memory-optimized VM costs $2.97/hour, so does this mean the minimum billable time period is $2.97 even if I spin up the VM and immediately destroy it?
Similarly, what if the VM runs for one hour and thirty seconds? Am I then billed $5.94, or am I billed $3.02 ($2.97 + ~5c for the extra minute) This scenario could get expensive and ugly if billing is strictly hourly; suppose my process finished at 59:45 after the VM was created, but the script I am running to check for and destroy the VM when it is finished only checks once per minute, and it doesn’t grab the status and destroy the VM until 01:00:05 - I’d then be billed an extra $2.97 for five seconds during which the VM was powered off.
If there is more granularity, what level is it? Per minute? Per second? etc.?
song changnyoung
83e92542216b4d4eb6e40f08a54672
Noor Fatima
Binaya Sharma
Laveenk16
mohammedosa506-lang
Jamol Tokhtaev
Jamol Tokhtaev
daniellekwint
btframework
nicrossi
nicrossi