Compare architectures and find the crossover
compare_architecturesPrice every shape that delivers a capability, and say where they cross over.
This is the tool for "should we move to serverless", "is Lambda cheaper than
EC2", "what would containers cost instead". Answer with the crossover, not a
verdict: one shape is cheaper below some level of traffic and dearer above it,
and the number where that flips is the thing the user can act on.
`capability` is an id from `list_cost_building_blocks` (for example
`serve-http`). `drivers` are the workload's measurements, and EVERY driver the
capability declares must be given, for every shape. That is enforced rather
than defaulted: giving one architecture a favourable assumption the other does
not get is the single easiest way to produce a comparison that looks rigorous
and is not.
`over` names the driver to sweep, usually the one the user is unsure about
(`requests_per_month` is the common one). Pass it to get `break_even`: a priced
curve for each shape and the crossing points between them. `low` and `high`
bound the sweep; omit them for the driver's typical range.
Read `crossings` carefully. Each one carries the band around it where the two
shapes are indistinguishable given the uncertainty in the inputs. Inside that
band the honest answer is "it does not matter, pick on other grounds", and
saying "X is cheaper" there is a claim the numbers do not support.
An EMPTY `crossings` list is not "there is no break-even". Read `no_crossing`,
which says which window was swept and what happened inside it. Usually it means
one shape won at every point in that range, and that the answer is being decided
by one of the drivers you held fixed rather than by the one you swept. Sweeping a
different driver is what finds the flip. Do not report "they never cross" from a
single sweep.
Cost is one input and rarely the deciding one. Request time limits, long-lived
connections, operational effort and what the team already knows all decide this
more often than price does. The reply carries each shape's characteristics for
exactly that reason; pass them on rather than reducing the answer to a total.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| low | No | ||
| high | No | ||
| over | No | ||
| term | No | OnDemand | |
| region | Yes | ||
| drivers | Yes | ||
| capability | Yes |