HTTP caching proxy

Topics: HTTP caching

As an intermediary system between a HTTP server and a HTTP client, caching proxies speed up web delivery by storing each HTTP response until its cache expiry time (also called time-to-live, TTL) is reached. If a request URL matches content stored in the cache, the proxy immediately delivers this content in response. This reduces the volume of expensive content rendering on the backend HTTP server, lowering its load in the process.

Sequence of a cache miss where the proxy doesn’t have the requested content:

sequenceDiagram
    participant Client
    participant Proxy as Caching proxy
    participant Server

    Client->>Proxy: HTTP request
    Proxy->>Server: Forward request
    Server-->>Proxy: HTTP response
    Proxy-->>Proxy: Store response
    Proxy-->>Client: HTTP response

Sequence of a cache hit:

sequenceDiagram
    participant Client
    participant Proxy as Caching proxy
    participant Server

    Client->>Proxy: HTTP request
    Proxy-->>Proxy: Retrieve cached response
    Proxy-->>Client: HTTP response

The performance advantage is obvious.

Subtopics

Bookmarks

Questions