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

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.

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...