Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How Pay Per Hour works?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How Pay Per Hour works?

WHTWHT Member
edited October 2016 in General

If I switch off the VPS am not charged? Example I use the VPS only 1 hour per day and turn it off for 23 other hours I do pay only for one hour? Ex. at digitalocean.

Is there a provider that charged per hour and have windows?

Thank you guys.

Comments

  • AlexBarakovAlexBarakov Patron Provider, Veteran

    This is not how pay per hour works. If your VPS is turned off, you will still be charged, because the resources are reserved for you. You need to delete the VM, to avoid being charged for it. That's how any sane provider works.

  • Turning it off won't prevent charges on most (all?) hourly providers as they are still reserving disk, IP, etc.

    Destroying the VM completely will stop you from getting billed.

  • WHTWHT Member

    Well then nothing. I was thinking to get a vps, use it 30 hours per month and pay 99cents per month.

  • BeardyUnixGuyBeardyUnixGuy Member
    edited October 2016

    @WHT, as mentioned above, you'll still be charged for certain reserved resources. However, depending on the provider, you could still save some coin.

    For example, at iwStack, stopped computing instances are only charged for storage and reserved IP(s). This may not be the case with all providers.

    Digital Ocean still charges CPU+RAM for stopped/powered-off instances.

    Thanked by 1WHT
  • cochoncochon Member
    edited October 2016

    Also it depends on what you want to use the VPS for, for just a few hours a month. If you only want, for example, an occasional remote desktop but don't need to store persistent or changing data then all the providers have scripting for the build of a new instance.

    I use both DO and Vultr instances as remote desktops when away from the office and have a script to apt-get all the relevant xfce and x2g0 stuff and even register its IP in DNS remotely, so I can log in and just use it from a borrowed PC after just a few minutes from spinning up a new instance. When I'm finished with it after a few days or hours, I tear it down and stop paying.

    EDIT: Just realised you wanted Windows, which probably makes my suggestion unrealistic, sorry.

  • raindog308raindog308 Administrator, Veteran

    WHT said: Well then nothing. I was thinking to get a vps, use it 30 hours per month and pay 99cents per month.

    ...and why can't you do this?

    I mean, that's what I do.

    You just can't save state across instantiations on that VM, but so what:

    (1) write a script that sets up the server the way you want. Not that hard, really - just take notes when you set it up next time and write a script to do that, then turn it off, run your script, and see if you get the same thing or add things you forgot. I mean, 99% of this is apt-get or tweaking .conf files. Instead of editing config files via script, you could pull down via wget (dropbox, another VPS, github, whatever).

    I don't think DO lets you run startup scripts the way Vultr does during VM creation, though you can use cloud-init, which I haven't played with. Still, it's not hard to put your script on dropbox and then when you login, wget it and run it. Or have a "deploy_my_dev.sh" script that does an API call to create the VM, and then uses the ssh key you deployed (DO, Vultr both allow this) to login and run your setup.

    You could even use ansible, either from another box or on the dev box, pointed at itself.

    (2) Keep all your code in /some/place and tar it up before you turn off the instance. you could even write a script to save/rsync/restore/etc. Or ssh-fs. Or keep it on Dropbox. S3. Etc.

    I'm telling you these things because this is exactly what I do. I like to have my dev environment in the cloud because it makes pushing/ansibling much faster. I don't need my dev box at 3am, but at 6pm I want it restored exactly as it was.

    I use private GitHub repositories but you could use self-hosted git, or just scp your tarball. With a little creativity, turning on your instance and having your dev world back where you left off is certainly possible and very cheap with these metered-billing options.

    With an API like DO or Vultr, you don't even need to login to the web panel to fire up the instance. On your laptop, recreate_dev.sh or whatever and then 5 minutes later you get a page on your phone that it's up and running and you're good to go.

    You'd learn a lot of scripting skills and sysadmin doing this.

    Thanked by 1WHT
  • joepie91joepie91 Member, Patron Provider

    @raindog308 said:

    WHT said: Well then nothing. I was thinking to get a vps, use it 30 hours per month and pay 99cents per month.

    ...and why can't you do this?

    I mean, that's what I do.

    You just can't save state across instantiations on that VM, but so what:

    [snip]

    Obligatory mention of NixOS + NixOps, which is pretty much designed for this kind of "reproducible machine" thing.

    Thanked by 1raindog308
  • bersybersy Member
    edited October 2016

    https://www.lowendtalk.com/discussion/comment/1807946/#Comment_1807946

    https://express.ikoula.com/en/public-cloud Seems they still offer €100 (first month) + €10 (permanent) credits.

    Thanked by 1WHT
  • raindog308raindog308 Administrator, Veteran

    joepie91 said: Obligatory mention of NixOS + NixOps, which is pretty much designed for this kind of "reproducible machine" thing.

    I don't think their comments on Docker are quite accurate, though, are they?

    "Building a docker image starts with a well-known state (e.g a vanilla Ubuntu-LTS image), and the steps in a Dockerfile are simply executed sequentially. When you rebuild the Dockerfile it doesn’t try and get you from the current state to the new state, it just throws away the current state and rebuilds the new state from scratch. Of course, it also uses caching so that you don’t have to wait half an hour to rebuild stuff that you haven’t changed. Unfortunately for docker, its caching mechanism is “usually good enough”, a.k.a “sometimes catastrophically broken” if you aren’t aware of its impurities2.
    

    I thought Docker worked via copy-on-write.

    The author's constant talk of "purity" and "impurity" comes off as a bit Strangelovian for me ("I drink only rain water and I run only NixOS!") but it looks interesting. I find that practically speaking, taking the stock provider image and applying my apt-gets and confs works just fine in practice, even if some-package-2.11 is some-package-2.12 the next time and there is impurity.

  • Lunanode.com is probably what you want. Create a root volume and shelve or destroy the VM when you're done with it. You can read more on their site, but Lunanode is a lot better on price.

Sign In or Register to comment.