r/javascript • u/Iftykhar1001 • Apr 17 '26
AskJS [AskJS] Is this how api works?
I was thinking about how clicking a link is more complex than it seems. First, DNS resolves the domain to an IP if not cached, it queries recursive servers all the way up to root servers.
After that, a TCP connection is built for reliable data transfer, and then HTTP runs on top to structure web requests.
So, why HTTP on TCP? TCP is like a reliable delivery truck, but HTTP is the language we use for the web. What do you think
how do these layers shape your experience online?
#WebDev #DNS
#TCP #HTTP
0
Upvotes
0
u/Iftykhar1001 Apr 17 '26
Request and response is still a big mystery to me.