Patent attributes
A technique includes receiving a packet at a network device, wherein the packet is to be routed in a network to a destination network device; determining a plurality of candidate routes for the packet to be routed to the destination network device; grouping the plurality of candidate routes into a first set of candidate routes and a second set of candidate routes based on hop counts associated with the plurality of candidate routes; selecting one of the first or second sets based on a congestion metric threshold; selecting a candidate route from the selected first or second set based on weight metric values associated with the candidate routes of the selected first or second set; and selecting an egress port associated with the selected candidate route.