-
Notifications
You must be signed in to change notification settings - Fork 1
Rate
A rate defines monetary value calculations for a single measure in the data. Rates are not used individually, but as part of a Price plan
A rate consists on an input value (value) and a fixed and variable rate, that is applied normally in tiers, within a tier, the calculation is like this:
Cost = fixed_rate + f(variable_rate, value)
Fixed rate is applied in full, independently of the input, while variable rates are applied depending on the input value. When applying fixed rate, that can be prorated by time or not, depending on the calculation (see below)
There are three types of calculations that can applied to the input value. Calculation is a parameter of the rate itself, and not of the input. You can add as many rates (different or similar) to a Price plan and normally all of them will be applied.
- Occurrence: the rate is applied if it is present. For instance, $ 10 per month if the account is present. Fixed cost are always added fully, variable costs will only be added if the account is present. In that way, you can add a fixed rate to the price plan, or a fixed rate if an specific event is present in the system.
- Duration: the rate is applied depending on the duration of the event. Fixed rate will be prorated, variable rate will be calculated using the duration of the event as a modifier, using both the duration and the quantity of the input for variable rating. (i.e. A VM is rated based on the number of CPU that has been used while the VM was running 4€/hour/CPU)
- Quantity: the rate is applied depending on the quantity of the value per cycle, independently of the duration. For instance, MB downloaded. That is independent on the time that is needed to download those Mb.
Occurrence: Openshift pro plan costs 50$ per region per month, whatever you do with it. Duration: An AWS EC2 instance is charged depending on the Operating system, the flavour, the region, and the time the VM has been running:
Amazon Linux in US EAST (Ohio) --> t2.nano --> $0.0058 per Hour
Amazon Linux in US EAST (Ohio) --> m4.16xlarge --> $3.2 per Hour
A t2.nano VM running for 100 hours with that Linux during the the period will be rated as:
100 h * $0.0058 / hour = $0.58
Just for the costs associated to the VM A m2.16xlarge VM running for 200 hours with Amazon Linux during the period will be rated as:
200 h * $3.2 / hour = $640.00
Just for the costs associated to the VM
An account running both will be charged the sum of the costs ($640.58)
- Per time: It is possible to define a rate per time (i.e. 5 $ per hour). It will be applied as many times as needed on the cycle
- Per unit: You can define the same rate as 1$/Mbps or 1000$/Kbps, to make this easier to understand.
We differentiate between SI units (Mb = 1000 b), and BINARY units (Mib = 1024b)
Defining per unit or per time won't modify the rates, 24$/day and 1$/hour are exactly the same rate (if you don't take into account 28, 29, 30, 31 days in month).
- Minimum step: it defines the minimum amount considered. For instance, 1 b with a minimum step of 1MB will be considered as 1MB. Example: Red Hat rates are defined as x$ /year / par of sockets. Using 1 CPU per one month in a single socket 8 core CPU will be charged as 2 sockets one full year.
For instance, AWS per second billing is actually 60+1 (the first 60 seconds are always considered in full). Costs for amazon used to be with a minimum of 1 hours (and some, like the free tier, still uses that minimum step)
## Part of the JSON with pricing for EC2 in AWS:
"X9WFNZWDEREBUWQX.HU7G6KETJZ" : {
"offerTermCode" : "HU7G6KETJZ",
"sku" : "X9WFNZWDEREBUWQX",
"effectiveDate" : "2016-11-30T23:59:59Z",
"priceDimensions" : {
"X9WFNZWDEREBUWQX.HU7G6KETJZ.2TG2D8R56U" : {
"rateCode" : "X9WFNZWDEREBUWQX.HU7G6KETJZ.2TG2D8R56U",
"description" : "Upfront Fee",
"unit" : "Quantity",
"pricePerUnit" : {
"USD" : "3018"
},
"appliesTo" : [ ]
},
"X9WFNZWDEREBUWQX.HU7G6KETJZ.6YS6EN2CT7" : {
"rateCode" : "X9WFNZWDEREBUWQX.HU7G6KETJZ.6YS6EN2CT7",
"description" : "Red Hat Enterprise Linux (Amazon VPC), c4.4xlarge reserved instance applied",
"beginRange" : "0",
"endRange" : "Inf",
"unit" : "Hrs",
"pricePerUnit" : {
"USD" : "0.4740000000"
},
"appliesTo" : [ ]
}
},
"termAttributes" : {
"LeaseContractLength" : "1yr",
"OfferingClass" : "standard",
"PurchaseOption" : "Partial Upfront"
}
},
"X9WFNZWDEREBUWQX.MZU6U2429S" : {
"offerTermCode" : "MZU6U2429S",
"sku" : "X9WFNZWDEREBUWQX",
"effectiveDate" : "2017-04-30T23:59:59Z",
"priceDimensions" : {
"X9WFNZWDEREBUWQX.MZU6U2429S.6YS6EN2CT7" : {
"rateCode" : "X9WFNZWDEREBUWQX.MZU6U2429S.6YS6EN2CT7",
"description" : "Red Hat Enterprise Linux (Amazon VPC), c4.4xlarge reserved instance applied",
"beginRange" : "0",
"endRange" : "Inf",
"unit" : "Hrs",
"pricePerUnit" : {
"USD" : "0.0000000000"
},
"appliesTo" : [ ]
},
"X9WFNZWDEREBUWQX.MZU6U2429S.2TG2D8R56U" : {
"rateCode" : "X9WFNZWDEREBUWQX.MZU6U2429S.2TG2D8R56U",
"description" : "Upfront Fee",
"unit" : "Quantity",
"pricePerUnit" : {
"USD" : "18581"
},
"appliesTo" : [ ]
}
},
"termAttributes" : {
"LeaseContractLength" : "3yr",
"OfferingClass" : "convertible",
"PurchaseOption" : "All Upfront"
}
},