# Routing algorithm

A **routing algorithm** is a set of step-by-step operations used to direct Internet traffic efficiently. When a packet of data leaves its source, there are many different paths it can take to its destination. The routing algorithm is used to determine mathematically the best path to take.

Different routing algorithms use different methods to determine the best path. For example, a distance vector algorithm calculates a graph of all available routes by having each point (called a node) determine the "cost" of travelling to each immediate neighbor. This information is collected for every node to create a distance table; which is used to determine the best path to from any one node to another.

Algorithm, Internet, Network terms, Programming terms, Routing