Skip to content

Archive

Caching

36 articles
Software Engineering 22 Sep 2026 7 min read

Request Coalescing Stops Cache Misses from Multiplying Backend Work

Request Coalescing Stops Cache Misses from Multiplying Backend Work A cache miss is usually cheap when one caller causes one backend lookup. The same miss can become expensive when many callers arrive for the same key at nearly the same time. Each caller observes the key as absent, each starts identical work, and the backend receives a burst precisely when the cache is providing no protection for that key. Request coalescing changes that concurrency pattern. The first caller becomes the leader for a key. Later callers join the same in-flight operation and wait for its result rather than starting equivalent work. Once the fill completes, the result can populate the cache and be returned to the waiting callers.

Software Engineering 21 Sep 2026 6 min read

Request Coalescing Collapses Cache-Miss Bursts

Request Coalescing Collapses Cache-Miss Bursts A cache miss is usually cheap when one caller triggers one backend read. The same miss can become expensive when hundreds of callers arrive for the same key before the first fill completes. Each caller sees an empty cache and starts equivalent work, multiplying load precisely when the cached value is unavailable. Request coalescing places a small concurrency boundary around that fill. The first caller starts the backend operation. Later callers for the same key join the in-flight operation instead of starting another one. When it completes, the result can populate the cache and be delivered to the waiting callers.

Software Engineering 21 Sep 2026 6 min read

Consistent Hashing Limits Key Movement During Membership Changes

Consistent Hashing Limits Key Movement During Membership Changes A simple hash partition often looks sufficient: owner = hash(key) % node_count With four nodes, every key maps to one of four remainders. The problem appears when the membership changes. Moving from four nodes to five changes the modulus, so a large fraction of keys select a different owner even though only one node was added.

Software Engineering 20 Sep 2026 6 min read

Stale-While-Revalidate Keeps Cache Refresh off the Request Path

Stale-While-Revalidate Keeps Cache Refresh off the Request Path A cache entry does not become useless at the exact instant its freshness timer expires. For some data, a value that is a few seconds old is still preferable to making every caller wait for a backend refresh. Stale-while-revalidate uses that tolerance explicitly: the cache may serve an expired value for a bounded interval while a refresh runs separately. The policy changes refresh from a request-path requirement into background work for entries that remain acceptable while stale. It can reduce latency spikes around expiration, but only when the application can state how stale a response may become.

Software Engineering 20 Sep 2026 4 min read

Request Coalescing Collapses Concurrent Cache Misses

Request Coalescing Collapses Concurrent Cache Misses A cache miss can become expensive when many requests ask for the same key at nearly the same time. Without coordination, each caller can start an identical database query, remote call, or computation. The cache eventually fills, but the backend absorbs a burst precisely when the cached value is absent. Request coalescing changes the concurrency boundary. The first caller starts the load and publishes an in-flight entry for that key. Later callers join that entry instead of starting equivalent work. When the load finishes, its result is distributed to the waiting callers and the in-flight entry is removed.

Software Engineering 19 Sep 2026 6 min read

Request Coalescing Collapses Concurrent Cache Misses into One Fill

A cache can reduce steady-state backend traffic yet amplify work at the instant a popular entry expires. If one hundred requests observe the same missing key before any replacement value is stored, a conventional lookup path can send one hundred equivalent reads to the origin. The cache is functioning according to its lookup rules; the amplification comes from concurrency around the empty interval. Request coalescing changes that interval. The first caller for a key starts the fill, while later callers for the same key attach to that in-flight operation instead of starting equivalent work. When the operation completes, its result is distributed to the waiting callers and, when appropriate, stored in the cache.

Software Engineering 16 Sep 2026 6 min read

Vary Expands HTTP Cache Selection Beyond the URI

Two GET requests for the same target URI can require different cached responses. If an origin selects representation metadata or content from request headers such as Accept-Encoding, a cache keyed only by the URI can return a representation selected for a different request. HTTP’s Vary response field extends cache selection across nominated request fields. It does not merely document negotiation. For a stored response carrying Vary, those nominated fields constrain whether that response can satisfy a later request without revalidation.

Software Engineering 16 Sep 2026 7 min read

If-Range Prevents Mixed-Representation Resumes

