Dreamcompute or a VPS for small, lightweight setup

dreamcompute

#1

In the long run, once I’ve sold plenty, I’m sure that the answer is dedicated FreeBSD servers. But in the meantime . . .

I need to run a very lightly loaded (< 1 qps) postgresSQL server (9.5+) which only talks to a custom program running on the server, which talks to the ports.

mySQL is absolutely, categorically, non-negitiably not an option for this for a variety of reasons that I won’t go into here.

The tables are very small. For each “debtor” instance for the user, there a few hundred (more than 500, less than 1000) rows, with a few columns each. On user launch on a desktop, pretty much the entire table gets read (it’s actually full of SQLite commands), after which it is checked periodically for changes.

From time to time the desktop application sends an update for any changed entires, and the server application sends back any other changes that have accumulated, as well as propagating the changes to any other users connected using the same debtor.

Most of the time, it will be sleeping, waiting for the next query.

The quirk is that for performance reasons, I do seem to need to leave the database connection open, as the query takes ~1ms, while opening a connection appears to be ~100ms.

Am I going to need a VPS, or is this something I can do with Dreamcompute until the load is enough to worry about?

And can an instance be launched and stick around (minutes, ours) simply by a user attempting to access the port, or does it need to “stay” on and wait?

I assume the time calculations for billing are clock time, not cpu time?

And I’m not clear whether I need to upload the whole server image when I turn it on and download before turning off, or does it stick around stored while not running?

Thanks

hawk


#2

If you want to deal with hardware, maybe :slight_smile: Otherwise FreeBSD on DreamCompute cloud should work… (I have it on my todo list of things to write about, document how to do that, etc.)

I’m not sure you can install PostgreSQL on DreamHost managed VPS, and in any case I’d look at the costs of the option. The smallest VPS is $15/month while the cheapest cloud VM is $4.50/month with 512MB or $6/month for the 1GB ram size. The difference is that VPS are managed, meaning that the base operating system and the default application packages are upgraded and maintained automatically. Cloud VMs are not managed, meaning that you have to take care of basic maintenance, cleanups, backups, etc. But if you’re ready to fiddle with your own hardware and FreeBSD you shouldn’t be afraid of that :slight_smile:

Consider that from the moment you call the API to start a cloud instance to when you’re able to ssh into it it takes about 30 seconds… and that’s one of the fastest times in the industry. If you’re concerned about 1ms vs 100ms response times, that’s not an option.

For billing purposes, we count the actual clock time that a virtual machine has resources reserved: the time a specific ID of a virtual machine either runs or is paused counts as billable time (up to 600 hours per month, the rest is free).

You can take a snapshot of your instance and shut it down, restarting it again once you need it … Once it’s in shutdown mode, it’s not billed. But remember that it takes ~30 seconds to boot back up, and depending on your boot sequence your database may take longer to come online. You know best :slight_smile: