How much does Redis hosting cost?

Redis hosting cost depends mostly on RAM, because the whole dataset lives in memory. Small caches fit in plans of a few dollars a month; persistence, replicas and heavy traffic raise the bill.

Updated 7 min read

Learning objectives

After reading this article you will be able to:

  • Understand what makes up the price of a hosted Redis
  • Measure how much memory your Redis needs and estimate the monthly cost
  • Compare billing by memory, by command and by instance
On this page

Redis keeps the entire dataset in RAM. That makes it fast, and it also sets the bill: with almost every provider, what you pay follows the memory your data takes up, plus whatever keeps that data safe and available. If you are not sure what Redis is for yet, start with what Redis is.

Third-party prices change often, so the dollar figures in this article are hypothetical, chosen to keep the math easy. They are not any provider's prices; real prices are on the official pricing pages, so swap them for the ones on the provider's page before you decide.

RAMDatameasured on a sampleFragmentationRedis's own headroomPersistenceRDB or AOF, heavy writesReplicaa full copyRAM to pay forwhat the bill follows
With Redis the bill follows RAM: add headroom, persistence and replica to the data's memory before picking a plan.

What makes up the cost of hosting Redis?#

Almost every Redis bill splits into these items:

  1. Memory: the biggest item. The whole dataset must fit in RAM, plus room for Redis itself to work.
  2. Commands or traffic: some providers charge per command run or per volume of data read and written.
  3. Persistence: writing to disk (RDB or AOF) needs disk and, in write-heavy apps, extra RAM while saving.
  4. Replicas and high availability: a replica is another full copy of the data in memory.
  5. Network traffic: an app and a Redis on different networks can trigger transfer charges and add latency to every command.

A 100 MB cache with no persistence and a 100 MB Redis with a replica and AOF turned on cost very different amounts, even though they hold the same data.

What are the billing models?#

  • By memory (fixed plan): you pick a size, such as 250 MB or 1 GB, and pay a monthly price. It is the most predictable.
  • By command: you pay a rate for each batch of commands, plus storage. It is cheap with light use and expensive when traffic grows.
  • By instance or by hour: you rent a node with a given amount of RAM and pay for the hours it runs. A month has about 730 hours.
  • Your own server: you install Redis on a VPS and pay for the whole machine. See how much a VPS costs for the price range; the hidden cost is your maintenance time.

In any model, the question is the same: how many MB your data takes and how many commands per second you run.

How do some well-known providers charge?#

The models above show up like this in the best-known offers:

Option Model What to watch
Redis Cloud Free no-cost tier little memory, one database, shared environment
Redis Cloud Essentials memory plan size bands, shared environment
Redis Cloud Pro hourly, with a monthly minimum dedicated environment, multiple databases
Upstash Free no-cost tier monthly limits on memory, commands and bandwidth
Upstash pay as you go per command a rate per batch of commands, plus storage per GB
Upstash Fixed memory plan fixed size, no per-command charge
ElastiCache Serverless (Valkey) usage-based storage per GB-hour plus processing units (ECPUs), with a minimum amount of data billed

Current prices: Redis, Upstash and Amazon ElastiCache. On AWS, the page itself says Valkey is priced lower than Redis OSS. To estimate storage billed per GB-hour, as in serverless mode, multiply the billed GB by the GB-hour rate and by 730 hours. Hypothetical example: at $0.10 per GB-hour, 1 GB of data comes to 1 × 0.10 × 730 = $73 a month for storage alone.

Per command or per memory: which is cheaper?#

It depends on your volume. Hypothetical example: a 500 MB cache on a provider that bills per command, assuming $0.10 per 100,000 commands and the first GB of storage at no cost:

  • With 3 million commands a month: 30 batches of 100,000 × $0.10 = $3. The 500 MB fit in the first GB at no cost. Total: $3.
  • With 30 million commands a month (about 11 per second on average): 300 × $0.10 = $30.

In the second case, a fixed 1 GB plan at $10 a month (also hypothetical) costs a third of that. The rule of thumb: low or bursty traffic favors per-command billing; steady traffic favors fixed memory. A bot that queries Redis on every message, or a queue whose workers poll it, generates commands all day, even with no users online.

How do you estimate your Redis memory?#

Measure with real data. Load a sample (for example, 10,000 keys created by your own app) and compare memory before and after. The first command shows used memory, peak, configured limit and fragmentation; the second, the bytes of one specific key; the third, the biggest keys of each type:

