Class CatalogDesignContext
java.lang.Object
com.eqixiac.equinix.design.optimizer.context.CatalogDesignContext
- All Implemented Interfaces:
DesignContext
The
DesignContext of one Metro Optimizer run: the metro catalogue, Fabric's measured
metro-to-metro round trips, cloud reachability per metro and the cost model, held in memory and
never changed after CatalogDesignContext.Builder.build().
Built from live Fabric data by FabricCatalogLoader, or directly with builder(DesignSpec)
(tests, offline what-ifs, a cached catalogue).
Latency rules (all round trip)
- A site that names a metro, to that same metro: 0.5 ms, an
assumption (
LatencyFigure.Basis.INTRA_METRO). - A site that names a metro, to a metro Fabric measures it against: the measurement
(
LatencyFigure.Basis.MEASURED). - Otherwise, when both ends have coordinates (the site's own, else its metro's): the
straight-fibre floor times the
calibrated route factor(LatencyFigure.Basis.ESTIMATED). - Otherwise unknown.
Site weights
A site's raw weight is its explicit weight; else its headcount times its role's
importance multiplier (1.0 without a role); else, when it has neither, its role multiplier (1.0
without a role) times the mean raw weight of the sites that do carry one (1 when none does), that
is, "an average site for its role". Raw weights are normalised to sum to 1.
siteWeightingNotes() names every site whose weight was inferred.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleRound trip assumed between a site and the metro it names (no Fabric figure exists for it). -
Method Summary
Modifier and TypeMethodDescriptionasOf()static CatalogDesignContext.Builderbuilder(DesignSpec spec) Round trip between two metros with its basis: the same metro is 0.5 ms (assumed), a measured pair is Fabric's figure, otherwise a calibrated estimate, otherwise unknown.latency(MetroId metro, SiteIntent site) Round trip from a metro to a site, with its basis.booleanlatencyMeasured(MetroId metro, SiteIntent site) intmetros()providerAvailability(MetroId metro) reachableClouds(MetroId metro) roundTripLatencyMs(MetroId a, MetroId b) Round-trip latency between two metros, measured where Fabric publishes it and estimated otherwise.roundTripLatencyMs(MetroId metro, SiteIntent site) Round-trip latency between a metro and a site: Fabric's measurement when the site names a metro and the pair is measured, otherwise an estimate from distance, otherwise unknown.doublesiteWeight(SiteIntent site) spec()withCostModel(CostModel model) A copy of this context with another cost model (the facts are shared).
-
Field Details
-
INTRA_METRO_RTT_MS
public static final double INTRA_METRO_RTT_MSRound trip assumed between a site and the metro it names (no Fabric figure exists for it).- See Also:
-
-
Method Details
-
builder
- Parameters:
spec- the design the context describes- Returns:
- an empty builder
-
spec
- Specified by:
specin interfaceDesignContext- Returns:
- the design being evaluated
-
metros
- Specified by:
metrosin interfaceDesignContext- Returns:
- every metro the catalogue returned, in a stable order (by code)
-
metro
- Specified by:
metroin interfaceDesignContext- Parameters:
metro- a metro- Returns:
- its facts, or empty when the catalogue does not list it
-
roundTripLatencyMs
Description copied from interface:DesignContextRound-trip latency between a metro and a site: Fabric's measurement when the site names a metro and the pair is measured, otherwise an estimate from distance, otherwise unknown.- Specified by:
roundTripLatencyMsin interfaceDesignContext- Parameters:
metro- a metrosite- a site of the spec- Returns:
- the latency in ms, or empty when it is unknown
-
latencyMeasured
- Specified by:
latencyMeasuredin interfaceDesignContext- Parameters:
metro- a metrosite- a site of the spec- Returns:
truewhenDesignContext.roundTripLatencyMs(MetroId, SiteIntent)is a Fabric measurement,falsewhen it is an estimate or unknown
-
roundTripLatencyMs
Description copied from interface:DesignContextRound-trip latency between two metros, measured where Fabric publishes it and estimated otherwise.- Specified by:
roundTripLatencyMsin interfaceDesignContext- Parameters:
a- one metrob- the other metro- Returns:
- the latency in ms, or empty when it is unknown
-
latency
Round trip from a metro to a site, with its basis. See the class description for the rules.- Parameters:
metro- a metrosite- a site of the spec- Returns:
- the figure;
LatencyFigure.Basis.UNKNOWNwhen it cannot be known
-
latency
Round trip between two metros with its basis: the same metro is 0.5 ms (assumed), a measured pair is Fabric's figure, otherwise a calibrated estimate, otherwise unknown.- Parameters:
a- one metrob- the other metro- Returns:
- the figure
-
siteWeight
- Specified by:
siteWeightin interfaceDesignContext- Parameters:
site- a site of the spec- Returns:
- the site's share of the total site weight, between 0 and 1 (weights sum to 1 across sites)
-
reachableClouds
- Specified by:
reachableCloudsin interfaceDesignContext- Parameters:
metro- a metro- Returns:
- the ids of the spec's
CloudIntents that can be reached privately from the metro
-
providerAvailability
- Parameters:
metro- a metro- Returns:
- the service profile chosen per cloud id at that metro (only clouds reachable there)
-
costModel
- Specified by:
costModelin interfaceDesignContext- Returns:
- the cost model that prices portfolios in this run
-
asOf
- Specified by:
asOfin interfaceDesignContext- Returns:
- when the facts were gathered
-
calibration
- Returns:
- the route factor used for unmeasured pairs and what it was fitted from
-
dataNotes
-
siteWeightingNotes
-
measuredPairCount
public int measuredPairCount()- Returns:
- how many metro pairs Fabric measures in this catalogue
-
withCostModel
A copy of this context with another cost model (the facts are shared).- Parameters:
model- the cost model- Returns:
- the new context
-