Class TcoCalculator

java.lang.Object
com.eqixiac.equinix.design.value.tco.TcoCalculator

public final class TcoCalculator extends Object
Fluent calculator that compares the total cost of ownership of a workload across the DeploymentArchetypes - public cloud over the internet, on-prem, Equinix-interconnected, and (for a cloud-to-cloud comparison) the providers' native multicloud link - and reports which is cheapest over the commitment term (monthly recurring × term months + one-time setup) and by how much.

Example

TcoComparison tco = fabric.tcoComparison()
    .egress(100, DataUnit.TERABYTE)
    .fromCloud(CloudProviderType.AWS).inRegion("us-east-1")
    .viaMetro(MetroCode.DC).bandwidthMbps(10_000)
    .term(Term.MONTH_36)
    .compare();

System.out.println(tco.toMarkdown());

The Equinix-interconnect archetype uses live Fabric pricing and private-egress rates where available; the public-cloud-internet and on-prem archetypes use indicative reference figures, and the on-prem inputs are overridable.

Cloud-to-cloud comparison

Beta. Declaring a peer cloud with toCloud(...) changes the question from "how should this cloud's egress leave" to "how should these two clouds be joined", and the comparison becomes two-sided so that no archetype is priced on less traffic or fewer components than another:

What each archetype prices when a peer cloud is set
ArchetypeComponents
PUBLIC_CLOUD_INTERNETinternet egress from both clouds
EQUINIX_INTERCONNECTprivate egress from both clouds, two Fabric virtual connections, the CSP interconnect-port reference figure for both clouds, plus the optional Cloud Router and colocation primitives as before
NATIVE_MULTICLOUD_INTERCONNECTone flat fee per provider and the link's per-GB charge (zero where both providers publish zero)
ON_PREMnot priced. Its inputs (carrier transit, hardware, one cross-connect, power) describe one site and contain no egress from either cloud, so a total built from them would rank against the other archetypes on less traffic. It leaves the default archetype set once a peer cloud is set; when requested explicitly it is reported unpriced with that reason and is never recommended.
TcoComparison tco = fabric.tcoComparison()
    .egress(100, DataUnit.TERABYTE)                       // AWS -> Google Cloud, per month
    .reverseEgress(40, DataUnit.TERABYTE)                 // Google Cloud -> AWS, per month
    .fromCloud(CloudProviderType.AWS).inRegion("us-east-1")
    .toCloud(CloudProviderType.GOOGLE_CLOUD).toRegion("us-east4")
    .viaMetro(MetroCode.DC).bandwidthMbps(10_000)
    .pathTier(1)
    .compare();

Without toCloud(...) the comparison, its defaults and its output are the single-cloud ones described above.

  • Method Details

    • builder

      public static TcoCalculator.Builder builder(FabricGateway fabric)
      Creates a TCO calculator builder over the given Fabric client.
      Parameters:
      fabric - the Fabric client (or any FabricGateway) used for live pricing
      Returns:
      a new TcoCalculator.Builder
    • forSpec

      public static TcoCalculator.Builder forSpec(FabricGateway fabric, DesignSpec spec, String cloudId, MetroPortfolio chosen)
      A builder preset from a DesignSpec the way the optimiser's RateCardCostModel prices it (see SpecInputs): the cloud's provider, region and monthly egress; bandwidth from the workloads reaching it (rounded up to the Fabric tier); the chosen portfolio's metro; the spec's term (on demand when unset); and the router-originated build the Deployment Wizard uses: an IP_VC from a STANDARD Fabric Cloud Router, no cross-connect and no cabinet. The comparison carries the spec fingerprint and the assumptions made. Any lever can still be overridden before TcoCalculator.Builder.compare().
      Parameters:
      fabric - the Fabric client for live pricing (may be null with a supplied rate card)
      spec - the design spec
      cloudId - the cloud to compare for, or null for the first cloud with a provider
      chosen - the portfolio a run chose, or null
      Returns:
      the preset builder