Walkthrough of full SDK implementation
Take one design through every design engine: write the spec, choose metros, simulate failures, plan for growth, price the egress, record the decision, build the deployment plan, and decide whether to deploy.
Scenario#
A company has a cage in Ashburn, offices in Chicago, Dallas, London, and Singapore, and a plant in Frankfurt. It needs private access to three clouds, public peering with three networks, and internet breakout.
| Input | Value |
|---|---|
| Sites | A cage in Ashburn (DC), offices in Chicago, Dallas, London, and Singapore, and a plant in Frankfurt |
| Clouds | AWS us-east-1 (60,000 GB per month out), Azure westeurope (30,000), Google Cloud asia-southeast1 (15,000) |
| Workloads | order-api, 1 Gbps, with a 250 ms round-trip limit. analytics, 2 Gbps. inference, 500 Mbps, pinned to SG. plant-erp, 500 Mbps, custom type, pinned to FR. disaster-recovery, 1 Gbps. |
| Peers | AS13335, AS20940, AS8075 |
| Constraints | Metros DC and FR required. A metro in each of AMER, EMEA, and APAC. Multi-region redundancy. 3 to 4 metros. At least 40% survival of the worst single failure. |
| Objectives | Latency 30%, cost 20%, provider coverage 20%, resilience 15%, compliance 5%, carbon 10% Beta |
| Commercial | USD, a budget of 60,000 per month, a 12-month term, 30% annual growth, a 36-month horizon |
The walkthrough follows the example program EndToEndDesignExample in the SDK repository. The output on this page is the saved output of that program for this scenario. You can read every output file in docs/design/examples/end-to-end/.
Architecture#
The example's result for this scenario is three metros, each with a Cloud Router, joined by a full-mesh backbone:
What decides what#
| Decision | Made by |
|---|---|
| Metros, workload placement, standby metros | MetroOptimizer |
| Cost, currency conversion, growth, commitment terms, egress value | RateCardCostModel, GrowthPlanner, SavingsCalculator, TcoCalculator |
| What a failure takes down, and what fixes it | ResilienceAnalyzer |
| Cloud Routers, cloud connections, backbone links, BGP | DeploymentWizard |
| Cloud on-ramp over Fabric, Internet Exchange (IX), private connection, or Internet Access for each destination | ConnectivityPlanner, in step 6. It uses the PeeringIntelligence output for peers. |
| Physical ports and cross connects, or Network Edge, for each metro, existing or to order | ConnectivityPlanner and AccessPlanner, in step 7 |
| Access connections from each Cloud Router to those ports and devices | DeploymentWizard |
| Whether to deploy | The gate in the example, in step 10 |
What you will create#
| Run | Creates | Billed |
|---|---|---|
| Default run | Nothing. It reads the Fabric catalog and prices, the Network Edge metros, and Internet Access availability. When you give a project and an account, it also reads your existing ports and Network Edge devices. When you give a billing account, it also sends one Cloud Router dryRun=true request per metro. | No |
Run with --deploy, when the gate in step 10 passes | 3 Cloud Routers, 5 cloud connections, and 3 backbone links, with their routing protocols. Also each access connection whose port or device exists. | Yes |
Prerequisites#
- A JDK, version 21 or later, and a clone of the SDK repository. The example program is in the test sources and isn't part of the published JAR.
- The client ID and client secret of an Equinix API client, in the environment variables
EQUINIX_ACCESS_KEYandEQUINIX_SECRET_KEY. See Authentication. - Optional: a PeeringDB API key in
PEERINGDB_API_KEY. The program runs the Peering Intelligence step only when it is set. - For deployment only: a project ID, a billing account number, and the authentication key of each cloud connection.
Run the example#
The following command compiles the tests and writes the class path to a file:
./mvnw -q test-compile dependency:build-classpath -Dmdep.outputFile=target/cp.txtThe following command runs the example and writes its documents to target/end-to-end-example:
java -cp "target/classes:target/test-classes:$(cat target/cp.txt)" com.eqixiac.equinix.examples.EndToEndDesignExample target/end-to-end-example| Setting | Effect |
|---|---|
EQUINIX_ACCESS_KEY, EQUINIX_SECRET_KEY | Required |
| First argument | The output directory. The default is target/end-to-end-example. |
PEERINGDB_API_KEY | When it is set, the program runs Peering Intelligence, which calls PeeringDB. When it isn't set, the program skips that step. Anonymous PeeringDB access allows about 20 requests per minute. |
EQIXIAC_EXAMPLE_PROJECT, EQIXIAC_EXAMPLE_ACCOUNT | The project and the billing account for the plan and for deployment |
EQIXIAC_EXAMPLE_PORTS | The ports to use, named by UUID: DC=uuid1,uuid2;FR=uuid3. The first port is the primary. |
EQIXIAC_EXAMPLE_ESTATE_PROJECT | Adds an estate review of the deployed Fabric resources of that project |
--deploy with EQIXIAC_EXAMPLE_DEPLOY=yes | Allows deployment if the gate passes |
EndToEndDesignExampleTest runs the same flow against a mocked Fabric catalog and the reference prices, with no network.
The steps below show the calls that the program makes, in order.
Step 1: Write the spec#
One DesignSpec is the input of every engine. The following example builds the spec of the scenario and checks it. requireValid() throws if the spec has an error:
import com.eqixiac.equinix.core.enums.Region;
import com.eqixiac.equinix.design.optimizer.enums.LatencySensitivity;
import com.eqixiac.equinix.design.optimizer.enums.RedundancyTier;
import com.eqixiac.equinix.design.optimizer.enums.SiteRole;
import com.eqixiac.equinix.design.optimizer.enums.WorkloadType;
import com.eqixiac.equinix.design.spec.CloudIntent;
import com.eqixiac.equinix.design.spec.CommercialTerms;
import com.eqixiac.equinix.design.spec.DesignConstraints;
import com.eqixiac.equinix.design.spec.DesignObjectives;
import com.eqixiac.equinix.design.spec.DesignSpec;
import com.eqixiac.equinix.design.spec.PeerIntent;
import com.eqixiac.equinix.design.spec.SiteIntent;
import com.eqixiac.equinix.design.spec.WorkloadIntent;
import com.eqixiac.equinix.design.value.ratecard.Term;
import com.eqixiac.equinix.fabric.model.implementation.cloud.CloudProviderType;
Map<String, Double> weights = new LinkedHashMap<>();
weights.put("latency", 0.30);
weights.put("cost", 0.20);
weights.put("provider_coverage", 0.20);
weights.put("resilience", 0.15);
weights.put("compliance", 0.05);
weights.put("carbon", 0.10); // Beta: country-level grid intensity, a siting indicator
DesignSpec spec = DesignSpec.builder()
.name("global-interconnect")
.description("Private access to three clouds from six sites, with peering and internet breakout.")
.site(SiteIntent.builder().label("Ashburn data center").metro("DC").role(SiteRole.DATA_CENTER)
.weight(3.0).build())
.site(SiteIntent.builder().label("Chicago headquarters").metro("CH").role(SiteRole.HEADQUARTERS)
.headcount(1200).build())
.site(SiteIntent.builder().label("Dallas operations").metro("DA").role(SiteRole.EMPLOYEE_HUB)
.headcount(400).build())
.site(SiteIntent.builder().label("London office").metro("LD").role(SiteRole.PRIMARY_MARKET)
.headcount(600).build())
.site(SiteIntent.builder().label("Frankfurt plant").metro("FR").role(SiteRole.MANUFACTURING)
.headcount(300).build())
.site(SiteIntent.builder().label("Singapore hub").metro("SG").role(SiteRole.BRANCH_OFFICE)
.headcount(250).build())
.cloud(CloudIntent.builder().id("aws").provider(CloudProviderType.AWS).region("us-east-1")
.monthlyEgressGb(60_000d).build())
.cloud(CloudIntent.builder().id("azure").provider(CloudProviderType.AZURE).region("westeurope")
.monthlyEgressGb(30_000d).build())
.cloud(CloudIntent.builder().id("gcp").provider(CloudProviderType.GOOGLE_CLOUD)
.region("asia-southeast1").monthlyEgressGb(15_000d).build())
.workload(WorkloadIntent.builder().label("order-api").type(WorkloadType.TRANSACTIONAL)
.bandwidthMbps(1000).latencySensitivity(LatencySensitivity.CRITICAL).maxLatencyMs(250.0)
.clouds(List.of("aws")).build())
.workload(WorkloadIntent.builder().label("analytics").type(WorkloadType.BIG_DATA_ANALYTICS)
.bandwidthMbps(2000).latencySensitivity(LatencySensitivity.LOW)
.clouds(List.of("aws", "azure")).build())
.workload(WorkloadIntent.builder().label("inference").type(WorkloadType.AI_ML_INFERENCE)
.bandwidthMbps(500).latencySensitivity(LatencySensitivity.HIGH).pinnedMetro("SG")
.clouds(List.of("gcp")).build())
.workload(WorkloadIntent.builder().label("plant-erp").type(WorkloadType.CUSTOM)
.bandwidthMbps(500).pinnedMetro("FR").clouds(List.of("azure")).build())
.workload(WorkloadIntent.builder().label("disaster-recovery").type(WorkloadType.DISASTER_RECOVERY)
.bandwidthMbps(1000).latencySensitivity(LatencySensitivity.LOW)
.clouds(List.of("aws", "azure")).build())
.peer(PeerIntent.builder().asn(13335L).label("CDN and DNS provider").build())
.peer(PeerIntent.builder().asn(20940L).label("Content delivery provider").build())
.peer(PeerIntent.builder().asn(8075L).label("SaaS productivity provider").build())
.constraints(DesignConstraints.builder()
.requiredRegions(List.of(Region.AMER, Region.EMEA, Region.APAC))
.requiredMetros(List.of("DC", "FR")) // the cage is in DC; plant-erp is pinned to FR
.minimumRedundancy(RedundancyTier.MULTI_REGION)
.minMetros(3).maxMetros(4)
.minSurvivalPct(40.0)
.build())
.objectives(new DesignObjectives(null, weights))
.commercial(CommercialTerms.builder().currency("USD").budgetMaxMonthly(new BigDecimal("60000"))
.term(Term.MONTH_12).annualGrowthRate(0.30).horizonMonths(36).build())
.build();
spec.requireValid();The spec has two options that this scenario doesn't use:
WorkloadIntent.siteslimits the latency limit and the placement of a workload to the sites that it names. Without it, the limit applies to the farthest site in the spec. That is whyorder-apihas a limit of 250 ms.DesignConstraints.allowAccessMetroslets the optimizer add a metro that has no workload and only shortens the path of a site. It is off by default, so every chosen metro in this scenario runs a workload.
For every field of the spec, see DesignSpec.
Step 2: Choose the metros#
The following example runs the optimizer with the standard rate-card chain and reads the recommended design:
import com.eqixiac.equinix.design.optimizer.MetroOptimizer;
import com.eqixiac.equinix.design.optimizer.model.OptimizationResult;
import com.eqixiac.equinix.design.spi.DesignOption;
import com.eqixiac.equinix.design.spi.MetroPortfolio;
import com.eqixiac.equinix.design.value.ratecard.RateCard;
RateCard rateCard = RateCard.standardChain(fabric);
OptimizationResult optimization = MetroOptimizer.forSpec(fabric, spec).rateCard(rateCard).run();
DesignOption best = optimization.getRecommended();
MetroPortfolio portfolio = best.portfolio();For this scenario, the example's output is DC + FR + SG, with a weighted score of 89.4 of 100. The optimizer examined 814,385 portfolios, and 15 were feasible.
| Design | Weighted score | Latency (ms) | Cost (USD per month) | Resilience (%) | Carbon (gCO2e/kWh) |
|---|---|---|---|---|---|
| DC+FR+SG, recommended | 89.4 | 16.0 | 15,943.3 | 82.2 | 390.2 |
| CH+DC+FR+SG | 87.6 | 5.4 | 19,197.9 | 82.2 | 390.2 |
| DC+FR+SG+TR | 86.7 | 11.9 | 19,111.6 | 82.2 | 390.2 |
| AM+DC+FR+SG | 86.3 | 14.9 | 18,972.9 | 82.2 | 390.2 |
| DC+FR+MA+SG | 86.2 | 14.8 | 19,087.8 | 82.2 | 390.2 |
Latency is the site-weighted round trip to the nearest chosen metro. The spec fixed the three required and pinned metros. The optimizer decided whether a fourth metro is worth its cost. At these weights, no fourth metro is.
The cost includes the full-mesh backbone between the Cloud Routers. A fourth metro adds a router, its connections, and three backbone links.
The sensitivity report states that the recommendation holds while the latency weight is at most 48% and the cost weight is at least 10%. Outside either bound, CH+DC+FR+SG has the highest score.
The placement is:
| Workload | Runs in | Standby | Site-weighted round trip (ms) |
|---|---|---|---|
order-api | DC | FR | 49.2 |
analytics | DC | FR | 49.2 |
inference | SG (pinned) | None | 177.2 |
plant-erp | FR (pinned) | None | 78.2 |
disaster-recovery | DC | FR | 49.2 |
The optimizer places a workload first in a metro that reaches each cloud in the region that the spec names. DC reaches AWS us-east-1. The standby, FR, reaches AWS through eu-central-1. The report states this as a CLOUD_REGION_NOT_LOCAL finding. Traffic to us-east-1 continues over the network of the provider, which the engines don't model or price.
Step 3: Simulate failures#
The following example simulates failures on the recommended design:
import com.eqixiac.equinix.design.resilience.ResilienceAnalyzer;
import com.eqixiac.equinix.design.resilience.ResilienceReport;
ResilienceReport resilience = ResilienceAnalyzer.forSpec(fabric, spec)
.optimization(optimization).rateCard(rateCard).run();| Check | Result for this scenario |
|---|---|
| N-1 | Fails: 6 of 45 single failures cause an outage, and 2 degrade service |
| N-2 | Fails: 245 of 915 pairs cause an outage, and 74 degrade service |
The example passes the metro access of step 7 to the simulation, as Step 7 shows. The figures above include it. The 45 single failures include each planned port, cross connect, Network Edge device, and access connection. None of them causes an outage, because every metro is entered through a redundant pair.
The outages come from the two pinned workloads, which have no standby metro.
The analyzer proposes and re-simulates the following remediations:
- Add a standby Google Cloud connection in DC, sized for 500 Mbps.
- Raise the Azure connection in DC from 3,000 to 3,500 Mbps.
- Add a second, redundant Azure connection in FR.
For the loss of FR or SG, it finds no candidate among the nearest five metros that removes the outage, because the workload is pinned.
For the report accessors, see Resilience simulation.
Step 4: Plan for growth and terms#
The following example projects the traffic of each priced item over the horizon of the spec:
import com.eqixiac.equinix.design.cost.GrowthPlan;
import com.eqixiac.equinix.design.cost.GrowthPlanner;
import com.eqixiac.equinix.design.optimizer.context.CatalogDesignContext;
import com.eqixiac.equinix.design.optimizer.context.FabricCatalogLoader;
import com.eqixiac.equinix.design.value.ratecard.ReferenceRateCard;
CatalogDesignContext context = FabricCatalogLoader.load(fabric, spec, null);
GrowthPlan growth = GrowthPlanner.forSpec(spec, portfolio, context, rateCard, ReferenceRateCard.standard()).plan();The plan for this scenario has 16 items over 36 months at 30% a year. For example, the DC to AWS connection needs an upgrade from 5,000 to 10,000 Mbps in month 12.
For virtual connections, the list prices were the same at every term, so the planner recommends month to month. Ties go to the shorter term. Provider-side fees have no term axis, and the planner prices them on demand.
Step 5: Price the egress#
The following example estimates the egress saving and the total cost of ownership for AWS, the cloud with the most egress:
import com.eqixiac.equinix.design.value.savings.SavingsCalculator;
import com.eqixiac.equinix.design.value.savings.SavingsEstimate;
import com.eqixiac.equinix.design.value.tco.TcoCalculator;
import com.eqixiac.equinix.design.value.tco.TcoComparison;
SavingsEstimate savings = SavingsCalculator.forSpec(fabric, spec, "aws", portfolio).rateCard(rateCard).calculate();
TcoComparison tco = TcoCalculator.forSpec(fabric, spec, "aws", portfolio).rateCard(rateCard).compare();For AWS, with 60,000 GB per month through DC, the estimate is:
| Line | USD per month |
|---|---|
| Egress over the public internet | 5,400.00 |
| Egress over the private interconnect | 1,200.00 |
| Egress saving | 4,200.00 |
| Equinix interconnect, recurring | -1,650.00 |
| AWS interconnect port, reference price | -1,204.50 |
| Net monthly saving | 1,345.50 |
The break-even egress volume is 40,779 GB per month. The estimate assumes that 4,000 Mbps of workloads to AWS are rounded up to the 5,000 Mbps Fabric tier, and it prices the connection in DC.
The TCO comparison over the 12-month term is:
| Approach | Monthly, USD | Total over the term, USD |
|---|---|---|
| Public cloud over the internet | 5,400.00 | 64,800.00 |
| On-premises | 5,275.00 | 63,300.00 |
| Equinix interconnect, recommended | 4,054.50 | 48,654.00 |
Step 6: Decide how each destination is reached#
ConnectivityPlanner decides how each destination is reached and how each metro is entered. See Plan connectivity and metro access. The following example reads where Network Edge and Internet Access are offered, reads the existing ports and devices of a project and an account, and builds the connectivity plan:
import com.eqixiac.equinix.design.access.AccessInventory;
import com.eqixiac.equinix.design.connectivity.ConnectivityPlan;
import com.eqixiac.equinix.design.connectivity.ConnectivityPlanner;
import com.eqixiac.equinix.design.connectivity.ProductAvailability;
ConnectivityPlan connectivity = ConnectivityPlanner.forSpec(spec).optimization(optimization)
.availability(ProductAvailability.read(eq)) // Network Edge and Internet Access metros
.inventory(AccessInventory.read(eq, projectId, "123456")) // existing ports and devices
.plan();
connectivity.reach().forEach(d -> System.out.println(d.destination() + " " + d.reach() + " " + d.metros()));The planner applies the following rules to each destination:
- A cloud is reached over a private Fabric connection from the Cloud Router, in each metro where the placement of the optimizer connects it.
- A peer is reached by public peering at an Internet Exchange (IX) when Peering Intelligence finds it at an IX in a chosen metro. Otherwise, it is reached over a private Fabric connection when it publishes a service profile there. Otherwise, it is reached over Internet Access.
- General internet traffic leaves through Internet Access in each chosen metro that offers it.
| Destination | Reached by | Metros |
|---|---|---|
aws | Fabric and Cloud Router | DC, FR |
azure | Fabric and Cloud Router | DC, FR |
gcp | Fabric and Cloud Router | SG |
| AS13335, AS20940, AS8075 | Undecided | None |
| Internet | Internet Access | DC, FR |
For this scenario, Internet Access is offered in DC and FR, and it isn't offered in SG.
Decide the peers#
The peers are undecided in this output because the saved output has no Peering Intelligence result. Rule 2 needs one.
In your own code, run Peering Intelligence and pass its result to the planner with peering(...). For each peer and each chosen metro, the planner then reads UnifiedConnectivityView.forMetro(metro) and checks isHasIxPeering() and isHasFabric(). Each peer is assigned to IX, a private connection, or Internet Access.
The following example runs Peering Intelligence with a PeeringDB key and builds the plan with the result:
import com.eqixiac.equinix.design.peering.PeeringIntelligence;
import com.eqixiac.equinix.design.peering.model.PeeringIntelligenceResult;
PeeringIntelligenceResult peering = PeeringIntelligence.forSpec(fabric, spec, System.getenv("PEERINGDB_API_KEY"))
.includeAll()
.analyze();
ConnectivityPlan withPeers = ConnectivityPlanner.forSpec(spec).optimization(optimization)
.peering(peering)
.availability(ProductAvailability.read(eq))
.plan();The PeeringDB key is the last argument of PeeringIntelligence.forSpec(fabric, spec, apiKey) and of PeeringIntelligence.builder(fabric, apiKey). Without it, the SDK reads the PEERINGDB_API_KEY environment variable. Without that, it uses anonymous access, which allows about 20 requests per minute.
The example program runs this step when PEERINGDB_API_KEY is set and skips it otherwise.
Step 7: Decide how each metro is entered#
The same ConnectivityPlan has the access of each metro. The following example prints the access items and the access connections, and then runs the failure simulation with the access:
import com.eqixiac.equinix.design.access.AccessPlan;
AccessPlan access = connectivity.accessPlan();
access.items().forEach(item ->
System.out.println(item.metro() + " " + item.kind() + " " + item.name() + " " + item.source()));
access.links().forEach(link -> System.out.println(link.metro() + " " + link.name()));
ResilienceReport withAccess = ResilienceAnalyzer.forSpec(fabric, spec)
.optimization(optimization).rateCard(rateCard)
.access(access)
.run();For each metro, the first rule that applies decides the access:
- The ports that you name with
usePorts(metro, uuids...)are used. A UUID that the inventory doesn't have is assumed to exist. - The Network Edge devices that you name with
useDevices(metro, uuids...)are used, in the same way. - The usable ports of the inventory in the metro, with room for the access connection, are used: a pair in one redundancy group, otherwise two ports on different Fabric devices, otherwise one port and an order for the second.
- A metro with a site of the role
DATA_CENTERgets an order for two ports in one redundancy group, each with a cross connect. - The usable Network Edge devices of the inventory in the metro are used.
- A metro where Network Edge is offered gets an order for a redundant device pair.
- Otherwise, the metro has its Cloud Router only.
The saved output read no inventory, because no project or account was given. Every item is an order:
| Metro | Entered by | Items | Access connections to the Cloud Router |
|---|---|---|---|
| DC | Physical ports | Two 10G ports to order, primary and secondary in one redundancy group. Two cross connects to order. One Internet Access service to order. | Two, 10,000 Mbps each |
| FR | Network Edge | Two devices to order. One Internet Access service to order. | Two, 10,000 Mbps each |
| SG | Network Edge | Two devices to order | Two, 500 Mbps each |
An access connection is sized as the cloud bandwidth that the placement puts in the metro, rounded up to a Fabric tier. 8,000 Mbps in DC and 7,500 Mbps in FR give 10,000 Mbps. 500 Mbps in SG gives 500 Mbps.
Use ports that you have#
With existing ports, the result differs. The following example gives the planner two ports in Ashburn, in one redundancy group and in two IBXs:
import com.eqixiac.equinix.design.access.ExistingPort;
import com.eqixiac.equinix.fabric.enums.RedundancyPriority;
AccessInventory inventory = AccessInventory.of(List.of(
new ExistingPort("port-uuid-a", "ashburn-cage-a", "DC", "DC2", "fabric-device-1", "cage",
RedundancyPriority.PRIMARY, 10_000, 10_000, "ACTIVE"),
new ExistingPort("port-uuid-b", "ashburn-cage-b", "DC", "DC6", "fabric-device-2", "cage",
RedundancyPriority.SECONDARY, 10_000, 10_000, "ACTIVE")), List.of());
ConnectivityPlan withPorts = ConnectivityPlanner.forSpec(spec).optimization(optimization)
.availability(ProductAvailability.read(eq))
.inventory(inventory)
.plan();The planner uses the two ports. It plans no port order and no cross connect for DC. The two DC access connections of the plan name the port UUIDs, so execution can create them.
Two existing ports in the same IBX produce a finding. The simulation then reports the loss of that IBX as a shared-fate scenario.
With the example program, name the ports in EQIXIAC_EXAMPLE_PORTS.
Step 8: Write the decision record#
The following example writes the Design Decision Record from the results of steps 2 and 3:
import com.eqixiac.equinix.Design;
import com.eqixiac.equinix.design.record.DesignDecisionRecord;
DesignDecisionRecord record = Design.over(fabric).decisionRecord(spec).rateCard(rateCard)
.optimization(optimization).resilience(resilience).record();
Files.writeString(Path.of("decision-record.md"), record.toMarkdown());For this scenario, the record includes all nine sections. It states the decision, the value, score, weight, and scale of each objective, the alternatives, the sensitivity, every cost line with its source, the resilience findings, and how to reproduce the run. See Design Decision Record.
Step 9: Build the deployment plan#
The following example builds a plan with a full-mesh backbone and the metro access of step 7, and exports it as Terraform and as a Mermaid diagram:
import com.eqixiac.equinix.design.export.TerraformExporter;
import com.eqixiac.equinix.design.export.TopologyDiagram;
import com.eqixiac.equinix.design.optimizer.wizard.enums.BackboneTopology;
import com.eqixiac.equinix.design.optimizer.wizard.enums.BandwidthStrategy;
import com.eqixiac.equinix.design.optimizer.wizard.model.DeploymentPlan;
DeploymentPlan plan = Design.over(fabric).deploymentWizard(optimization)
.designSpec(spec).deploymentName("global-interconnect").rateCard(rateCard)
.backboneTopology(BackboneTopology.FULL_MESH).bandwidthStrategy(BandwidthStrategy.PER_WORKLOAD)
.customerAsn(64512L).withBFD(true, 300).notifications("noc@example.com")
.access(connectivity.accessPlan())
.plan();
String hcl = new TerraformExporter().export(plan);
String diagram = new TopologyDiagram().toMermaid(plan);| Item in the plan | Count |
|---|---|
| Cloud Routers | 3 |
| Cloud connections | 5 |
| Backbone links, full mesh | 3 |
| Routing protocols | 16 |
| Access items: ports, cross connects, devices, Internet Access | 10, all to order |
| Access connections | 6. None is created until its port or device exists. |
The plan connects a cloud only in a metro where the placement uses it: AWS and Azure in DC and FR, and Google Cloud in SG. The FR to AWS row of the plan reads aws [eu-central-1; the design names us-east-1, reached over the provider's network].
| Cost row in the plan | USD per month |
|---|---|
| Cloud Routers | 3,746.98 |
| Provider connections | 1,604.60 |
| Backbone links | 1,467.03 |
| Total monthly | 6,818.61 |
| Provider fees and data egress, billed by the cloud providers, reference figures | 9,124.73 |
| Design total monthly | 15,943.34 |
| Metro access connections | 2,236.66 |
| Design total with metro access | 18,180.00 |
The design total equals the cost of DC+FR+SG from the optimizer in step 2. The optimizer doesn't price metro access. Six of the eleven Equinix lines were converted to USD from EUR or SGD at the ECB reference rate.
The plan lists the ports, cross connects, Network Edge devices, and Internet Access services as not priced. No rate card has a figure for them. Their cost is unknown, and the plan doesn't count it as zero.
When you give no billing account, the plan skips the three Cloud Router dry runs. The plan is valid with no errors, and it lists each skipped check with the reason. Five cloud connection checks are deferred until the routers exist and you supply the provider keys. When you give an account, plan() sends a Cloud Router dryRun=true request for each metro.
Execution creates an access connection when its port or device has a UUID. The A-side is the Cloud Router. The Z-side is the port, with the VLAN tag that you pass in ExecutionInputs, or the device. Execution orders no port, cross connect, Network Edge device, or Internet Access service. To finish this plan, place the orders, and then build the plan again with usePorts and useDevices.
For the plan lifecycle, see Deployment Wizard.
Step 10: Check the deploy gate#
The example deploys only when every check of its gate passes. The gate is code in the example. It isn't a design engine.
| Check | Result in the saved output | How to pass it |
|---|---|---|
| The plan is valid | Passed: 0 errors | |
| The estimate is within the budget | Passed: 6,818.61 of 60,000 | |
| N-1 passes | Not passed | Add standby metros for the two pinned workloads, or accept the N-1 result and remove the check |
| Provider inputs are present | Not passed: 5 missing (AWS account IDs, Azure service keys, a Google pairing key) | Pass the provider keys in ExecutionInputs |
| A project and a billing account were given | Not passed | Set EQIXIAC_EXAMPLE_PROJECT and EQIXIAC_EXAMPLE_ACCOUNT |
| Deployment was requested | Not passed | Run with --deploy and EQIXIAC_EXAMPLE_DEPLOY=yes |
The gate's summary for the saved output is "Not deploying: 4 of 6 checks failed." This is the expected result of a default run. A default run supplies no account, no provider keys, and no deployment request, and this design has two workloads without a standby.
When the gate passes, the example calls plan.reconcile(inputs, ExecutionOptions.defaults(), new FileCheckpointStore(dir)). reconcile creates what is missing, saves a checkpoint after each step, and can run again after a failure. See Detect drift and reconcile.
Verify#
After a default run, the output directory has the following documents:
| File | Content |
|---|---|
spec.yaml | The spec of step 1 |
optimization.md | The optimizer report of step 2 |
resilience.md | The failure simulation of step 3, with the blast radius, the availability estimate, and its assumptions |
growth.md | The growth plan of step 4 |
value.md | The savings estimate and the TCO comparison of step 5 |
decision-record.md | The record of step 8 |
access.md | The metro access of step 7 |
plan.md, plan.json | The plan of step 9 |
main.tf, topology.mmd | The Terraform export and the Mermaid diagram of the plan |
The program prints one line per step and ends with the summary of the gate. Your figures differ from the figures on this page when the list prices, the exchange rates, or the catalog change.
Clean up#
A default run creates nothing in your Equinix account. Delete the output directory if you don't need the documents.
If you deployed, the Cloud Routers and connections are billed until you remove them. To remove what a run created, use plan.rollback(outcome). See Clean up on the Deployment Wizard page. Delete the provider-side objects with the provider's own tools.
Variations#
- To decide the peers, run Peering Intelligence and pass its result to the planner, as Decide the peers shows. With the example program, set
PEERINGDB_API_KEY. - To use ports that you have, give the planner an inventory or name the ports, as Use ports that you have shows.
- To review resources that you have deployed, set
EQIXIAC_EXAMPLE_ESTATE_PROJECT. The example adds an estate review of that project. See Estate analysis. - To favor latency, raise the latency weight above 48%. The optimizer then recommends CH+DC+FR+SG.
- To pass the N-1 check, give the two pinned workloads a standby. The first re-simulated remediation of the analyzer is a standby Google Cloud connection in DC.
What the example doesn't model#
- IX membership isn't a plan item.
- Colocation isn't a plan item. A cage is a site of the role
DATA_CENTERin the spec. Cabinets and power appear only as cost lines in the TCO comparison. The IBX of an existing port is a shared-fate scenario in the failure simulation. Cages, cabinets, and power aren't failure elements. - The cost from the optimizer doesn't include metro access. The plan shows it on separate rows.
- Fabric ports, Network Edge devices, and Internet Access services have no price in the rate cards.
- The SDK places no order for a port, cross connect, Network Edge device, or Internet Access service from a plan.
- You create the cloud side of each connection, the AWS, Azure, or Google Cloud resource, with the provider's own tools.