Class ResilienceAnalyzer
java.lang.Object
com.eqixiac.equinix.design.resilience.ResilienceAnalyzer
Analyses how a design survives failures: builds its
DesignGraph, simulates every single failure
(exhaustively) and pairs of failures (bounded), ranks the blast radius, finds single points of failure
and correlated risks, estimates availability and proposes remediation, re-simulating it where it can.
// Live (read-only): load the Fabric catalogue, run the optimiser, analyse its recommendation
ResilienceReport report = ResilienceAnalyzer.forSpec(fabric, spec).run();
System.out.println(report.toMarkdown());
// An explicit portfolio, or an optimiser result you already have
ResilienceAnalyzer.forSpec(fabric, spec).portfolio(MetroPortfolio.ofCodes("DC", "NY")).run();
ResilienceAnalyzer.forSpec(fabric, spec).optimization(result).run();
// Offline, over facts you already hold (tests, cached catalogue, what-ifs)
ResilienceAnalyzer.forContext(catalogContext).run();
Read-only: it never creates, changes or deletes anything. Without an explicit portfolio, the
portfolio is the Metro Optimizer's recommendation for the spec; with a CatalogDesignContext
this needs no network, otherwise the optimiser prices with RateCard.standardChain(fabric)
unless a rateCard(RateCard) is given.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResilienceReportanalyze(DesignContext context, MetroPortfolio metros, ResilienceOptions options) The analysis itself, pure: no I/O, deterministic apart fromtimingsMs.static ResilienceAnalyzerforContext(DesignContext context) Analyses over facts already gathered (no network unless the optimiser has to price and the context has no cost model).static ResilienceAnalyzerforSpec(FabricGateway fabric, DesignSpec spec) Analyses a spec against live Fabric data (read-only).optimization(OptimizationResult result) options(ResilienceOptions resilienceOptions) peering(PeeringIntelligenceResult result) portfolio(MetroPortfolio metros) run()Runs the analysis.
-
Method Details
-
forSpec
Analyses a spec against live Fabric data (read-only).- Parameters:
fabric- the Fabric APIspec- the design- Returns:
- an analysis to configure and
run()
-
forContext
Analyses over facts already gathered (no network unless the optimiser has to price and the context has no cost model).- Parameters:
context- the facts; its spec is the design- Returns:
- an analysis to configure and
run()
-
portfolio
- Parameters:
metros- the portfolio to analyse instead of the optimiser's recommendation- Returns:
- this analysis
-
optimization
- Parameters:
result- an optimiser result whose recommended portfolio is analysed (it must be for the same spec)- Returns:
- this analysis
-
rateCard
- Parameters:
card- the rate card the optimiser prices with when it has to run- Returns:
- this analysis
-
options
- Parameters:
resilienceOptions- graph and simulation options- Returns:
- this analysis
-
peering
- Parameters:
result- a peering analysis whose presence is drawn into the graph as peer nodes- Returns:
- this analysis
-
run
Runs the analysis.- Returns:
- the report
- Throws:
IllegalArgumentException- when the spec has errors, the optimisation result belongs to another spec, or nothing is feasible to analyse
-
analyze
public static ResilienceReport analyze(DesignContext context, MetroPortfolio metros, ResilienceOptions options) The analysis itself, pure: no I/O, deterministic apart fromtimingsMs.- Parameters:
context- the facts (its spec is the design)metros- the portfoliooptions- options;nullfor the defaults- Returns:
- the report
-