Your Cart
Loading

The Redis Cost and Semantic Cache Kit (PDF + 2 Python scripts)

On Sale
$19.00
$19.00
Added to cart

A cache is the cheapest line on the bill, right up until it is the reason for the incident.


Three providers meter the same Redis-compatible store three different ways. Upstash sells commands. ElastiCache Serverless sells gigabyte-hours stored plus processing units per request. Nodes, flat plans and a $12 droplet sell memory and time. Run one ordinary workload through all of them - 1 GB of resident data at 231 commands a second - and the monthly totals land between $12 and $1,200.25.


That spread is not a pricing mistake. It is four meters, and this kit is the arithmetic that tells you which one your workload belongs on.


• 600 million commands a month cost $1,200.25 on Upstash pay-as-you-go and $20 on the same provider's flat tier. The rate is not wrong; leaving it on is.

• Serverless storage is $61.32 per GB-month - 245x Upstash's $0.25 - but $0.0023 per million commands, about 870x cheaper. Set the two equal and the crossover is 30.5 million commands per GB.

• High availability reorders the table: Upstash $20 to $220 (the Prod Pack), Redis Cloud 1 GB to a 2.5 GB plan, DigitalOcean $15 to $60, ElastiCache Serverless unchanged.

• A semantic cache in front of an LLM breaks even at a 0.43% hit rate on a $14,200 model bill - and needs 8.65% on the same traffic with a $710 one.


WHAT YOU GET


The guide - 15 pages, 4 figures, 8 tables


• Part I - What the meter bills. The four meters, with the published rate card for eight plans and the throughput ceiling each flat tier hides (10,000 commands/s on Upstash, 2,000 ops/s on Redis Cloud's 1 GB).

• Part II - The ratio that decides. Why commands-per-gigabyte, not traffic, picks the plan; why 8 GB of stored answers inverts the ranking; where serverless genuinely wins and where it is the most expensive memory you can buy.

• Part III - Production doubles everything. What a replica, a standby or the Prod Pack adds, and the $200 gap that answers the self-hosting question.

• Part IV - The cache in front of the model. The break-even formula, the prompt-cache effect, the embedding cost nobody budgets for, and why a wrong hit costs more than a miss.

• Part V - The settings that keep it up. The production checklist with the failure each line prevents, and six ways this bill gets away from you.


THE SCRIPTS - redis_cost_and_cache_kit.zip


• redis_tco_calculator.py - eight provider plans, one monthly number each, from GB and commands. Table, CSV or JSON output, the decision thresholds (--crossovers), and --ha for the replica column. Every rate sits in one PRICES block you can edit.

• semantic_cache_breakeven.py - break-even hit rate from token prices, traffic and the cache bill. Multiple cache plans in one run, --hit-rate for the money at your measured rate, --cached-in-price for prompts that already hit the provider's prompt cache.

• valkey_docker_prod/ - docker-compose.yml (pinned Valkey 9.1, real healthcheck, memory limit, loopback bind) and valkey.conf with maxmemory, allkeys-lru, lazyfree, AOF everysec and ACL guidance - every line commented with the failure it prevents.

• check_prod.sh - verifies the running server against that config: policy, persistence, samples, used memory, and the hit rate computed the right way.

• README.md - every command with its arguments, expected output, the ten-minute decision path, and troubleshooting.


Both scripts run on the Python standard library and ship with --selftest. No network, no database, no account:


python3 redis_tco_calculator.py --selftest -> 23/23 checks passed

python3 semantic_cache_breakeven.py --selftest -> 15/15 checks passed


WHO IT IS FOR


• Teams running Redis or Valkey for sessions, rate limits, queues, or a semantic cache in front of an LLM.

• Anyone who has been asked what the cache costs and only has a number that is roughly right.

• Platform engineers comparing Upstash, ElastiCache, Redis Cloud, DigitalOcean and self-hosting for real.

• Anyone about to put a semantic cache in front of a model and wondering what hit rate it needs.


WHAT IT IS NOT


Not a benchmark, not a vendor quote, not financial advice. Prices are published US-region list rates read on 4 December 2026; the scripts take your rates as input, and the method is the durable part.


FILES: 1 PDF (15 pages) + 1 ZIP (2 Python scripts, one production Valkey config, README).

Edition: First, December 2026. Prices and limits checked 4 December 2026.

You will get the following files:
  • PDF (503KB)
  • ZIP (22KB)