Setting the file. One moment.
Chapter 04 · Cloudflare Deploy
Subchapter 4.126
references/network-interconnect/patterns.mdMarkdown4 KBView on GitHub
Critical: Design for resilience from day one.
Requirements:
Architecture:
Your Network A ──10G CNI v2──> CF CCR Device 1
│
Your Network B ──10G CNI v2──> CF CCR Device 2
│
CF Global Network (AS13335)Capacity Planning:
Use Case: DDoS protection, private connectivity, no GRE overhead.
// 1. Create interconnect
const ic = await client.networkInterconnects.interconnects.create({
account_id: id,
type: 'direct',
facility: 'EWR1',
speed: '10G',
name: 'magic-transit-primary',
});
// 2. Poll until active
const status = await pollUntilActive(id, ic.id);
// 3. Configure Magic Transit tunnel via Dashboard/APIBenefits: 1500 MTU both ways, simplified routing.
Use Case: AWS/GCP workloads with Cloudflare.
AWS Direct Connect:
// 1. Order Direct Connect in AWS Console
// 2. Get LOA + VLAN from AWS
// 3. Send to CF account team (no API)
// 4. Configure static routes in Magic WAN
await configureStaticRoutes(id, {
prefix: '10.0.0.0/8',
nexthop: 'aws-direct-connect',
});GCP Cloud Interconnect:
1. Get VLAN attachment pairing key from GCP Console
2. Create via Dashboard: Interconnects → Create → Cloud Interconnect → Google
- Enter pairing key, name, MTU, speed
3. Configure static routes in Magic WAN (BGP routes from GCP ignored)
4. Configure custom learned routes in GCP Cloud RouterNote: Dashboard-only. No API/SDK support yet.
Use Case: 99.99%+ uptime.
// Primary (NY)
const primary = await client.networkInterconnects.interconnects.create({
account_id: id,
type: 'direct',
facility: 'EWR1',
speed: '10G',
name: 'primary-ewr1',
});
// Secondary (NY, different hardware)
const secondary = await client.networkInterconnects.interconnects.create({
account_id: id,
type: 'direct',
facility: 'EWR2',
speed: '10G',
name: 'secondary-ewr2',
});
// Tertiary (LA, different geography)
const tertiary = await client.networkInterconnects.interconnects.create({
account_id: id,
type: 'partner',
facility: 'LAX1',
speed: '10G',
name: 'tertiary-lax1',
});
// BGP local preferences:
// Primary: 200
// Secondary: 150
// Tertiary: 100
// Internet: Last resortUse Case: Quick deployment, no colocation.
Setup:
No API automation – partner portals managed separately.
Failover Best Practices:
Security:
| Requirement | Recommended |
|---|---|
| Collocated with CF | Direct |
| Not collocated | Partner |
| AWS/GCP workloads | Cloud |
| 1500 MTU both ways | v2 |
| VLAN tagging | v1 |
| Public peering | v1 |
| Simplest config | v2 |
| BFD fast failover | v1 |
| LACP bundling | v1 |