Skip to main content

The hub-and- spoke network topology for developers

A common network topology used when building cloud infrastructures is the hub-and-spoke model. As I noticed that this model is not always well understood by developers, here is my attempt to describe this model from a developers viewpoint.

What Is a Hub-and-Spoke Network Topology?

A hub-and-spoke network topology is a type of network architecture where all devices are connected to a central hub. This central hub acts as a focal point for communication, and all the spokes (devices) communicate through this central hub. Think of it as the hub being the center of a wheel, with spokes radiating outward to various endpoints. This topology is also commonly referred to as a star topology.


As the name suggest, this topology has 2 key components:

  1. Hub: The central hub is a device that serves as the core of the network. It can be a physical device like a switch or a logical point in the network. The hub is responsible for managing and directing the flow of data between all connected devices. It's the heart of the network, ensuring efficient communication.

  2. Spokes: The spokes are the individual devices that connect to the hub. These devices can include computers, servers, routers, or any other network equipment. Each spoke communicates with the hub to exchange data with other spokes.

Hub-and-spoke on Azure

In the image above you can see an example on how to apply this in Azure. We centralize some services like our Azure Firewall, Azure Bastion and the VPN gateway in the Hub and peer with multiple Spoke vnets.

This model is most useful for larger cloud adoption efforts and offers the following advantages:

  • Saving on costs and efficient management: Centralize services that can be shared by multiple workloads, like network virtual appliances (NVAs) and DNS servers. With a single location for services, IT can minimize redundant resources and management effort.

  • Overcoming subscription limits: Large cloud-based workloads might require using more resources than a single Azure subscription contains. Peering workload virtual networks from different subscriptions to a central hub can overcome these limits.

  • Separation of concerns: You can deploy individual workloads between central IT teams and workload teams.

  • Security: All inbound and outbound traffic can be secured through the hub.

  • Scalability: It is easy to add new spokes without effecting the central hub.

Of course this model comes with its own set of drawbacks:
  • Single point of failure: If the hub goes down, all the spokes are disconnected.
  • Network latency: All traffic goes through the hub, more hops and longer distance.
  • Complex routing: All spokes need to be configured to route traffic through the hub.
  • Limited flexibility: All spokes are connected to the same hub, no direct connection between spokes.

As a developer we are typically using the available PaaS or SaaS components to compose our solutions. We can easily plug these into the hub-and-spoke model using any of the following methods:

  • Through VNET Integration for outbound traffic
  • Through Private Link for inbound traffic
  • Through Microsoft-managed virtual networks for many data services.
  • Out of the box through App Service Environments, Azure API Management and AKS

More information

Hub-and-spoke network topology - Cloud Adoption Framework | Microsoft Learn

Hub-spoke network topology in Azure - Azure Architecture Center | Microsoft Learn

Popular posts from this blog

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Color B

Help! I accidently enabled HSTS–on localhost

I ran into an issue after accidently enabling HSTS for a website on localhost. This was not an issue for the original website that was running in IIS and had a certificate configured. But when I tried to run an Angular app a little bit later on http://localhost:4200 the browser redirected me immediately to https://localhost . Whoops! That was not what I wanted in this case. To fix it, you need to go the network settings of your browser, there are available at: chrome://net-internals/#hsts edge://net-internals/#hsts brave://net-internals/#hsts Enter ‘localhost’ in the domain textbox under the Delete domain security policies section and hit Delete . That should do the trick…

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.