Making sense of HTTP - II

We know the Internet is a broader term, and the Web is one of its applications. Simply Internet is a connection of multiple devices. We can do whatever we want with this connection, including a computer virus, hacking, etc. One of the most widely known applications is the Web.


This Web is in the application layer(TCP/IP suite). One of the protocols in this layer is called HTTP. It is the foundation of any data exchange on the web. Be it your blog, social media, etc., everything uses HTTP.



Source:MDN


HTTP is based on the Client-Server model. The client is mostly web browsers, and servers are usually where your wanted web page is located, like Google, Yahoo, Facebook, etc.


Here Client and Servers communicate by exchanging individual messages. The client sends a message to the server called Request, and the Server sends a message to the client called Response.


We know web page like Facebook has images, videos, text, etc. in them. So HTTP must be applied on all these formats.

Source: MDN

Basic Flow: Recap

So the overall picture looks like this.

  • Your laptop sends a request to some server sitting in a distant part of the world.

  • Your laptop(physical device) deals only with digital signals but for transmission of data, we use analog signals. This conversion is done by a device called Modem. This happens in the physical layer.

  • So your data is converted into analog signals but it needs to be transported to a particular destination(server). This is done by Router. This is basically in the network layer. Usually, data is sent in packets and each packet uses a different path(Router) to reach the final destination.

  • If you are segmenting data into packets - there must be some rules for segmenting the packet. That's where protocol comes in. Internet Protocol(IP) describes the structure of a packet.

  • If the packets are multiple, they need to be assembled together. This happens in the transport layer. To make sure that packets are assembled correctly, we need some protocol right. This protocol is called Transmission Control Protocol(TCP).

  • Don't confuse with layers because many things are overlapped here. A layer is just a model to explain what happens under the hood.

  • In essence, if IP is used - Data is sent into packets and sent through routers. But if TCP over IP is used, we get acknowledgment on each received packet.

  • Thus TCP over IP enables the reliability of a connection.

  • Over this TCP/IP, we have an application layer. This application layer uses the below layer and uses it for various purposes. One such purpose is the Web.

  • This Web is used for loading web pages. As a client(web browser) we send a request to load the web page from the server(where the web page code resides). This is based on request and response messages. The protocol to load web pages/fetch data is called HTTP.

  • HTTP provides a standardized way for computers to communicate with each other. Client request data format and server response data format are prescribed in http specifications


Recent Posts

See All

Disclaimer: This article is me speaking to me through this blog! Short Intro: If you want to innovate in a particular field, you need to understand how things work in the first place. Innovation is a