Every packet's end-to-end latency is the sum of physical propagation delay across each hop plus a fixed processing/queuing delay at every device the packet passes through:
L = Σ(d_i / v) + h × P
d_i = length of hop i, km
v = signal speed ≈ 200,000 km/s (~0.66c in fibre/copper)
h = number of hops on the path
P = per-hop processing delay (router/switch queuing)
The route each packet takes is the path that minimises L, found with Dijkstra's algorithm over a graph whose edge weights are propagation + processing delay — not simply the fewest hops. In star topology every edge device is one hop from a central hub, which is itself one hop from the cloud: short paths, but the hub is a single point of failure. In mesh topology devices route peer-to-peer toward one gateway node, adding hops (and processing delay) but giving Dijkstra alternate paths to fall back on when a node drops out.
- Fail hub/gateway — removes the one node every path depends on. Star loses all connectivity instantly; mesh only fails if the gateway itself is the one removed and no backup gateway link exists.
- Fail random node — removes an ordinary device. Star keeps routing (other spokes are untouched); mesh reroutes around it if an alternate path exists, or drops packets that originated there.
- Raising the backhaul distance grows every path's propagation term equally; raising per-hop processing delay penalises mesh more, since its paths use more hops.
This mirrors the real trade-off edge computing architectures face: star/hub layouts (cellular backhaul, most SD-WAN hubs) minimise latency and hop count but concentrate risk, while mesh layouts (Zigbee, Thread, some LoRaWAN and municipal mesh deployments) trade a little latency for resilience against any single device failing.
This 2D version renders the same graph model and Dijkstra routing top-down instead of in 3D — drag to pan, scroll or pinch to zoom.