A resumed HTTP transfer can corrupt a local result without any malformed bytes if the resource changes between requests. The first response may supply bytes from one representation while a later range response supplies offsets from another. If-Range exists to bind the resumed range to the representation that produced the stored prefix. This is a representation-identity problem rather than a transport-framing problem. Byte offsets only have stable meaning relative to a particular representation. A syntactically valid 206 Partial Content response can still be unusable for recombination when its bytes belong to a different version.

Software Engineering 16 Sep 2026 7 min read

HTTP Stale-While-Revalidate Moves Cache Refresh Off the Request Path

A cache can return an expired stored response immediately and start validation in parallel when stale-while-revalidate permits that reuse. The request that encounters the stale entry therefore does not have to inherit origin validation latency, but it can receive representation data older than the normal freshness lifetime. This is a deliberate shift in the cache contract. Freshness still expires at the configured boundary. The extension adds a separate interval in which stale reuse is permitted while validation proceeds, so response age and request latency become partially decoupled.

Software Engineering 16 Sep 2026 8 min read

HTTP If-Range Couples Partial Retrieval to Representation Identity

A client that has only part of an HTTP representation faces a consistency problem when it asks for the missing bytes later. Byte offsets are meaningful only against the representation whose bytes established those offsets. If the selected representation changes between requests, combining an old prefix with a new suffix can produce data that no server ever emitted. If-Range attaches representation identity to that partial-retrieval boundary. When its validator matches, the server can process the accompanying Range field. When it does not match, the server ignores Range and sends the complete selected representation through the normal successful response path instead of returning a failed-precondition response.

Software Engineering 16 Sep 2026 6 min read

ETag Revalidation Separates Cache Freshness From Representation Transfer

An HTTP cache can hold a response that is no longer fresh yet still avoid downloading the representation again. When the stored response carries a usable validator, the cache can send a conditional request and let the origin confirm whether the selected representation has changed. This separates two operations that are often treated as one: checking whether cached state remains valid and transferring a new representation. A successful revalidation can perform the first without performing the second.

Cybersecurity 16 Sep 2026 7 min read

DNSSEC Denial Proofs Let Resolvers Synthesize Negative Answers

DNSSEC Denial Proofs Let Resolvers Synthesize Negative Answers A recursive resolver receives a query for a random subdomain beneath a signed zone and already holds a validated denial record from an earlier lookup. The queried label was never sent to the authoritative server, yet the resolver can still return an authenticated negative result. The answer is not a guess and is not ordinary exact-match negative caching. It is derived from cryptographic evidence that covers a portion of the DNS namespace.

Tech 16 Sep 2026 5 min read

DNS Negative Caching Temporarily Stores Name Errors

A DNS cache does not store only successful answers. Recursive resolvers can also retain authoritative responses that say a requested name or record does not exist. This behavior is called negative caching. Negative caching reduces repeated work. If many clients ask for the same absent name, a resolver can answer from its cache instead of sending the same query through the DNS hierarchy each time. The trade-off is temporal. If an administrator adds the missing record while a negative answer is still cached, some clients can continue receiving the cached error until its negative cache lifetime expires.

Software Engineering 16 Sep 2026 6 min read

DNS Negative Caching Can Outlive Record Creation

A recursive DNS resolver can continue returning an earlier absence result after the authoritative zone has gained the requested name. The new record and the cached negative answer are not contradictory: they exist at different points in the resolution path, and the cache remains valid until its negative TTL expires or local policy removes it sooner. This behavior gives DNS absence its own cache lifetime. Publishing a record changes authoritative state, but it does not synchronously invalidate negative entries already stored by recursive resolvers.

Cybersecurity 16 Sep 2026 8 min read

Cache Keys Define the Security Boundary of Shared HTTP Responses

Cache Keys Define the Security Boundary of Shared HTTP Responses A reverse proxy receives two requests for the same URL. One carries a header that changes the origin response; the other does not. If the proxy stores the first response under a key that ignores that header, the second request can receive content generated from state it never supplied. The cache is operating correctly according to its key, yet the key has merged two requests that the application treats as distinct.

Software Engineering 15 Sep 2026 7 min read

Request Coalescing Turns Concurrent Cache Misses Into Shared Work

A cache entry can expire while hundreds of requests for the same key are already in flight. If every request observes the miss independently, each can start the same backend operation before any result reaches the cache. The cache still limits work across time, but it does not limit duplicate work during that miss interval. Request coalescing adds a second boundary: concurrent operations for the same logical key can share one in-flight computation. One caller becomes the active producer, while matching callers wait for that producer’s result instead of starting equivalent work. The mechanism is also called single-flight suppression in systems that expose it as a concurrency primitive.

