Dedicated Server

ECMP Routing for Scaling Bare Metal Server Clusters

Equal-cost multipath (ECMP) routing lets a network use more than one next hop with the same routing cost. In a bare metal server cluster, that can spread east-west traffic across parallel links instead of forcing every flow through one path.

ECMP is not a replacement for a load balancer or an application health check. It is an underlay routing method: the network selects a next hop, usually with a flow hash, while the application layer decides which server should handle a request. Scaling safely depends on designing both layers together.

How ECMP routing works in a bare metal cluster

In a Layer 3 leaf-spine or routed access design, each leaf switch can reach a destination through several equal-cost uplinks. OSPF, IS-IS or BGP can install multiple next hops, and the forwarding device uses a hash over fields such as source and destination addresses and ports to keep a flow on one path. This avoids per-packet reordering while still using several links across many flows.

Dataplugs’ guide What Is Spine Leaf Network Topology in Modern Data Centers and Why Is It Important? explains how spine-leaf fabrics pair short paths with ECMP and why consistent paths matter for server-to-server traffic.

  • Advertise the same destination through the intended next hops and verify that the routing table contains all expected paths.
  • Use a documented hash policy and check how it treats TCP, UDP, IPv4, IPv6 and encapsulated traffic.
  • Keep link speeds, MTU, VLAN or VRF boundaries and failure-detection settings consistent across the path.
  • Use per-link and per-next-hop counters to confirm that traffic is distributed rather than concentrated on one member.
  • Plan for convergence: a failed link or device should withdraw its path without causing an avoidable black hole.

Where ECMP helps as the cluster grows

A cluster usually grows through east-west traffic before aggregate internet bandwidth becomes the only concern. Web nodes call APIs, services talk to databases, Kubernetes nodes exchange pod traffic, and storage or backup systems move large volumes between racks. ECMP gives these flows multiple physical paths, provided the underlay has enough capacity and the workload produces enough independent flows for the hash to distribute.

Dataplugs’ guide Bare Metal Kubernetes: Planning a Production Cluster covers the control-plane, node, storage and networking decisions a bare metal cluster needs before production.

  • Scale-out application nodes across leaves or racks instead of placing every critical dependency behind one uplink.
  • Reserve headroom for replication, image pulls, backup windows and failover traffic, not only average request volume.
  • Treat oversubscription as a measurable design choice; more ECMP paths do not create capacity if the spine or upstream link is still the bottleneck.
  • Place stateful nodes and storage paths with awareness of rack, switch and power failure domains.
  • Make server NIC queues, bonding or teaming, and switch hashing policies part of the capacity test.

Design the underlay before enabling ECMP

Multipath works best when paths are genuinely comparable. If one route has a different MTU, policy, latency or security boundary, the network may technically install it but the application will experience uneven performance. Addressing, route policy, BFD or equivalent failure detection, and change ownership should be agreed before the cluster is expanded.

For practical routing and latency considerations, Dataplugs’ article Optimizing Hong Kong Server to Reduce Ping Value covers intelligent routing, path length and traffic distribution when improving connectivity to Hong Kong servers.

  • Use a simple, summarizable IP plan so each leaf, server segment and service network has an unambiguous route.
  • Test MTU and fragmentation across every path, including tunnels, storage networks and container overlays.
  • Check that route filtering, local preference, MED or administrative distance cannot silently remove one of the intended equal-cost paths.
  • Measure convergence time and packet loss during link, leaf, spine and upstream failure tests.
  • Record which team owns routing, switch configuration, server NICs, firewall policy and application failover.

ECMP is not application load balancing

ECMP distributes flows according to network-level reachability; it does not know whether a backend is returning errors, whether a session is full, or whether a database is ready. A single long-lived flow may stay on one path, and an uneven traffic pattern can still produce an uneven result. Application load balancing, service discovery and health checks remain separate controls.

Use ECMP to provide resilient paths between cluster components, then use an L4 or L7 load balancer when requests must be selected by service health, port, protocol or application state. In a stateful system, also confirm that return traffic, session persistence and connection draining behave correctly when a path or node is removed.

  • Use ECMP for underlay path diversity, not as a substitute for backend health checks.
  • Use L4 or L7 balancing when the decision depends on a listener, protocol, request or application status.
  • Validate asymmetric routing against firewall state, NAT, connection tracking and security inspection.
  • Decide how long-lived connections, retries and existing sessions behave during rehashing or failover.
  • Keep routing changes and application traffic changes in separate runbooks so an incident can be isolated.

Build and test an ECMP-ready cluster

Before production, capture a baseline for path utilization, latency, packet loss, retransmissions, CPU, NIC queues and application response time. Then test one failure at a time: remove a link, withdraw a next hop, stop a leaf, and take a server out of service. The expected result should be documented for both the network and the application.

After each test, confirm route convergence, flow recovery, load distribution and user-facing behaviour. Re-run the test after hardware, routing policy, kernel, NIC firmware or cluster topology changes; ECMP can remain configured while its actual traffic pattern changes.

Conclusion

ECMP routing can help bare metal server clusters scale by using parallel equal-cost paths for east-west traffic and by reducing dependence on a single link or device. The design still needs a routed underlay, consistent path parameters, appropriate hashing, application-level balancing and failure tests. Start with measured traffic and failure objectives, then expand the cluster only when the network and service layers are both ready.

Home » Blog » Dedicated Server » ECMP Routing for Scaling Bare Metal Server Clusters