How do servers communicate with only one other server at a time?

197 views

It’s my understanding that when a computer or a server needs to connect to another server connected to the internet, a ‘handshake’ needs to be performed so that they can share data, but how are two servers able to communicate without broadcasting all of their data to every other server connected to the internet as well?

In: 1

5 Answers

Anonymous 0 Comments

Routers.

Each server has an IP address. When server A wants to send a message to server B, it actually sends a message with B’s IP address to its nearest router. The router has a routing table – a list that says where to route each message according to the destination IP address. For example, it might say “if the IP address starts with a number between 0 and 127, send it to router X, and if it starts with 128-255 sends it to router Y”. The message is then bounced around between routers until it reaches the destination address.

And yes, the routers along the way can see all the data. That’s why, if the servers wants to communicate securely, they will create a secure session using TLS and encrypt the actual data.

You are viewing 1 out of 5 answers, click here to view all answers.