
On this page
01 Why crawler traffic misses the cache
A cache in front of a web farm, whether a 2003 ServerIron with a caching module or a modern reverse proxy, earns its keep on popular pages. Crawlers do the opposite of popular: they walk archives, tag pages and old documentation that no person has opened this month. Every one of those requests is a cache miss that costs origin CPU and database time. The fix is not a bigger cache but rules that make long-tail pages cacheable and let crawlers ask cheaply whether anything changed. This procedure sits in the load balancing section beside the balancer techniques it builds on.
02 The procedure
Give every HTML page an explicit lifetime
Send
Cache-Controlwith a shared-cache lifetime (s-maxage) even for pages you consider dynamic. Ten minutes on a documentation page removes almost all repeat crawler hits; addstale-while-revalidateso the proxy can serve the old copy while it refreshes.Answer conditional requests
Emit a strong
ETagor an accurateLast-Modified. A crawler that sendsIf-None-MatchorIf-Modified-Sincethen gets a 304 with no body, which costs a fraction of a full render. Make sure the proxy can answer these from cache without asking the origin.Keep sitemap lastmod honest
Well-behaved crawlers use the sitemap
lastmodto decide what to refetch. If every URL carries the build date, they refetch everything; if each carries its real last change, they skip the rest.Cache robots.txt, sitemaps and llms.txt
These are the most requested files on a crawled site. Serve them from cache with a short lifetime and never let them fall through to a slow backend.
Normalise cache keys
Strip tracking parameters and sort query strings in the cache key so the same page is not cached a dozen times under different URLs.
Rate-limit what is left
Once caching absorbs the repeats, the remaining load is real novelty. Apply per-crawler limits to that, as in token-bucket rate limiting for crawlers.
03 Measuring the effect
Split cache hit ratio by client class: verified crawlers, unverified crawler labels and everyone else. Before the change, crawler hit ratios on HTML are often under 20 percent while human traffic sits much higher. After it, the crawler figure should climb close to the human one, and the count of 304 responses to crawlers should rise. Watch origin CPU during a known crawl window rather than averages; the point is to flatten the peaks. The method for identifying crawler traffic gives you the client classes to split by.
| Header | Purpose for crawler load | Typical value |
|---|---|---|
| Cache-Control: s-maxage | Lets shared caches keep HTML | 600 for documentation pages |
| stale-while-revalidate | Serve old copy during refresh | 86400 |
| ETag | Enables 304 responses | Content hash of the page body |
| Last-Modified | Fallback validator | Real edit time, not build time |
04 Pitfalls
- Personalised pages. Never cache pages that vary by login in a shared cache; mark them private and let crawlers see only the public version.
- Weak validators everywhere. An ETag that changes on every render (because it includes a timestamp) defeats 304s entirely.
- Session persistence on crawl traffic. Sticky sessions tie a crawler to one real server; for anonymous crawl traffic, spread requests with the methods in server load balancing across a pool instead.
Caching is the technical half of the answer. Which crawlers get the cached pages at all is a policy question, set out in writing an AI crawler access policy.
05 Questions
How do I reduce load from AI crawlers?
Cache HTML at the proxy with explicit shared lifetimes, answer conditional requests with 304, publish accurate sitemap lastmod dates, and rate-limit only what caching cannot absorb.
What is a conditional request?
A GET that carries If-None-Match or If-Modified-Since. If the page has not changed, the server or cache answers 304 Not Modified with no body.
Why does sitemap lastmod matter for crawler load?
Crawlers use it to decide which URLs to refetch. A uniform build date forces them to refetch everything; real dates let them skip unchanged pages.
Should crawler traffic use sticky sessions?
Rarely. Crawl traffic is anonymous and stateless, so spreading it across the pool is better than pinning it to one server.
What is stale-while-revalidate?
A Cache-Control extension that lets a cache serve a slightly stale copy while it fetches a fresh one in the background, hiding origin latency.