Plan connectivity and metro access
Use ConnectivityPlanner to decide how a design reaches each cloud, peer, and the internet, and how you enter each metro with the ports and Network Edge devices that you have or need to order.
ConnectivityPlanner applies fixed rules to a design that the optimizer has placed. It decides two things:
- How each destination is reached: a cloud on-ramp over Fabric and a Cloud Router, public peering at an Internet Exchange (IX), a private Fabric connection, or Internet Access.
- How each metro is entered: redundant ports with cross connects, a pair of Network Edge devices, or the Cloud Router alone. The planner uses a suitable port or device that you have before it plans an order.
The Deployment Wizard and the failure simulation take the metro access from this plan. See Use the access plan.
Prerequisites#
- An
Equinixsession. See Sessions and configuration. - A
DesignSpecand anOptimizationResultfor it. See Metro Optimizer. - Optional: a
PeeringIntelligenceResult, to decide the peers. See Peering Intelligence and latency.
Build the plan#
The following example reads where Network Edge and Internet Access are offered, reads the existing ports and devices of a project and an account, builds the plan for an optimization result, and prints each decision:
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(result)
.availability(ProductAvailability.read(eq))
.inventory(AccessInventory.read(eq, projectId, "123456")) // project ID, account number
.plan();
connectivity.reach().forEach(d ->
System.out.println(d.destination() + " " + d.reach() + " " + d.metros() + ": " + d.reason()));
connectivity.access().forEach(a -> {
System.out.println(a.metro() + " " + a.access() + ": " + a.reason());
a.orders().forEach(order -> System.out.println(" would order: " + order));
});
connectivity.notes().forEach(System.out::println);Design.connectivity(spec) returns the same planner. toMarkdown() returns the plan as two tables and its notes.
ProductAvailability.read(session) sends two GET requests: the Network Edge metro list, and the Internet Access availability for virtual connections. A lookup that fails leaves its set empty and adds a note. It doesn't throw. For a test or an offline run, use ProductAvailability.of(networkEdgeMetros, internetAccessMetros).
AccessInventory.read(session, projectId, accountNumber) reads the Fabric ports of the project and the Network Edge devices of the account, with GET and search requests only. It doesn't read a scope that you don't give, because an API client can see resources of other projects and accounts. A port is usable when its state is ACTIVE or PROVISIONED. A device is usable when its status is PROVISIONED.
Decide the peers#
Without a Peering Intelligence result, every peer of the spec is UNDECIDED. To decide the peers, pass a result with peering(result). The following example runs Peering Intelligence for the spec and builds the plan with it:
import com.eqixiac.equinix.design.peering.PeeringIntelligence;
import com.eqixiac.equinix.design.peering.model.PeeringIntelligenceResult;
PeeringIntelligenceResult peering = PeeringIntelligence.forSpec(fabric, spec).includeAll().analyze();
ConnectivityPlan withPeers = ConnectivityPlanner.forSpec(spec)
.optimization(result)
.peering(peering)
.availability(ProductAvailability.read(eq))
.plan();Peering Intelligence reads PeeringDB. Anonymous access allows about 20 requests per minute. To use a key, pass it as the last argument of PeeringIntelligence.forSpec(fabric, spec, apiKey), or set the PEERINGDB_API_KEY environment variable. See Set the PeeringDB key.
Name the ports or devices to use#
To choose the ports of a metro yourself, call usePorts(metro, uuids...). The first UUID is the primary. For Network Edge devices, call useDevices(metro, uuids...). A UUID that the inventory doesn't have is marked ASSUMED: the plan assumes that it exists.
The following example names two ports in Ashburn:
ConnectivityPlan named = ConnectivityPlanner.forSpec(spec)
.optimization(result)
.availability(ProductAvailability.read(eq))
.usePorts("DC", portUuid, secondaryPortUuid)
.plan();Use the access plan#
accessPlan() returns the metro access as an AccessPlan: the items of each metro and one access connection per port or device to the Cloud Router of the metro. Pass it to the Deployment Wizard and to the failure simulation.
The following example prints the access items, builds a deployment plan with the access, and simulates failures with it:
import com.eqixiac.equinix.design.access.AccessPlan;
import com.eqixiac.equinix.design.optimizer.wizard.model.DeploymentPlan;
import com.eqixiac.equinix.design.resilience.ResilienceAnalyzer;
import com.eqixiac.equinix.design.resilience.ResilienceReport;
AccessPlan access = connectivity.accessPlan();
access.items().forEach(item ->
System.out.println(item.metro() + " " + item.kind() + " " + item.name() + " " + item.source()));
access.findings().forEach(System.out::println);
DeploymentPlan planWithAccess = fabric.deploymentWizard(result).designSpec(spec)
.notifications("noc@example.com")
.access(access)
.plan();
ResilienceReport report = ResilienceAnalyzer.forSpec(fabric, spec).optimization(result).access(access).run();Each item is EXISTING, ASSUMED, or ORDER. An access connection is sized as the cloud bandwidth that the placement puts in the metro, rounded up to a Fabric tier. It is 1,000 Mbps when the placement sizes nothing in the metro.
The findings state a metro that is entered through one port or device, two ports in one IBX, and a port that is slower than its access connection.
For what the wizard does with the access, see Add metro access to a plan. For the failure simulation, see Simulate metro access failures.
Validate the orders#
The plan lists the items to order. To validate an order without placing it, use the dry-run calls of the SDK:
fabric.ports().define()...dryRun().create()validates a port order. See Validate a port order.connections().define(...)...dryRun().create()validates a virtual connection. See Connections.
Both calls need a billing account. The SDK has no dry run for a cross connect order or a Network Edge device create.
Reference#
Rules for destinations#
- 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.
Reach | Meaning |
|---|---|
FABRIC_CLOUD_ROUTER | A private Fabric connection from a Cloud Router to the cloud on-ramp |
INTERNET_EXCHANGE | Public peering at an Internet Exchange (IX) |
FABRIC_PRIVATE | A private Fabric connection to the service profile of the peer |
INTERNET_ACCESS | Equinix Internet Access |
UNDECIDED | Not decided. The data that the rule needs is missing. |
Rules for metros#
AccessPlanner, in the package design.access, decides the metro access. ConnectivityPlanner calls it. For each metro, the first rule that applies decides:
| Order | Condition | Access |
|---|---|---|
| 1 | You named ports with usePorts | Those ports. A UUID that the inventory doesn't have is ASSUMED to exist. |
| 2 | You named devices with useDevices | Those Network Edge devices, in the same way |
| 3 | The inventory has usable ports in the metro with room for the access connection | A pair in one redundancy group. Otherwise two ports on different Fabric devices. Otherwise one port and an order for the second. |
| 4 | A site of the role DATA_CENTER is in the metro | An order for two ports in one redundancy group, each with a cross connect |
| 5 | The inventory has usable Network Edge devices in the metro | A device and its redundant partner. Otherwise any two. Otherwise one and an order for the second. |
| 6 | Network Edge is offered in the metro | An order for a redundant device pair |
| 7 | Otherwise | The Cloud Router alone |
Access | Meaning |
|---|---|
PHYSICAL_PORTS | Redundant Fabric ports with cross connects from your cage |
NETWORK_EDGE | A redundant pair of Network Edge virtual devices |
CLOUD_ROUTER_ONLY | The Cloud Router only. Sites reach the metro over the backbone or an existing WAN. |
The plan#
| Accessor | Content |
|---|---|
reach() | One decision per cloud, one per peer, and one for general internet traffic. Each has the destination, the choice, the metros, and the rule that applied. |
access() | One decision per metro of the design. Each has the metro, the choice, the rule that applied, and the orders as text. |
accessPlan() | The metro access as an AccessPlan, for the Deployment Wizard and the failure simulation |
notes() | What the rules couldn't determine |
specFingerprint() | The fingerprint of the spec |
Limits#
- The rules are fixed. The planner doesn't compare the cost of the choices.
- IX membership isn't a plan item.
- Colocation isn't a plan item. A cage is a site of the spec, cabinets and power are cost lines in the TCO comparison, and the IBX of a port is a shared-fate scenario in the failure simulation.
- The cost from the optimizer doesn't include metro access.
- Fabric ports, Network Edge devices, and Internet Access services have no price in the rate cards.
Next steps#
- To see the planner in a complete design, see the End-to-end design walkthrough.
- To plan the Cloud Routers and cloud connections, see Deployment Wizard.
- To create Network Edge devices, see Network Edge devices.