Web Connection Basics

Okan Özşahin
2 min readOct 31, 2021

Computers can be connected to a network. Connection happens on many different levels. At the lowest level, a network may consist of two or more computers directly connected by some physical medium such as coaxial cable or optical fiber. We call such a physical connection a link, and we usually call the computers it connects to as nodes. Each node must be able to say which of the other nodes on the network it wants to communicate with. This is done by assigning an address to each node. An address is a byte string that identifies a node; that is, the network can use a node’s address to distinguish it from the other nodes connected to the network. When a source node wants the network to deliver a message to a certain destination node, it specifies the address of the destination node.

If the sending and receiving nodes are not directly connected, then the switches and routers of the network use this address to decide how to forward the message toward the destination. The process of determining systematically how to forward messages toward the destination node based on its address is called routing.

A single web server can have lots of different web sites running on it, each with their own hostname. When a client asks the server for a resource, it has to specify what hostname it intends to be talking to.

Each packet has the IP addresses of the computer that sent it, and the computer that receives it. And (with the exception of some low-level packets, such as ping) it also has the port number for the sender and recipient. IP addresses distinguish computers; port numbers distinguish programs on those computers.

There are dozens of different status codes. The first digit of the status code indicates the general success of the request;

  • 1xx — Informational. The request is in progress or there’s another step to take.
  • 2xx — Success! The request succeeded. The server is sending the data the client asked for.
  • 3xx — Redirection. The server is telling the client a different URI it should redirect to. The headers will usually contain a Location header with the updated URI. Different codes tell the client whether a redirect is permanent or temporary.
  • 4xx — Client error. The server didn’t understand the client’s request, or can’t or won’t fill it. Different codes tell the client whether it was a bad URI, a permissions problem, or another sort of error.
  • 5xx — Server error. Something went wrong on the server side.

cookies are a Web feature that lets servers store data on the browser, for instance to keep a user logged in.

References

https://book.systemsapproach.org/index.html

--

--

Okan Özşahin

Backend Developer at hop | Civil Engineer | MS Computer Engineering