1. No Profile Picture
    Demonic Swordsman DGQB
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2003
    Rep Power

    How does a web request physically work?

    Although I've been a computer geek for a while, it just occurred to me that I don't actually know how the internet physically works. What I mean is this:

    Let's say I'm in Indiana (which I am), and I browse to a website hosted in Thailand. How does the request initiated from my computer physically get to the server on which the Thai website is hosted?

    I understand how it works logically: my ISP looks up the DNS of the website and pings the corresponding IP address for content. But how does it physically reach it, is what I want to understand.

    I imagine it might work like this. In the highly likely scenario that I'm wrong, I would appreciate your correction.

    First, I imagine the world of computers is all physically interconnected by cables and cable providers. I imagine my computer starts to send a signal through the cables of my neighborhood, which continues through the cables of the city, which flies through the cables of the state, which travels through the cables of the rest of the country, which then travels through the submarine cables across the Pacific Ocean, until it gets to the cable in Thailand, which carries my original signal to the web server and says "this guy in Indiana requests your content."
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Rep Power
    Physically the data gets there as electromagnetic radiation propagated along some medium. The medium is generally something like copper wire, fiber or air. For a long distance connection it'll probably be transferred through several different mediums owned by many different companies. So basically as you suggested, everything is physically connected more or less.

    The mediums transfer the signal by varying the radiation properties. For example, on a copper wire a voltage of +5 volts might indicate a "0" value, and a value of 0 volts might indicate a "1" value. Both ends of the connection are synchronized in some way so that the property can be varied very quickly over time. For example, perhaps the sender and receiver agree that every 8ns the sender should sample the wire to get the next value. This allows the data to be transferred in its binary form.

    The internet is a packet based network (unlike a traditional telephone network). This means that your request for content is broken down into different chunks of data, each of which is sent independently to its destination. So you don't really "open a line" to the destination, your packets just jump into a stream along with many other packets that are going to many different destinations. Along the way there are many switching spots where packets come in on one wire and go out on one of many different possible wires, depending on their final destination. In that way packets get from one location to another. Of course, since each packet is independent, they may take different paths when going from the source to the destination and they may even arrive out of order. The switching stations may also choose to further fragment your packets into even smaller packets.

    Each packet has either a fixed length or a length specifier, so that the receiver is able to determine what bits belong to what packet. Each packet also has an address, so that the switching stations know where the packet's final destination is and who sent it.

    There are many different protocols for the actual routing and handling of packets. There are also many different layers to the internet and networking in general. The standard model has 7 different layers.

    The Wikipedia articles on this particular subject are actually quite good.

    Comments on this post

    • AdamPI agrees : Way to take him very literally, I thouroughly enjoyed reading this. Technically accurate with a hint of smart-a$$ mixed in. ( :
    • vb.net agrees : Very insightful!
    Last edited by E-Oreo; September 21st, 2011 at 12:31 AM.

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo