Class WorkloadPlacer
java.lang.Object
com.eqixiac.equinix.design.placement.WorkloadPlacer
Places every workload of a spec on a portfolio. Pure and deterministic: the same portfolio and
context give the same plan.
For each workload, in spec order:
- Eligible metros: its
pinnedMetroonly (when the portfolio holds it), otherwise every portfolio metro. - Keep the metros that reach every cloud the workload names; when none does, keep those that reach the most and record the missing clouds as an issue.
- Keep the metros whose worst known round trip to any site is within the workload's
maxLatencyMs; when none is, keep them all and record the breach as an issue. Sites whose latency is unknown are not counted against the limit. - Rank by site-weighted round trip (known sites only), then by metro code. The first metro is the primary. When the portfolio has two or more metros and the workload is not pinned, the next ranked eligible metro is its standby: its cloud connections are duplicated there at full size (active/standby), which is what lets the design survive the loss of the primary metro.
A cloud of the spec that no workload names is connected at the best-ranked metro that reaches
it (and a standby), unsized, under the label cloud:<id>. A cloud leg is only created in a
metro that reaches the cloud: a placement that could not honour a cloud records the gap instead.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLabel prefix of the placement made for a cloud that no workload names. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlacementPlanplace(MetroPortfolio portfolio, DesignContext context) static doubleweightedLatency(MetroId metro, DesignContext context) static OptionalDoubleworstSiteLatency(MetroId metro, DesignContext context)
-
Field Details
-
CLOUD_PREFIX
Label prefix of the placement made for a cloud that no workload names.- See Also:
-
-
Method Details
-
place
- Parameters:
portfolio- the metroscontext- the facts of the run- Returns:
- the plan
-
weightedLatency
- Parameters:
metro- a metrocontext- the facts of the run- Returns:
- the site-weighted mean round trip over the sites whose latency is known (weights renormalised over them), or positive infinity when none is known
-
worstSiteLatency
- Parameters:
metro- a metrocontext- the facts of the run- Returns:
- the worst known site round trip from the metro, or empty when no site latency is known
-