Reverse Proxy Cache Calculator

July 26, 2026

HomeServerBlog edge cache tool

Reverse Proxy Cache Calculator

Estimate origin RPS offload, resident disk cache size, origin bandwidth saved, and metadata RAM pressure for NGINX, Varnish, Traefik plugin caches, API gateways, image caches, package mirrors, and public-share front ends.

1Named cache presets
2Traffic, TTL, and cache store inputs
Peak uncached request arrival rate at the proxy edge.
Responses allowed by Cache-Control, cookies, auth rules, or bypass maps.
Percent of cacheable traffic served from an existing object.
Mean response payload stored on disk after compression choices.
How long objects remain fresh before revalidation or refetch.
Distinct cache keys created each hour, including variants.
Extra stale serving window used to collapse refresh bursts.
Usable cache partition after filesystem and reserved space.
Key, index, header, lock, and manager overhead per cached item.
Adds room for key variance, filesystem blocks, and cache churn.
How much stale serving prevents duplicate origin refreshes.
Used for the verdict text and reference comparison.
Origin offload RPS
0
requests per second avoided
Hits plus stale refresh collapse.
Cache storage needed
0 GB
fresh plus stale resident set
Includes selected overhead buffer.
Origin bandwidth saved
0 Mbps
payload not fetched from origin
Uses average object size.
Metadata RAM
0 MB
cache index memory
Object count times bytes per key.

Calculation breakdown

Cache capacity verdict

Waiting for inputs

The meter tracks calculated cache storage against the disk cache capacity.

3Equipment and network spec grid
1 GbE
About 125 MB/s raw link rate before protocol overhead
10 GbE
Useful when cache hits are large media or artifacts
NVMe
Best for high key churn and small random cache reads
SSD
Good home lab default for static pages and images
RAM
Cache manager metadata can become the first limit
CPU
TLS, compression, and cache key hashing share cores
HDD
Acceptable for mirrors with large sequential objects
Purge
Required when long TTL objects change underneath users
4Reverse proxy cache behavior reference
Cache layerBest fitPrimary limitPlanning note
NGINX proxy_cacheStatic assets, public pages, thumbnailskeys_zone RAM and disk manager scansUse proxy_cache_lock for thundering herd control.
Varnish cacheWordPress, CMS pages, reverse proxy front endsRAM storage or malloc-backed object storeHit ratio depends on cookies and vary headers.
Traefik plugin cacheContainer labs and smaller service frontsPlugin storage backend and key rulesKeep cache rules simple and service-specific.
API gateway cacheShort JSON responses, rate-limited originsTTL correctness and invalidationCache only responses that are safe per user scope.
Mirror cachePackages, CI artifacts, game updatesDisk capacity and egress link speedLong TTL works well when objects are immutable.
5Cache sizing formulas
OutputFormula usedWhat increases itWhat reduces it
Origin offload RPSOrigin RPS x cacheable % x hit ratio, plus SWR collapseHigher hit ratio, more cacheable routes, longer TTLAuth bypass, cookies, low TTL, many one-off keys
Storage neededResident objects x average object KB x overhead bufferMore unique keys, bigger objects, longer TTL, stale windowNormalized keys, compression, cache max size policy
Bandwidth savedOffloaded RPS x average object KB x 8 / 1024Large objects and high hit ratesSmall API bodies and partial cacheability
Metadata RAMResident objects x bytes per object x overhead bufferHigh cardinality, vary headers, per-user cache keysKey normalization and shorter retention windows
6Common preset assumptions
PresetCache personalityTypical object sizeFirst tuning knob
NGINX Static CacheCSS, JS, public pages, font files32 to 128 KBIncrease keys_zone before disk looks full.
Varnish WordPress FrontHTML pages and static theme assets40 to 180 KBFix cookie bypass rules before adding hardware.
API Response CacheSmall JSON with short TTL and SWR4 to 32 KBUse route-specific TTL and vary only when required.
Image Thumbnail CacheMany image variants from galleries80 to 400 KBWatch disk writes and resize variants.
Package MirrorLarge immutable archives and indexes512 KB to many MBPrefer disk capacity and network throughput.
Nextcloud Public SharesLarge shared files with bursty readers256 KB to many MBKeep private and authenticated routes uncached.
7Capacity warning bands
Disk usedStatusLikely behaviorPractical response
Under 60%ComfortableCache manager has room for churn and stale objectsFocus on hit ratio and origin logs.
60% to 85%WatchEviction can begin during bursts or deploy spikesAdd disk, trim TTL, or normalize cache keys.
85% to 100%TightHot objects may churn and hit ratio can fallReduce variants and reserve space for managers.
Over 100%UndersizedCache will evict before the TTL model is achievedIncrease cache path size or lower resident object count.
8Home lab cache tips
Size for the active key set. Disk cache capacity is not only object size. Vary headers, query strings, language variants, and stale windows all increase resident object count.
Do not trust hit ratio alone. A high hit ratio on tiny objects may save little bandwidth, while a lower hit ratio on large images or packages can remove meaningful origin load.

