1. Quickstarts
  2. Render Key Value (Redis®-compatible)

Render Key Value

Provision Redis®-compatible datastores for caching and job queues.

Render Key Value provides low-latency in-memory storage that’s ideal for shared caches and job queues. Key Value instances are compatible with virtually all clients that interact with Redis®*.

Paid Key Value instances include disk-backed persistence.

Underlying libraries

  • Newly created Render Key Value instances run Valkey 8.

    + What is Valkey?

    Valkey is an open-source key-value store that began as a fork of Redis version 7.2.4. For most libraries and frameworks that connect to a Redis instance, Valkey is a drop-in replacement.

    Learn more in the FAQ.

  • Legacy Key Value instances (created before Feburary 12, 2025) run Redis 6.

    • Legacy instances no longer receive version updates, but they will continue to operate as usual.

Quickstarts

These Render quickstarts include steps for provisioning a Key Value instance:

Create your Key Value instance

  1. Go to dashboard.render.com/new/redis, or select New > Key Value in the Render Dashboard.

    This form appears:

    New Key Value creation form

  2. Provide a helpful Name for your instance.

    • You can change this value at any time.
  3. Choose a Region to run your instance in.

    • Choose the same region as your services that will connect to the instance. This minimizes latency and enables communication over your private network.
  4. Optionally change the instance’s Maxmemory Policy.

  5. Scroll down and select an instance type. This determines its available RAM and connection limit.

    Learn about Free instance type limitations.

    Selecting a Valkey instance type

  6. Click Create Key Value.

You’re all set! Your new instance’s status updates to Available in the Render Dashboard when it’s ready to use.

Connect to your Key Value instance

Every Key Value instance has two different URLs for incoming connections:

  • An internal URL for connections from your other Render services running in the same region
  • An external URL for connections from everything else
Render
Internal
URL
External
URL
Web
service
Render
Key Value
Your dev machine
(Valkey CLI, etc.)

Use the internal URL wherever possible. It minimizes latency by enabling communication over your private network.

Both URLs are available from the Connect menu in the top-right corner of your instance’s page in the Render Dashboard:

Redis connection URLs

Key Value instances use redis:// and rediss:// URL schemes. You can connect to your instance using any Redis-compatible client that supports these schemes.

Internal connection examples

To connect with your internal URL, your Key Value instance and your connecting service must belong to the same workspace and run in the same region.


# Connect to your internal Redis instance using the REDIS_URL environment variable
# The REDIS_URL is set to the internal Redis URL e.g. redis://red-343245ndffg023:6379

Sidekiq.configure_server do |config|
    config.redis = {url: ENV.REDIS_URL}
end

Sidekiq.configure_client do |config|
    config.redis = {url: ENV.REDIS_URL}
end

# Simple example from https://github.com/mperham/sidekiq/wiki/Getting-Started
class HardJob
  include Sidekiq::Job

  def perform(name, count)
    # do something
  end
end

HardJob.perform_async('bob', 5)

Enabling external connections

By default, newly created Key Value instances are not reachable at their external URL. To keep your instance secure, you can grant external access to specific sets of IPs.

In the Render Dashboard, go to your Key Value instance’s Info page and scroll down to the Access Control section:

Setting Key Value access control in the Render Dashboard

Here you can specify IP address blocks using CIDR notation. The example above grants access to the static outbound IPs for Render’s Ohio region.

These rules apply only to connections that use your Key Value instance’s external URL.

Your Render services in the same region as your Key Value instance can always connect using your instance’s internal URL.

If you attempt to connect from a disallowed IP address, your client will display an error like the following:

AUTH failed: Client IP address is not in the allowlist.

Connecting with CLI tools

The redis-cli is a useful administrative tool for exploring and manipulating data on your Redis instance. There are 2 ways you can use redis-cli with your Redis instance:

  • If you have a running non-Docker service, redis-cli will be available as part of the environment and is accessible from the service’s Shell page. The service must be in the same region as the Redis instance. You can also SSH into that service and run redis-cli from there.

  • You can run redis-cli locally on your machine. You first need to install redis-cli onto your machine. A copy and pastable redis-cli command is available in the External Access section of your Redis settings. Note that you first need to enable external connections for your Redis instance.

External connections are TLS secured. The Redis CLI command provided will include the --tls flag.

After you connect, you can set and get keys using various commands:

oregon-redis.render.com:6379> set "render_is_cool" true
OK
oregon-redis.render.com:6379> get "render_is_cool"
"true"
oregon-redis.render.com:6379> KEYS r*
1) "render_is_cool"

Configure your Key Value instance

Maxmemory policy

Your Key Value instance’s maxmemory policy determines which data it evicts to free space when it reaches its memory limit. You select a policy on instance creation and can change it later.

  • For caching use cases, we recommend using allkeys-lru.
  • For job queues, we recommend using noeviction to ensure that queued jobs are not lost.
  • For other use cases, select a policy from the table below based on your requirements.

You can select any of the following policies:

Option

Description

Can memory fill up?

allkeys-lru

Evict any key using approximated Least Recently Used (LRU).

No

noeviction

Don’t evict data. Instead, return an error on write operations whenever the instance is out of memory.

Yes

volatile-lru

Evict using approximated LRU, only keys with an expire set.

Yes

volatile-lfu

Evict using approximated Least Frequently Used (LFU), only keys with an expire set.

Yes

allkeys-lfu

Evict any key using approximated LFU.

No

volatile-random

Remove a random key having an expire set.

Yes

allkeys-random

Remove a random key, any key.

No

volatile-ttl

Remove the key with the nearest expire time (minor TTL)

Yes

Changing instance types

You can upgrade your Key Value instance to a larger instance type with more RAM and a higher connection limit.

Note the following before you upgrade:

  • It is not currently possible to downgrade a Key Value instance.
  • Your Key Value instance will be unavailable for a minute or two during the upgrade.
  • If you upgrade a Free Key Value instance, all of its data will be lost.
    • This is because Free Key Value instances don’t persist data to disk.
  1. In the Render Dashboard, open your instance’s Info page and scroll down to the Key Value Instance section.

  2. Under Instance Type, click Update.

  3. Select a new instance type and click Save Changes.

Need an instance with more than 10 GB of RAM?

Please reach out to our support team in the Render Dashboard.

Blueprint configuration

As with your other services, you can manage your Key Value instances with Blueprints, Render’s infrastructure-as-code model. For details and examples, see the Blueprint YAML Reference.

Data persistence

Paid Key Value instances on Render write their state to disk once per second via the configuration appendfsync everysec. If a paid instance experiences an interruption (or if you upgrade your instance type), you might lose up to one second of writes.

Free Key Value instances do not persist data to disk.

Metrics

Metrics for memory usage, CPU load, and active connections are available for Key Value instances in the Render Dashboard.

Key Value metrics overview in dashboard

The default metrics granularity shown is 12 hours, which can be adjusted from 5 minutes to 1 week.

Key Value metrics granularity


*Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by Render Inc is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and Render Inc.