Zaroz
Units

What units cost: the bill with worked numbers

The numbers on this page use an example plan at EUR 7.20 per month that includes one unit. Your plan's real price is on its page, and the quote endpoint returns your exact figures before you commit to anything.

The rule

  1. The plan's monthly price covers the units included in the plan (normally one). It is paid up front, like any subscription.
  2. Every unit above the included ones is an extra unit. It is billed for the hours it actually runs, at the plan's monthly price divided by 720, with no surcharge.
  3. Each time an extra unit starts, it is billed for at least 5 minutes.
  4. Extra units are added up per calendar month (UTC) and invoiced after the month ends.

This is the same for a fixed policy and an autoscaled one. There is no separate multiplied price for "3 units".

The rate

Code
extra unit-hour = plan monthly price / 720 EUR 7.20 / 720 = EUR 0.01 per extra unit-hour

720 is 30 days of 24 hours. A whole 30-day month of one extra unit costs exactly the plan price.

Worked examples

A. One unit, nothing else. You pay EUR 7.20. No extra units, no metering.

B. Fixed at 3 units for a whole 30-day month. One unit is included, two are extra:

Code
2 extra units x 720 hours x EUR 0.01 = EUR 14.40 EUR 7.20 + EUR 14.40 = EUR 21.60

C. Autoscaled 1 to 4, a quiet month with two busy days. On one day it ran 2 extra units for 6 hours; on another, 1 extra unit for 3 hours:

Code
(2 x 6) + (1 x 3) = 15 extra unit-hours 15 x EUR 0.01 = EUR 0.15 EUR 7.20 + EUR 0.15 = EUR 7.35

D. A very short start. An extra unit that runs 90 seconds is billed 5 minutes:

Code
5 / 60 hours x EUR 0.01 = EUR 0.00083

This minimum is why a policy that flaps up and down is more expensive than one that holds steady, and why the cooldown settings exist.

E. A public port. Raw ports are billed by the hour they are held, capped at one port-month. At an example price of EUR 1.00 per port-month, a port held 72 hours costs 72 / 720 x 1.00 = EUR 0.10, and a port held all month costs EUR 1.00. HTTPS endpoints are free. Ports are billed in arrears together with the extra units.

The worst case, before you save

POST .../units/policy/quote takes the same body as the policy update and returns what it could cost at most, without saving it. For autoscaled between 1 and 4 units on the plan above:

Code
extra_units = 3 (4 max minus 1 included) hourly_cents = 1 (EUR 0.01 per extra unit-hour) worst_case_hours = 3 x 744 = 2232 (the longest month, 31 days) worst_case_cents = 2232 (EUR 22.32)

If you also set spend_cap_cents to 1500, monthly_cents is 1500 and cap_binds is true. The worst case is rarely reached; it is the number that cannot be exceeded.

The spend cap

spend_cap_cents limits how much extra units may cost in a month. At or over it, scaling refuses to grow, and records why. It never stops a running unit.

Organizations without a credit limit hold a wallet reservation for the cap while scaling is on, so the end-of-month invoice can always be paid. If your available balance cannot cover it, turning scaling on is refused with the amount you need. A running Workload is never stopped for this.

Reading your bill

The units chart (GET .../units/count) is drawn from the same records the invoice is built from: how many units ran, how many were billed as extra, and why the count changed. If a number on the invoice surprises you, the chart for the same month explains it.

A unit that is scaled away stops billing at that moment.

Last modified on