Reverse proxies are caches that help you scale apps; if the origin is a bottleneck then you’ll need to size the reverse proxy cache with the origin protection in mind but also disk space and memory overhead required. With the calculator, you just plug in your traffic patterns and it does the rest of math for you so you don’t have to guess how many megabytes of RAM it’s going to take up for its metadata index.

The first thing everyone looks at are hit ratios or some other measure of raw throughput. This doesn’t tell you anything about how “big” the data is. If you’re serving tiny JSON API responses with a high hit ratio, that won’t save much bandwidth. Your app will still be protected but you haven’t unloaded the network link. On the flip side, low-hit-rate but large items like software packages and image thumbnails can drasticly reduce origin loads. This cuts down on traffic because each request has a hefty payload. You’re caching weight. The tool breaks out request offload versus bandwidth savings so you can see what matters for your own workload profile.

How to Plan Your Cache Size

The other important variable is metadata overhead. Before any object even hits the disk, it has to have an index entry, a lock, and take some space in RAM as its header. Most of your objects might be generated from unique keys with short TTLs. This is common in API gateways where query parameters generate thousands of different cache key. If this happens, your memory will soon be full long before your storage drive fills up. The calculator makes you factor in bytes-per-object so that you don’t make the all-too-common mistake of buying huge disks but still running out of swap space on a humble machine. It makes abstract into something concrete that can fit within a real memory budget that you can set up.

A second wrinkle is time-to-live. Shorter TTL mean more churn. Good stuff gets flushed out of your cache and replaced with the exact same data five minutes later. Longer TTL solves that eviction issue at the cost of staleness. And that becomes particularly problematic when your origin content changes often and isn’t invalidated properley. That’s where stale-while-revalidate comes in. The proxy serves a slightly older copy until it fetches an updated copy behind the scenes. It collapses those large groups of simultaneous requests down to a single request on the origin. We include this as factor in our estimator. This shows you how much extra traffic smart revalidation locking offloads more than just raw storage capacity.

Real world scenarios are implemented as presets in the tool, and these profiles behaves very differently under the hood. The front-end of WordPress is not a mirror. The front end is dynamic content. It pollutes cookies and varies its headers which fragments your cache key space. This requires using more RAM for index and tuning bypass rules more aggressively. A package mirror likes a lot of cheap disk space and reads in sequence. It thrives based off unchangeable objects with long retention times. That’s not how the other one is. Knowing this lets you know when to spend money on faster NVMe disks and when you can just throw more memory at the system.

Caching ends up being an optimization exercise in costs, complexity, and freshness. Zero overhead is at the cost of infinite variety. It’s not about maximizing your hit ratio; it’s about improving how you distribute your resources for maximum efficiency. Quantify the bandwidth reduction, RAM pressure, and disk usage trade-off so you stop guessing and start engineering. Design buffer based off what your load actualy is instead of just the average, and your server remains snappy even when it’s under a burst. That’s what gives you an edge through resilience.

Reverse Proxy Cache Calculator

Related posts

Leave a Comment