Urgent.News

What's breaking now, across thousands of outlets.

Tech

ECMP Hash Polarization: Why Two Identical Links Carry 88% and 12%

Originally published at Packet Path . One best path is a wasted fabric Picture a modern spine-leaf data center: every leaf switch connects to every spine. Between any two racks there aren't one or two paths — there are dozens, all the same length, all the same cost. Now ask the router how it forwards. Classic routing picks exactly one best path and programs it into the forwarding table. The other…

Equal-cost multi-path routing (ECMP) is a crucial technique in modern data centers, allowing multiple paths between leaf and spine switches to carry traffic equally. When multiple equal-cost routes exist in a router's forwarding table, ECMP spreads the traffic across all the links, optimizing the use of available resources. However, this elegant solution can sometimes lead to unexpected consequences due to a phenomenon known as hash polarization.

Hash polarization occurs when the deterministic hash function used in ECMP selection is identical across all switches in the fabric. This results in correlated flows consistently taking the same relative path at each tier of the network, causing traffic to polarize onto a few links instead of evenly distributing across the entire fabric. This behavior can lead to hot spots, link congestion, and reduced overall utilization.

The hash function used in ECMP typically takes the 5-tuple of the flow—source IP, destination IP, protocol, source port, and destination port—as input and produces a hash value that determines the egress link. The key properties of a good hash function are determinism and distribution. Determinism ensures that the same flow is always routed to the same member, preventing packet reordering. Distribution aims to spread the traffic evenly across all members, but in the case of hash polarization, this balance is disrupted.

To mitigate hash polarization, several strategies can be employed. One of the most effective solutions is to introduce variation into the hash function by using different seed values or offset values on each switch. This ensures that the same flow will be assigned to different members on different switches, breaking the polarization and promoting a more even distribution of traffic.

Additionally, varying the hash inputs by tier can also help maintain a balanced load. This can be achieved by including different fields, such as the ingress port, in the hash calculation at different layers of the network.

In overlay networks such as Virtual Extensible LANs (VXLAN), ECMP may face challenges due to the encapsulation of the inner flows. If the outer headers, such as the source port, remain constant across all inner flows, the underlay ECMP hash may incorrectly assume a single giant flow and pin it to a single link. To address this issue, it is recommended to introduce UDP source-port entropy, as specified in RFC 7348, by hashing the inner 5-tuple to determine the outer source port.

This ensures that each inner flow is treated as a distinct entity and distributed appropriately across the available paths.

When troubleshooting lopsided links, it is essential to focus on the distribution of flows rather than just the bytes of traffic. A few elephant flows can disproportionately affect a member link, while smaller flows may appear to be insignificant. By counting the number of flows per member link, rather than just monitoring the byte utilization, network administrators can identify the true source of the imbalance.

Additionally, checking the maximum number of paths supported by the platform and ensuring that the installed members align with the number of existing equal-cost paths can also help identify and address ECMP-related issues.

In conclusion, ECMP is a powerful tool for optimizing network performance and resource utilization in modern data centers. However, understanding and mitigating the effects of hash polarization is crucial to ensure the fabric operates efficiently and reliably. By introducing variation into the hash function, varying the hash inputs by tier, and addressing issues specific to overlay networks such as VXLAN, network engineers can harness the full potential of ECMP and avoid the pitfalls of hash polarization.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Is PyPI's long tail messier? Not in its version strings — 97% of both head and tail are clean PEP 440; the gap is cadence

Work by Munim, Inc., produced with AI agents working in the name of MV2 of Munim, Inc., in the open. Being honest about traction: this project has earned $0 and has zero external engagement so far.

  • 97% of PyPI's long tail and head version strings are clean PEP 440
  • Only 1.7% of random projects have dev release as latest version
  • Cadence of releases differs between popular projects and long tail

Dump Studio: Less Arranging, More Living - with Local Gemma

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady What I Built I recently started creating content on Instagram, and discovered that a “casual photo dump”…

  • Dump Studio creates Instagram posts with AI assistance from local developer Gemma.
  • Users input brief photo post descriptions; AI generates three design suggestions.
  • Tool offers eight composition templates, editable canvas, and PNG export.

Four bugs my publisher's validator could not see

Four bugs my publisher's validator could not see I publish everything I build to a small private ops portal: scheduled job reports, generated images, deploys, drafts.

  • Validator failed to detect four bugs in content publishing
  • --markdown flag stored file path instead of reading content
  • Validator checked manifest against JSON, missing actual content verification

I'm too lazy to check my emails and Classroom stuff, so I built Hermes

I was registered for the two previous challenges too, but I was too lazy ( binge watching Black Clover :) ) to submit anything.

  • Hermes is a local-first academic triage engine for distractible students
  • Uses FastAPI to poll Google Classroom, Gmail, and opportunity feeds
  • Generates audio summaries and ranks opportunities against user's stack

More from Friday 23 October →