Per second billing of AWS EC2 instances

On September 18th, AWS announced per-second billing on EC2 instances running Linux and EBS volumes. Before this announcement, you would have been billed for every hour an instance was up and running, even if you only used a few seconds of that hour. With this change, the cost of instances will be calculated for total seconds when instances are in “running state”.

Before you start taking advantage of this update, a few things you should note. First, the pricing change will only initially apply to Linux instances launched from “free” AMIs. This will exclude RHEL, SLES, and Windows, as well as any Marketplace AMI.

Hopefully, once vendors have a chance to work with per-second billing, this will change. The change will apply to on-demand, reserved and spot instances. Secondly, while it is granular to the second, there is a minimum instance time of one minute.

Per second billing of Google cloud virtual machine instances

The cloud wars rage on, and this time, the battle is overbilling increments.

Google announced that its cloud service will offer per-second billing. The move comes just days after Amazon Web Service made the same announcement. However, until 26th September, Google Cloud primarily billed by the minute.

Google cloud platform applied its new per-second pricing to many of its core products, including its Compute Engine and App Engine, which allow companies to build software and store data within Google’s servers. Customers who are using servers of Microsoft Windows or Linux will not be able to take this advantage.

Like AWS, Google charges for a minimum of one minute.

What does this mean to you?

If your consumption patterns are largely static and unchanging, you probably don’t have the ability to take advantage of this change and won’t notice a difference. However, if your consumption is at all variable or spiky, you can take advantage of this and may see a reduction in cost.

This can be understood with below example.

Some jobs like running EMR cluster requires less time around 10 minutes to run the job and then terminate or stop the instances.

However, whether the job took 10 minutes or 50 minutes, you paid for the full hour. Now, with the instances being billed at a per second rate, it changes how you might configure your instances. First off, it makes sense to run more instances for a shorter amount of time.

Take, for example, a job that is using m4.2xlarge instances. These instances come in at $0.4 per hour. If my job can be run in an hour with 10 instances, then my cost is $4 for the job.

However, with the removal of the hour minimum, you can now look at doubling the compute power to 20 and paying the same price for a half hour return.

Finally, if you are not already doing so, another change would be to use spot instances for your computing power. If your data processing needs have flexibility in schedule, using a greater amount of spot instances for a short amount of time can greatly reduce your bill.

What about Microsoft Azure?

So far, Microsoft hasn’t made a similar move. “With Azure Container Instances we’ve actually led the way for per-second billing, with a service that spins up in seconds and spins down in seconds, we realized it was incredibly critical to give customers this granularity in costs,” says Corey Sanders, Microsoft’s head of product for Azure Compute

As for regular virtual machines, Sanders stayed on message and noted that Microsoft wanted to focus on containers because it’s there that per-second billing makes the most sense. “We’re always looking to improve billing constructs across our platform and to make it easier and more agile for our customers to use,” he said.

Here is azure container instance pricing with an example.