CDN is an example of what is called an
overlay network. Let me explain what an overlay network
is. In the previous example, I said my node
id is 80. And the content corresponding to the key
149 is stored at my node id 80. And
this is something the chip discovered, and once you've
discovered it, you want to come to me to get
the content from me. But how will you do that?
What does 80 mean from the point of
view of the internet? As you know, the physical
infrastructure of the internet works with IP addresses.
But what you have is 80. It's not an
IP address. And the operating system only understands
IP addresses, to route packets on the Internet from
source to destination. So we need, at the user
level, because we are doing this sharing of content
at the user level, a way of mapping such virtual addresses, 80, 60, and so
on, to IP addresses. So we, as friends, who have decided that well, we want to
form a social network to share information content,
and so forth, we've exchanged such mapping information
and constructed a routing table at the user level. And this is what is called an
overlay network, a virtual network on top of the physical network. So, for
example, if you, using that SHA1 hash, found
that your IP address maps to node ID 60, you'll say, okay,
sure, my node ID is 60. And my IP address is such and
so that is how I'm going to construct a user-level routing table.
All I know is your node ID, and that node ID maps to some IP address.
And I can use this correspondence between the node ID and the IP address,
to have a way of sending information to you. And maybe, a friend of yours
has exchanged routing information with you, and he
has told you that his node ID's 80.
And he has also given you how to reach
him. Given that node ID. And you've shared that
information with me as well saying that you know,
I have buddies, and these are all the note
IDs of my buddies. So that's how I construct
this routing table, which is really a table that
consists node IDs of my friends and friends of
friends, friends of friends of friends, and so on.
That's how I construct this user level routing table. Now
if i wanted to send a message to my buddy,
let's say B, and his node ID is 60. Because
B has given me his IP address, when I send
a message to node ID, I can covert that to
the IP address, give it to the physical network, and
it goes to the physical network gets delivered to B.
What if I want to send a message to some other
node C. I know the node id of c because my buddy b exchanged that with
me. But I have no idea what the IP address of c is. But on the other hand, I do
know that b has a way of getting to c. And so in my routing table, what I'm
going to say is that given a name of
a particular node, I know the virtualized node ID associated
with that node, 64B, 84C, and I also know what
the next hop is in the user space, in the
virtual space of getting to that particular destination. In the
case of B. I know I can directly send it to
60, because I have an IP address for B. On
the other hand, if I want to send it to C,
I have the node ID of C, but I have
no idea what that maps to in terms of IP address.
I know that my buddy B has a way
of getting it to C, and that's what I'm going to
use. I'm going to say, if I want to send something
to C, I simply hand it over to my buddy
who's at node id 60. So the routing table says,
given a node id, who's the next hop I should
give it to so that it'll eventually get there? Now
the physical network, of course, is much more elaborate than
this user level, overlay network. Now, for instance, let's say
I want to send a message to C. His node
ID is 80, but I have no idea how to send it to him except to know that if I
give it to my buddy B, who's at node ID 60, he'll know how to get it over to, to
C. So, I'm going to send it to B, and
when it comes to B, B knows. From his routing table,
the IP address for C, and therefore he will
send it to C and it'll eventually reach C. So,
at the user level, you can see that so far
as I'm concerned, if my node ID is 50, and
my node name is A, when I wanted to send a message to C, what I did, was to send
it to B. And it took two hops at the user level. It took two hops to go from A
to C, went to B my buddy and B then sent it over to C. So this is a user
level traversal of the message. But in reality, under the
covers, what is going on, is when I send this message
from A to B, it is going through the physical
network and reaching B. And when I send to message
to A to C. Even though it is two hops
over here, internally in terms of the number of network hops
that may have to be incurred in the physical network for the message to reach
eventually the destination C, it might take many
more hops. That's what an overlay network is.
A virtual network on top of the physical
network. And this particular overlay is a content
distribution network, because it allows content to be
shared and distributed among a set of users,
who have exchanged information with one another so that they can
discover one another, if not directly, indirectly through friends of friends.