Networking Architecture#

Cloud networking is not just “VPC plus subnets.” It’s the connective tissue between every service, account, region, and on-premises data centre. Mistakes here are expensive to fix because networking underpins everything above it. This section covers the design patterns that scale from one VPC to hundreds of accounts across multiple regions.


VPC Design Patterns#

A Virtual Private Cloud (VPC / VNet) is your isolated network within the provider’s infrastructure. The design of your VPC determines how workloads communicate, how traffic enters and exits, and where security boundaries lie.

Standard Three-Tier VPC#

┌───────────────────────────────── VPC (10.1.0.0/16) ──────────────────────────────────┐
│                                                                                        │
│   ┌──────────── AZ-a ────────────┐    ┌──────────── AZ-b ────────────┐                │
│   │                               │    │                               │                │
│   │  Public Subnet  10.1.1.0/24  │    │  Public Subnet  10.1.4.0/24  │   ← ALB, NAT  │
│   │  ┌─────┐ ┌─────┐            │    │  ┌─────┐ ┌─────┐            │     Gateway     │
│   │  │ ALB │ │ NAT │            │    │  │ ALB │ │ NAT │            │                │
│   │  └─────┘ └─────┘            │    │  └─────┘ └─────┘            │                │
│   │                               │    │                               │                │
│   │  Private Subnet 10.1.2.0/24  │    │  Private Subnet 10.1.5.0/24  │   ← App tier  │
│   │  ┌──────────────────────┐    │    │  ┌──────────────────────┐    │                │
│   │  │  App Containers/VMs  │    │    │  │  App Containers/VMs  │    │                │
│   │  └──────────────────────┘    │    │  └──────────────────────┘    │                │
│   │                               │    │                               │                │
│   │  Data Subnet    10.1.3.0/24  │    │  Data Subnet    10.1.6.0/24  │   ← Databases │
│   │  ┌──────────────────────┐    │    │  ┌──────────────────────┐    │                │
│   │  │  RDS / ElastiCache   │    │    │  │  RDS / ElastiCache   │    │                │
│   │  └──────────────────────┘    │    │  └──────────────────────┘    │                │
│   │                               │    │                               │                │
│   └───────────────────────────────┘    └───────────────────────────────┘                │
│                                                                                        │
└────────────────────────────────────────────────────────────────────────────────────────┘

Subnet Strategy#

Subnet TypeInternet AccessUse Case
PublicInbound + outbound via Internet GatewayLoad balancers, bastion hosts, NAT gateways
PrivateOutbound only via NAT GatewayApplication servers, containers, Lambda in VPC
IsolatedNo internet accessDatabases, internal services, sensitive workloads

CIDR Planning#

CIDR planning is the most common source of regret in cloud networking. Once allocated, CIDRs are hard to change.

Rules:

  1. Never overlap — if VPC A uses 10.1.0.0/16 and VPC B uses 10.1.0.0/16, they cannot be peered
  2. Size generously — a /16 gives 65,536 IPs; a /24 gives only 254. You will need more than you think
  3. Reserve space — don’t allocate your entire range on day one; leave room for growth
  4. Use an IPAM — centralised IP Address Management prevents conflicts across hundreds of VPCs
VPC SizeCIDRAvailable IPsSuitable For
Small/24251Single-service, PoC
Medium/204,091Team-level workload
Large/1665,531Platform-level, shared services

Cross-Provider Comparison#

ConceptAWSAzureGCP
Virtual networkVPCVNetVPC
Subnet scopePer-AZPer-region (span AZs)Per-region (span zones)
Route tablePer-subnetPer-subnetPer-VPC (or custom)
NATNAT Gateway (per-AZ)NAT GatewayCloud NAT
Internet gatewayIGW (per-VPC)Implicit for public IPsImplicit for external IPs

Hub-and-Spoke Topology#

In a multi-account setup, connecting every VPC to every other VPC (full mesh) doesn’t scale. Hub-and-spoke centralises connectivity through a single hub.

                    ┌──────────────────────┐
                    │     Hub Account       │
                    │   (Transit Gateway)   │
                    │                      │
                    │  ┌────────────────┐  │
     ┌──────────────┤  │  Shared Svcs   │  ├──────────────┐
     │              │  │  DNS, CI/CD    │  │              │
     │              │  └────────────────┘  │              │
     │              │                      │              │
     │              │  ┌────────────────┐  │              │
     │              │  │  Firewall /    │  │              │
     │              │  │  Inspection    │  │              │
     │              │  └────────────────┘  │              │
     │              └──────────┬───────────┘              │
     │                         │                          │
     ▼                         ▼                          ▼
┌─────────┐           ┌─────────────┐            ┌─────────────┐
│ Team A  │           │ Team B      │            │ Team C      │
│ Prod    │           │ Prod        │            │ Prod        │
│ VPC     │           │ VPC         │            │ VPC         │
└─────────┘           └─────────────┘            └─────────────┘

Hub-and-Spoke Benefits#

BenefitHow
Centralised inspectionAll traffic routes through the hub firewall
Simplified routingSpokes only need a route to the hub
Shared servicesDNS, bastion, CI/CD runners live in the hub
On-prem connectivityVPN or Direct Connect terminates once, in the hub

