What is HTTP?
HTTP, or Hypertext Transfer Protocol, is the foundational protocol used for communication on the web. It defines how information is requested and delivered between clients and servers. A client is typically a web browser, mobile application, or other software that needs to retrieve information, while a server is a system that stores and delivers that information.
Whenever you access a website, load an image, or retrieve data from an API, HTTP is involved in the process. The protocol establishes a standard way for requests to be made and responses to be returned. This allows many different systems, browsers, and servers to interact reliably across the internet.
HTTP works through a request–response model: A client sends a request to a server asking for a resource, such as a webpage or a file. The server receives the request, processes it, and returns a response containing the requested content or a message explaining the result of the request.
What is an HTTP Request?
An HTTP request is the message a client sends to a server when it wants to retrieve or interact with a resource. Resources can include webpages, images, scripts, videos, or structured data used by applications and APIs.
Take the example of a user typing in a website address into a browser; the browser generates an HTTP request directed to the server that hosts the site. The server receives the request, determines what resource is being requested, and then sends back a response containing the content needed to display the page.
An HTTP request contains several pieces of information that help the server understand what the client wants and how the request should be handled. The request includes a method, which describes the type of operation being requested, along with the URL or path of the resource. It also contains headers, which provide additional context such as the client type, accepted data formats, or authentication information.
In some cases, requests also include a body, which carries data from the client to the server. This typically occurs when a user submits a form, uploads a file, or sends structured data through an API request.
Together, these components allow servers to interpret requests accurately and respond appropriately.
Types of HTTP Requests
HTTP supports several different request methods that indicate the action the client wants the server to perform. Each method is designed for a specific type of interaction with a resource.
The most commonly used method is GET. A GET request is used when a client wants to retrieve information from a server without modifying anything on the server. This is the method most browsers use when loading webpages, images, and other static assets. Because GET requests are meant only for retrieval, they can often be cached by browsers and other network infrastructure, which helps improve performance.
Another widely used method is POST, which is typically used when a client needs to send data to the server. POST requests are often used when submitting forms, uploading files, or creating new resources in an application. Unlike GET requests, POST requests usually include a body containing the data being transmitted.There are also methods designed for updating existing resources. PUT requests are generally used when replacing or updating a resource entirely. In contrast, PATCH requests are used for partial updates, where only certain fields of an existing resource need to be modified rather than replacing the entire resource.
Finally, the DELETE method allows a client to request the removal of a resource from a server. This method is common in APIs where applications need to manage data such as user accounts, records, or stored content.
Each of these methods plays a role in defining how clients and servers interact with data on the web, allowing applications to perform a wide range of operations while maintaining consistent communication patterns.
HTTP Requests and CDNs/ How CDNs interact with HTTP Requests
A Content Delivery Network (CDN) is a distributed network of servers designed to improve the performance, reliability, and scalability of web applications. CDNs work closely with HTTP because they sit between users and origin servers, intercepting and handling many of the HTTP requests that would otherwise go directly to the origin infrastructure.
When a user makes an HTTP request for a resource hosted on a site that uses a CDN, the request is typically routed to the nearest edge server in the CDN network. These edge servers are strategically located in many geographic regions so that users can connect to a server that is physically closer to them.
Once the request reaches the edge server, the CDN checks whether the requested resource is already stored in its cache. If the resource has been cached previously, the CDN can immediately return the content to the user. This significantly reduces latency because the content does not need to be retrieved from the origin server.
If the resource is not cached, the CDN forwards the request to the origin server. The origin processes the request and returns the response to the CDN. The CDN then delivers the response to the user and may store a copy of the resource in its cache so that future requests for the same content can be served more quickly.
Why CDNs improve HTTP performance
CDNs improve web performance by reducing the distance that HTTP requests and responses must travel. When content is delivered from a nearby edge server rather than a distant origin, users experience faster load times and more responsive applications.
Caching is another key factor. Many web assets, such as images, stylesheets, scripts, and static pages, do not change frequently. By storing these resources at the edge, CDNs can respond to repeated requests without involving the origin server. This reduces the computational load on the origin infrastructure and allows it to focus on dynamic or uncached requests.
CDNs also help websites handle large volumes of traffic. During periods of high demand—such as product launches, flash sales, or viral events—the CDN network can absorb and distribute incoming requests across its global infrastructure. This prevents the origin server from becoming overwhelmed and helps maintain availability.
In addition to performance improvements, CDNs can also enhance security by filtering malicious traffic, mitigating distributed denial-of-service (DDoS) attacks, and enforcing request validation rules.
How can Fastly help?
Fastly’s CDN supports HTTP/3 and QUIC at the edge, allowing compatible browsers to connect using faster, more efficient transport than traditional TCP-based protocols. By enabling HTTP/3, Fastly helps reduce connection setup time, improve performance on unreliable networks, and deliver content more quickly to end users.
By supporting HTTP/3 across its global edge network, Fastly enables customers to deliver lower latency page loads, improved streaming performance, and stronger security through the built-in TLS 1.3 encryption used by QUIC. These improvements help organizations deliver faster, more resilient digital experiences to users worldwide while maintaining compatibility with existing HTTP infrastructure.