By now, we have established a general understanding of how computers find other computers on the Internet, and how they can establish a network connection via IP addresses and data packet routing using these addresses.

We now need to zoom in even closer, and have a look at how exactly data is exchanged between a client and a server.

First of all, it’s important to note that it is not computers which exchange data through the Internet, it is applications which do.

Our computers are just the physical shell in which our applications live, providing the physical means like network cards and network cables (or radio signals) which enable remote applications to talk to each other.

In our case, the two applications talking to each other are the web browser application and the web server application.

Let’s update a diagram we have used before with more details:

Your computer system                      Web server system
┌───────────────────┐                     ┌───────────────────┐
│                   │                     │                   │
│  Web browser      │                     │  Web server       │
│  application      │                     │  application      │
│  ┌────────────┐   │ requests content    │  ┌────────────┐   │
│  │          --│---│---------------------│--│-->         │   │
│  │            │   │                     │  │            │   │
│  │            │   │                     │  │            │   │
│  │            │   │                     │  │            │   │
│  │            │   │                     │  │            │   │
│  │         <--│---│---------------------│--│--          │   │
│  └────────────┘   │       responds with │  └────────────┘   │
│                   │             content │                   │
│                   │                     │                   │
└───────────────────┘                     └───────────────────┘

As you can see, the word server is used ambigously: it can mean the physical machine - the hardware - which is connected to a network like the Internet in order to serve data (e.g. a web server for web pages, a file server for files, a mail server for mails), but it can also mean the application - the software - which does the serving of web pages, files, or mails.

To distinguish between these two, I’m more precise in this text: I will talk about the server application when talking about the piece of software which serves web pages, and about the server system when talking about the computer which runs the server application.

The Internet mechanisms we have seen so far - DNS, IP addressing, and routing - are sufficient to establish a general network connection between two computer systems, but not for making their applications talk to each other.

We need another building block, another protocol which allows to link two applications together over an IP-based Internet connection, making reliable data exchange between two applications possible: TCP, the Transmission Control Protocol.

Again: the IP protocol allows two computers to establish a connection, and TCP allows two applications, one on each computer, to exchange data. The metaphor here would be that a computer is a street, and an application on a computer is one house on the street.