Transit Gateway (AWS) / Azure vWAN / GCP NCC#

FeatureAWS Transit GatewayAzure Virtual WANGCP Network Connectivity Center
Max attachments5,0002,000 hubsRegion-based
Cross-regionTransit Gateway peeringGlobal vWANGlobal routing
Bandwidth50 Gbps per AZ20 Gbps per hubVaries
Route tablesMultiple, with isolationDefault + customCloud Router

Private Connectivity#

Not all communication should traverse the public internet — even encrypted. Private connectivity keeps traffic on the provider’s backbone or on dedicated physical links.

Expose a service in one VPC to consumers in another VPC without VPC peering, without NAT, and without traversing the internet.

Producer VPC                          Consumer VPC
┌─────────────────────┐              ┌─────────────────────┐
│                     │              │                     │
│  ┌──────────────┐   │              │  ┌──────────────┐   │
│  │ Service      │   │   Private    │  │ ENI /        │   │
│  │ (NLB / LB)   │◄──┼── Link ─────┼──│ Endpoint     │   │
│  └──────────────┘   │   (provider  │  └──────────────┘   │
│                     │    backbone) │                     │
└─────────────────────┘              └─────────────────────┘

When to use Private Link:

  • Consuming third-party SaaS services without internet exposure
  • Cross-account service communication without full VPC peering
  • Restricting service access to specific VPCs (not “open to the world”)

Connectivity Options Comparison#

MethodUse CaseBandwidthLatencyCost
VPC PeeringTwo VPCs, same or cross-region50 Gbps+LowPer-GB transfer
Transit GatewayMany VPCs, hub-and-spoke50 Gbps/AZLowHourly + per-GB
Private LinkService exposure without peeringService-dependentLowHourly + per-GB
VPN (IPsec)On-prem to cloud, encrypted1.25 Gbps per tunnelVariableHourly
Direct Connect / ExpressRouteDedicated physical link1–100 GbpsConsistentMonthly + per-GB

DNS Architecture#

DNS in a multi-account cloud environment is more complex than a single hosted zone. You need to resolve:

  • Public names (customer-facing)
  • Private names (service-to-service within the cloud)
  • On-premises names (hybrid resolution)
  • Cross-account names (shared services)

DNS Resolution Flow#

Application in Team A VPC
        │
        │ Resolves: api.internal.company.com
        ▼
VPC DNS Resolver (e.g., Route 53 Resolver / Cloud DNS)
        │
        ├── Is it a private hosted zone associated with this VPC?
        │   └── Yes → return private IP
        │
        ├── Is there a forwarding rule to on-prem?
        │   └── Yes → forward to on-prem DNS (via VPN/DX)
        │
        └── Fall through to public DNS
            └── Resolve via recursive resolver → public IP

Split-Horizon DNS#

Same domain name resolves differently depending on where the query originates:

Query Sourceapi.company.com Resolves To
Internet (customer)Public IP (load balancer)
Internal VPCPrivate IP (internal LB)
On-premisesPrivate IP via DNS forwarding

Hybrid Connectivity#

Connecting on-premises to cloud securely and reliably.

Decision Framework#

Do you need > 1 Gbps bandwidth?
├── Yes
│   └── Do you need consistent, low latency?
│       ├── Yes → Direct Connect / ExpressRoute (dedicated)
│       └── No  → Direct Connect / ExpressRoute (hosted)
└── No
    └── Is traffic intermittent?
        ├── Yes → Site-to-site VPN (on-demand)
        └── No  → Site-to-site VPN (persistent) or hosted connection

Architecture with Redundancy#

On-Premises Data Centre
┌─────────────────────────────────┐
│  Router A ──────┐               │
│                  │               │
│  Router B ──────┤               │
└─────────────────┼───────────────┘
                   │
    ┌──────────────┼───────────────┐
    │ Primary DX   │  Backup VPN   │
    │ (1 Gbps)     │  (IPsec)      │
    └──────┬───────┴──────┬────────┘
           │              │
           ▼              ▼
    ┌──────────────────────────────┐
    │      Transit Gateway          │
    │      (Hub Account)            │
    └──────┬──────────────┬────────┘
           │              │
     ┌─────▼────┐   ┌────▼─────┐
     │ Prod VPC │   │ Dev VPC  │
     └──────────┘   └──────────┘

Key design rules:

  • Always have a backup path (VPN as backup for Direct Connect)
  • Terminate hybrid connections in the hub account, not individual workload accounts
  • Use BGP for dynamic route propagation between on-prem and cloud
  • Encrypt everything, even over Direct Connect (Direct Connect is private, not encrypted)

Key Takeaways#

  • Design VPCs with three tiers (public, private, isolated) and plan CIDRs generously using centralised IPAM
  • Hub-and-spoke topology scales better than full mesh — centralise inspection, routing, and shared services in the hub
  • Private connectivity (Private Link, peering) keeps traffic off the public internet and reduces attack surface
  • DNS architecture in multi-account environments requires split-horizon, cross-account zone sharing, and hybrid forwarding
  • Hybrid connectivity needs redundancy: Direct Connect for primary bandwidth, VPN for failover
  • CIDR conflicts are the most common networking regret — plan the address space before creating the first VPC