Hub-and-spoke network

Also known as: hub-and-spoke topology

On this page 7

A hub-and-spoke network is a cloud networking architecture in which a central hub virtual network provides shared services and connectivity, and multiple spoke networks connect only to the hub rather than to each other. In cloud networking, the hub typically hosts firewalls, VPN and dedicated connections to on-premises sites, DNS resolution and egress to the internet, while each spoke hosts one workload, team or environment.

The design, also called a hub-and-spoke topology, solves the scaling problem of full-mesh peering, where the number of connections grows roughly with the square of the number of networks. It is the reference landing zone pattern recommended by the major cloud providers for organizations with more than a handful of VPCs or virtual networks.

How a hub-and-spoke network routes traffic

A hub-and-spoke network routes traffic by making the hub the single transit point between spokes, on-premises networks and the internet. Each spoke has a route table whose default or summary routes point toward the hub, and the hub forwards packets to the correct destination after inspection and policy enforcement.

The hub can be implemented in two ways. In a customer-managed hub, a dedicated VPC or Azure Virtual Network hosts network virtual appliances and gateways, and spokes connect through VPC peering. In a provider-managed hub, a service such as AWS Transit Gateway or Azure Virtual WAN acts as a regional router with its own route tables and attachments.

The following table lists the components that typically live in the hub and in the spokes.

ComponentLocationRole
Central firewallHubInspects east-west and north-south traffic
VPN gateway or cloud interconnectHubConnects on-premises data centers and branches
Cloud NAT or egress proxyHubProvides controlled outbound internet access
DNS resolversHubResolve private and on-premises names for all spokes
Application workloadsSpokesRun services isolated by team, application or stage
Security groupsSpokesApply instance-level rules close to the workload
Typical placement of components

Hub-and-spoke implementations in major clouds

Each major cloud offers native building blocks for a hub-and-spoke network, and the choice affects routing limits, transitive behavior and cost. A key technical fact is that classic VPC peering is not transitive: spoke A peered to the hub cannot reach spoke B through it unless an appliance or a routing service forwards the traffic.

ProviderHub serviceTransitive routingNotes
AWSTransit GatewayYes, through route tablesPer-attachment and per-gigabyte charges
Microsoft AzureHub VNet or Virtual WANThrough firewall or Virtual WAN hubGateway transit shares the VPN gateway
Google CloudNetwork Connectivity Center or Shared VPCThrough hub routing or appliancesShared VPC centralizes the network itself
Native hub options by provider

Global organizations usually deploy one hub per region and connect the hubs through inter-region peering. This keeps traffic local, limits the blast radius of an outage and avoids long hairpin paths through a distant region.

Hub-and-spoke compared with other network topologies

The hub-and-spoke network trades some latency and a central dependency for simpler management and consistent security. Comparing it with full mesh and isolated networks shows why it dominates in enterprise cloud environments.

TopologyConnections for n networksSecurity controlMain drawback
Hub-and-spokeAbout nCentralized in the hubHub is a bottleneck and critical dependency
Full mesh peeringAbout n(n-1)/2Distributed in every networkManagement grows rapidly with scale
Isolated networksNonePer network onlyNo shared services or private connectivity
Private endpoints onlyOne per exposed serviceService-levelCovers single services, not general routing
Comparison of cloud network topologies

With 20 VPCs, a full mesh needs 190 peering connections, while a hub-and-spoke network needs 20 attachments. Services such as AWS PrivateLink complement the hub rather than replace it, because they expose individual services across boundaries without opening general network paths.

Designing a hub-and-spoke network in practice

Designing a hub-and-spoke network starts with an IP address plan without overlaps, because the hub must route between all spokes and on-premises ranges. Teams usually reserve a large private block, such as a /16 per region, and allocate fixed subnets to each spoke.

DecisionRecommended choiceReason
Spoke separationSeparate spokes per environmentProduction cannot reach test by accident
Traffic inspectionRoute spoke-to-spoke through the firewallConsistent logging and policy enforcement
Internet egressCentralized egress in the hubOne set of public IP addresses and filters
Hub resilienceAppliances across availability zonesAvoids a single zonal failure point
OwnershipPlatform team owns the hubApplication teams manage only their spokes
Design decisions and recommended choices

Monitoring belongs in the design from the start. VPC flow logs in both hub and spokes, firewall logs and route table audits reveal misrouted traffic early. Defining the hub through infrastructure as code keeps route tables and attachments reproducible across regions.

Limitations and common mistakes

The main limitation of a hub-and-spoke network is that the hub becomes a critical dependency: a misconfigured route or an overloaded firewall affects every spoke at once. Central inspection also adds latency and data processing charges, which can be significant for chatty services that sit in different spokes.

  • Overlapping CIDR ranges between spokes or with on-premises networks break routing and are costly to fix later.
  • Asymmetric routing through stateful firewalls drops return traffic when paths differ by direction.
  • Undersized appliances throttle throughput as more spokes are attached.
  • Forgotten direct peerings between spokes silently bypass the central firewall.
  • Ignoring transfer costs turns heavy east-west traffic into a large monthly bill.

Workloads that exchange large volumes of data are therefore often placed in the same spoke or connected through private endpoints, while the hub carries general and cross-boundary traffic.

A plain-language summary

A hub-and-spoke network works like a major airport with regional flights. Small airports do not fly directly to each other; every route goes through the central airport, where security checks, connections and international departures are handled in one place.

In the cloud, each spoke is a separate network for one team or application, and the hub is the shared center. The main advantage is that security, internet access and links to the company office are set up once instead of in every network. The main trade-off is that everything depends on the hub working well.

An example from practice

A logistics company running on AWS grew from 4 to 35 VPCs in three years. Teams had created direct peerings case by case, and no one could say with confidence which networks were able to reach the warehouse management database or the two on-premises data centers.

The platform team built a hub-and-spoke network per region with AWS Transit Gateway. A hub VPC hosts firewall appliances in three availability zones, centralized NAT for egress and the Direct Connect links to the data centers. Separate route tables keep production, staging and development spokes isolated, and all spoke-to-spoke traffic passes the firewall.

After migration, the number of network connections fell from more than 80 peerings to 35 attachments, every flow became visible in central logs, and an external audit found no unexplained network paths, compared with eleven findings the previous year.