DEV Community

Sri Mahalakshmi
Sri Mahalakshmi

Posted on

How a request originates from cllient and reaches the server ?

When a client sends a request, it starts by entering a URL like www.example.com. The client first needs the IP address of that domain, so it performs DNS resolution. It checks local cache, then asks a DNS resolver, which eventually gets the IP from the authoritative server.

Once the IP is obtained, the client creates a connection to the server using protocols like TCP (and HTTPS if secure). This happens through a process called a handshake, where both client and server agree to communicate.

After the connection is established, the client sends an HTTP request to the serverโ€™s IP address. This request travels through multiple network devices such as routers and switches across the internet.

Finally, the request reaches the server. The server processes it, prepares a respons, and sends it back to the client, which then displays it in the browser.

Top comments (0)