← Retour au blog
tech 4 August 2026

Diving into the 200 Milliseconds of an HTTP Request

Explore the inner workings of an HTTP request in 200ms. Discover how DNS, TCP, TLS, and more interact to deliver a response in the blink of an eye.

Article inspired by the original source
200 Milliseconds ↗ 200ms.thenodebook.com

Introduction

In just 200 milliseconds, a lot happens during an HTTP request. This swift process is crucial for ensuring smooth and responsive user experiences on the web. But what exactly happens during these precious milliseconds? Let's dive into the details and demystify this fascinating technological journey.

DNS: The Crucial First Step

It all starts with a DNS (Domain Name System) query. When a user enters a URL into their browser, the first task is to convert this domain name into an IP address that machines can understand. This process, though quick, is often a potential bottleneck if the DNS cache is missing or expired. According to a Cloudflare study, about 80 to 120 milliseconds might be spent on DNS resolution, but optimizations like DNS over HTTPS (DoH) can reduce this time.

TCP: Establishing the Connection

Once the IP address is obtained, the TCP (Transmission Control Protocol) comes into play to establish a reliable connection between the client and the server. This process involves a three-way handshake: SYN, SYN-ACK, and ACK. While this step is crucial for ensuring the reliable transmission of data, it adds a few more milliseconds to the total latency.

TLS: Securing the Data

Security is paramount on the modern web. The TLS (Transport Layer Security) protocol ensures that data exchanged between the client and the server is encrypted. Establishing a TLS connection can add between 25 and 50 milliseconds to the overall duration, but it is essential for protecting users' sensitive information.

The Kernel and Node.js Event Loop

Once the connection is established and secured, the request reaches the server. For applications using Node.js, the event loop is a key component that efficiently handles asynchronous operations. The OS kernel also plays a critical role in managing system resources to process the request.

Interacting with the Database: Postgres

Modern web applications frequently depend on databases to store and retrieve dynamic data. In our scenario, Postgres is used for this task. Optimizing SQL queries and using appropriate indexes can significantly reduce database response time, often limited to just a few milliseconds thanks to these optimizations.

Back to the Client: HTTP Response

Finally, after going through all these stages, the HTTP response is sent back to the client. The swiftness of this process is essential for maintaining a seamless user experience. Server-side and client-side caching techniques can also help reduce load and speed up this return.

Conclusion

While each step of this complex chain takes only a fraction of a second, together, they determine the efficiency of the web experience. Understanding and optimizing each part of this process can significantly enhance the overall performance of a web application.

Let's discuss your project in 15 minutes.

HTTP request DNS TCP TLS Node.js
Deepthix newsletter · 100% AI · every Monday 8am

An AI agent reads tech for you.

Our AI agent scans ~200 sources per week and ships the best articles to your inbox Monday 8am. Free. One click to unsubscribe.

Visit the newsletter page →

Want to automate your operations?

Let's talk about your project in 15 minutes.

Book a call