Class FailureSimulator
java.lang.Object
com.eqixiac.equinix.design.resilience.FailureSimulator
Simulates failure scenarios on one
DesignGraph. Deterministic and side-effect free; build one
per graph and call simulate(FailureScenario) for each scenario.
Rules
- A failed node takes every edge touching it; a metro failure takes the metro's router and on-ramps.
- Each workload runs in its primary metro or, failing that, its standby metro: whichever surviving host reaches more of its clouds, then more site weight (the primary on a tie). It is down when neither survives.
- A site reaches a host over its surviving access circuits and the backbone (shortest round trip); a host reaches a cloud through its Cloud Router, over a cloud connection in its own metro or, when that is gone, across the backbone to another metro's connection to the same cloud. Paths never transit another site or another cloud.
- A site counts as served only within the workload's
maxLatencyMsand, for its access hop, the spec'smaxLatencyMs; an unknown latency is not held against it. - Capacity: every sized workload's bandwidth is put on the connection its path uses; when a connection's
demand exceeds its capacity each workload on it gets
capacity / demand. A connection of unknown capacity carries everything (and the report says so). Spill-over onto a third connection is not modelled.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbaseline()graph()simulate(FailureScenario scenario) simulateAll(Collection<FailureScenario> scenarios)
-
Constructor Details
-
FailureSimulator
- Parameters:
graph- the graph to simulate
-
-
Method Details
-
graph
- Returns:
- the graph
-
baseline
- Returns:
- the outcome with nothing failed
-
simulate
- Parameters:
scenario- a scenario- Returns:
- what still works, compared with the baseline
-
simulateAll
- Parameters:
scenarios- scenarios- Returns:
- their outcomes, in the same order
-