Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Why do packages take different routes to arrive at a destination?

1) Computer makes a request; 2) TCP/IP breaks request-data into packages with two headers (Header and IP Header); 3) Packages get transferred through the web via "best-route principle," created by Routers; 4)Packages get sent to server via different routes; 5) Server sends data-packages based on request to front-end;

First question: Why do packages take different routes to the same destination? Is that not impractical?

Example: Say for instance i'm sending data-package A to route A, data-package B to route B, and data-package C to route C. And if we say that route A is the fastest between the 3 routes, then why would i not consider sending all data-packages through route A?

Is it because one whole request on one route might create traffic if everyone uses the same route to make a request?

Second question: What type of routers are responsible for the "internet" as a whole? Could it be "Distribution Routers"? If so where are they situated? and how many Routers on average does it take for a request to go through to a server?

1 Answer

jacki, one of DARPA's primary goals was that the network wouldn't be dependent on any one server. In your example, if your packets had to go to server A and then server B and then server C to get to server D, what happens if server B is down?

Here's a site that will show you routing from your site to another: http://www.yougetsignal.com/tools/visual-tracert/ There are several other similar sites.

Here's a site that explains how to use TraceRoute on your Mac: http://appletoolbox.com/2015/10/how-to-run-a-traceroute-in-mac-os-x/

When we lived overseas I used this a bit to see how our requests were being routed, especially after the main cable to the country was cut by terrorists.