bash
redis-cli INFO memory | grep -E '^(used_memory_human|used_memory_peak_human|maxmemory_human|mem_fragmentation_ratio):'
redis-cli MEMORY USAGE session:123
redis-cli --bigkeys

Say 10,000 keys added 4.5 MB, about 450 bytes per key. For 1 million keys, that is around 450 MB. Now add the headroom the Redis docs call for:

  • Overhead and fragmentation: the Redis administration page recommends setting maxmemory below your free RAM; with 10 GB free, somewhere between 8 and 9 GB. With 20% headroom, the 450 MB become about 540 MB.
  • Persistence with heavy writes: the same page warns that while saving an RDB file or rewriting the AOF, Redis can use up to twice its normal memory. If your app writes a lot, plan for about 1.1 GB.
  • Replica: each replica holds the full copy. Double the total memory.

If it is a cache, maxmemory with a policy such as allkeys-lru caps growth: when it hits the ceiling, Redis evicts the least recently used keys instead of growing, as the key eviction docs explain. The difference between the two roles is covered in Redis as a cache or as a database.

What are the hidden costs?#

  • License and version: since Redis 8, Redis Open Source is distributed under RSALv2, SSPLv1 or AGPLv3, at the user's choice; up to 7.2 it was BSD, according to the licenses page. Valkey is the compatible alternative many providers now offer. For most apps, the switch is transparent.
  • Distance between app and Redis: every command is a network round trip. A Redis in another region can be cheap and still make your app slow, besides generating transfer charges.
  • Jumps between plans: going from 250 MB to 1 GB can double the bill at once. Expiring old keys with a TTL delays that jump.
  • Redis as the main database: if it holds data that must not be lost, you need persistence, copies off the server and restore tests. See how to back up a database.
  • Extra environments: separate Redis instances for staging and production double the memory item.

How do you cut Redis costs?#

Set a TTL on everything that is cache, so memory does not grow forever. Store compact values: a JSON with long field names repeated across millions of keys adds up. Use hashes to group small fields of the same object. Do not use Redis as a dump for data that could live in an on-disk database; to pick the right engine, see which database to choose. And keep your app and Redis in the same datacenter.

For the full bill of a hosted database, including PostgreSQL, MySQL and MongoDB, read how much a cloud database costs.

How to do this on Square Cloud#

Square Cloud offers Redis hosting, with persistence, from the Standard plan, along with MongoDB, PostgreSQL and MySQL. The Hobby plan does not include database hosting.

You create the database in the dashboard and it is ready in seconds, in the same datacenter as your applications, with an average latency of about 1 ms and mandatory TLS. Each database accepts up to 512 connections.

Here the price is the plan's, in Brazilian reais, with no per-request or bandwidth charge (fair use policy). Standard starts at R$44.99 a month, with 4 GB of RAM in a pool shared by your applications and databases. A Redis database uses at least 512 MB of that pool; the memory estimate above tells you how much to reserve for it.

You take manual snapshots whenever you want, and every plan that includes databases also has a daily automatic snapshot. You can restore a snapshot into the same database, another one of the same engine or a new database, or download it as a .zip. See the details on Redis hosting.

Database hosting

MongoDB, PostgreSQL, MySQL and Redis next to your app

Learn more

FAQs

Is there hosted Redis at no cost?

There are no-cost tiers with limits, such as the ones on Redis Cloud and Upstash, which cap memory and, in some cases, monthly commands. They suit learning and prototypes, not production with real volume. Check the current limits on each provider's page.

How much RAM does a small Redis need?

Measure instead of guessing: load a sample of data, check used_memory in the INFO memory command and project it to your expected volume. Add headroom for fragmentation and persistence buffers.

Is per-command Redis cheaper than a fixed plan?

It is when traffic is low or irregular. With millions of commands per day, the per-command total usually passes the price of a fixed-memory plan. Run the numbers with your real volume.

Is Valkey cheaper than Redis?

Valkey is an open source fork of Redis that works with the same clients. On AWS, the ElastiCache pricing page lists Valkey below Redis OSS; check the current difference there.

Next articleMongoServerSelectionError: why MongoDB won't connectMongoServerSelectionError means the driver found no usable MongoDB server in time. Learn the causes, how to diagnose each one and how to fix the connection.

More in Databases

See all 24 articles