Ever wonder what happens behind the scenes when you enter a URL?
In this episode of knowlwedge ketchup, Prazwal takes us behind the scenes of how the internet communicates - with a detailed look into the engineering behind HTTP.
URL is made up of ? https://www.instagram.com/content/reels/?q=home https:// = scheme instagram.com = domain name /content/reels/ = path ?q=home = additional metadata key value pair
another machine or client & server in internet it requires IP address. • This process of converting domain name to IP address is DNS resolution. Browser gets the ip address information from root DNS server. It is heavily cached by Browser, Operating system. If it is not available there , it goes across alot of machines DNS Lookup
HTTP specification and sends it across to server GET /reels/search?q=home HTTP/1.1 Host: www.instagram.com Connection: keep-alive After server gets the message, it extracts and parse the message. GET /reels/search?q=home HTTP/1.1 Host: www.instagram.com Connection: keep-alive
the previous message and understands what needs to be done. Server may just load the file from local disk & serve it OR it may call to database to get responde OR it may throw error if malinformed HTTP/1.1 200 OK = status code Content Type: text/html = type content length: 1024 = length <html> = body **If browser does not know how to process it downloads the file**
the fundamental application-layer protocol for transmitting hypermedia documents (e.g., HTML) across the World Wide Web. • Foundation of Web Communication: It enables web browsers, mobile applications, and other clients to communicate with web servers. • The vast majority of internet traffic relies on HTTP. • Core Principle: A foundational understanding of HTTP is indispensable for building and debugging systems.
an HTTP Client initiates a request for data or an action from an HTTP Server, which then sends back a response. • Application Programming Interfaces (APIs): Extensively employed for RESTful APIs, enabling programmatic communication and data exchange between software systems. • RESTful Interaction: Utilizes standard HTTP methods (GET, POST, PUT, DELETE) to interact with resources, establishing a uniform interface. • Abstraction Tools: Developers commonly use tools like curl, programming language requests libraries, and Postman to abstract away low-level HTTP complexities.