Tech 15 Sep 2026 6 min read

DNS TTL Controls Cache Reuse

DNS TTL Controls Cache Reuse DNS resolvers avoid repeating the full lookup process for every request by caching resource records. Each cached record set carries a time to live, or TTL, that limits how long the resolver can normally reuse that data before consulting its source again. A longer TTL can reduce query traffic and make repeated lookups faster. A shorter TTL narrows the period in which cached data can remain in use after an authoritative record changes. The value therefore connects DNS performance with the timing of operational changes.

Tech 15 Sep 2026 4 min read

DNS Negative Caching Reuses Name Errors

DNS caches are not limited to successful address lookups. A recursive resolver can also retain an authoritative answer that says a requested name does not exist or that a particular record type has no data. This behavior is called negative caching. It prevents repeated requests for the same missing data from reaching authoritative DNS servers on every lookup. Negative answers cover different cases A DNS response can report that an entire domain name does not exist. The NXDOMAIN response code represents this case.

Tech 15 Sep 2026 7 min read

DNS Negative Caching Keeps Failed Lookups Temporary

A DNS lookup does not always return an address or another requested record. An authoritative server can report that a domain name does not exist, or it can report that the name exists but has no record of the requested type. Recursive resolvers can keep these negative answers in cache for a limited period. That behavior reduces repeated traffic for the same failed lookup and prevents authoritative servers from receiving identical questions on every client attempt.

Tech 14 Sep 2026 5 min read

DNS TTL Controls How Long Resolvers Reuse Records

DNS answers are often reused instead of being requested from authoritative servers for every connection. A resolver can keep a record in its cache for a limited period, then answer later queries from that cached copy. The record’s time to live, commonly written as TTL, sets that cache lifetime in seconds. A value of 300 permits caching for up to five minutes, while 3600 permits up to one hour. Once the remaining lifetime reaches zero, the cached record is no longer considered fresh and the resolver normally needs a new answer before serving it again.

Cybersecurity 14 Sep 2026 7 min read

Cache Keys Define the Security Boundary of Shared Responses

A reverse proxy can receive two requests that look different to an application and identical to its cache. That disagreement is enough to turn an ordinary performance feature into a cross-user security boundary. Shared HTTP caches are built around equivalence. A cache key decides which requests may reuse the same stored response. The origin application makes a separate decision about which request properties influence its output. Security problems appear when those two models diverge: the origin varies a response on data that the cache does not include in its identity for that response.

Software Engineering 13 Sep 2026 9 min read

Request Coalescing Turns Cache Miss Bursts Into Shared Work

A cache entry expires at a single instant, but requests for that entry do not necessarily arrive one at a time. If twenty callers observe the same miss before any caller has repopulated the cache, a conventional cache-aside path can send twenty equivalent reads to the origin. The cache is functioning according to its contract; the concurrency around the miss is creating duplicated work. Request coalescing changes that boundary. Instead of treating each miss as permission to start an origin operation, callers for the same key can share one in-flight operation. One caller becomes the producer of the pending result. Other callers wait for that result rather than starting equivalent work.

Tech 13 Sep 2026 6 min read

DNS Cache and Delayed Address Changes

A website can move to a new server while one device still reaches the old address and another reaches the new one. The site itself may be healthy in both places. The difference can come from DNS caching: a resolver is reusing an answer it received earlier instead of asking the authoritative DNS service for the current record. This behavior is part of normal DNS operation. Caching reduces repeated queries and lets resolvers answer familiar names without starting a fresh lookup each time. It also means a DNS record change does not become visible to every client at the same instant.

Cybersecurity 13 Sep 2026 7 min read

Cache Keys Are Security Boundaries at the HTTP Edge

Cache Keys Are Security Boundaries at the HTTP Edge A reverse proxy can receive two requests that an application considers different and still treat them as the same cache entry. That gap is enough to turn a response intended for one request context into a response served to many others. The issue is not caching in isolation. It is disagreement about identity. Applications make decisions from headers, query parameters, cookies, paths, host information, and sometimes values added by upstream infrastructure. A shared cache uses a smaller set of inputs to decide whether a stored response matches a later request. If an input changes application behavior but does not participate in the cache key, that input crosses a security boundary without being represented in cache identity.