Frankie the balloon waving beside a city and a looping highway full of traffic

Redis on Fly.io

Caches, sessions, job queues: every app needs a Redis, and nobody wants to babysit one. Upstash for Redis runs it for you, reachable only from your Fly.io organization's private network, with read replicas wherever your users are.

Try It Now

A cheerful red cube with swirly eyes holding up two slices of cake, ringed by teal waves

Redis the Fly.io Way

Upstash for Redis is a fully managed, Redis-compatible database provisioned inside your Fly.io organization. It takes care of:

  • High availability with replication in your region
  • Regular backups, stored outside Fly.io
  • Global read replicas you can add or remove anytime
  • Private connections from every Fly.io region
  • Replica regions added or removed with no downtime
  • Billing on your regular Fly.io invoice
Try Redis

What You Get With Upstash Redis

A Redis-compatible database reachable only over a private IPv6 address restricted to your organization
Reads served from the replica nearest your app
Optional eviction, for cache workloads that should never fill up
Auto Upgrade on fixed plans, so hitting a limit moves you up a plan instead of throttling traffic or rejecting writes
The Upstash console for usage and connection strings, a fly redis dashboard away

Upstash runs on Fly.io infrastructure but outside your organization's network, so you pay Upstash's prices and no extra VM costs.

A Fly.io pocket knife with its tools folded out
A globe with hot air balloons over several regions

How Do Replicas Work?

Pick a primary region when you create the database. It can't change later.
Add or remove read replicas in other regions whenever you like
Reads go to the nearest replica, or to the primary if none is close
Writes are forwarded to the primary synchronously, so distance adds write latency

Running in one region? Put your database in the same one. Need a cache per region that doesn't have to be shared? Give each region its own database, with eviction on.

When Memory Fills Up

By default: writes are rejected once the database reaches its maximum size
With eviction on: keys with a TTL are removed first, at random, then any key at random
Keys with a TTL always expire on time, eviction or not
Change eviction, plans and replica regions any time with fly redis update
An L-shaped oven with a ringing timer as a winged cookie flies out of its open door

Scalable Pricing

Pay per request, or pick a fixed plan for a predictable bill. Fixed plans suit queue software like Sidekiq or BullMQ that polls Redis constantly. Every plan bills on your Fly.io invoice.

Pay-as-you-go

$0.20 /100k requests

Usage updates hourly on your Fly.io bill. Up to 10,000 commands per second.

Storage 10 GB
Max request 10 MB
Max entry 100 MB
Let's go!

Fixed 250MB

$10 /mo

Plus $5/mo per read region.

Max data 250 MB
Bandwidth 50 GB/mo
Let's go!

Fixed 1GB

$20 /mo

Plus $10/mo per read region.

Max data 1 GB
Bandwidth 100 GB/mo
Let's go!

Fixed 5GB

$100 /mo

Plus $50/mo per read region.

Max data 5 GB
Bandwidth 500 GB/mo
Let's go!

Fixed 10GB

$200 /mo

Plus $100/mo per read region.

Max data 10 GB
Bandwidth 1 TB/mo
Let's go!

Fixed 50GB

$400 /mo

Plus $200/mo per read region.

Max data 50 GB
Bandwidth 5 TB/mo
Let's go!

Need more? The Prod Pack add-on ($200/mo, on any plan) adds monitoring, compliance and availability features.

Getting Started

Create a database and pick your primary region and any replicas. Then grab its private redis:// URL and set it as a secret on your app.

fly redis create
fly redis status your-db-name

To poke at it yourself, run fly redis connect, which opens a redis-cli session through a local proxy.

Read the full walkthrough in our docs

Frequently Asked Questions

What is Upstash for Redis on Fly.io? +

Upstash for Redis is a fully managed, Redis-compatible database service. Databases are provisioned inside your Fly.io organization, with private, low-latency connections to your apps. Each database is replicated within its region in a highly available setup, and Upstash keeps regular backups in storage outside Fly.io.

How do I create a Redis database on Fly.io? +

Run fly redis create and pick an organization, a primary region and any read replica regions. fly redis status your-db-name then shows the database's private redis:// URL, and fly redis connect opens a redis-cli session through a local proxy.

Is my Redis database reachable from the public internet? +

No. Upstash for Redis is reached over a private IPv6 address restricted to your Fly.io organization, from any Fly.io region. To connect from your own machine, use fly redis connect, which proxies a redis-cli session through flyctl.

How do read replicas work? +

You choose a primary region when you create the database and can add or remove read replicas in other regions at any time, with no downtime. Traffic goes to the nearest replica, or to the primary if there's no replica nearby. Replicas don't take writes: writes are forwarded synchronously to the primary, so distance from the primary adds latency.

Can I change my database's primary region? +

No, the primary region is fixed at creation. If your app runs in one region, create the database in that same region.

What happens when my Redis database is full? +

By default, writes are rejected once the database reaches its maximum data size. With eviction enabled, keys are removed to free space: keys with a TTL go first, chosen at random, and if none have a TTL, keys are chosen at random. Keys with a TTL expire on time whether or not eviction is on.

Should I pick pay-as-you-go or a fixed plan? +

Pay-as-you-go costs $0.20 per 100,000 requests, with usage updated hourly on your Fly.io bill. Fixed plans charge a flat monthly price per plan and read region, and suit queue software such as Sidekiq or BullMQ that polls Redis constantly, or anyone who wants a predictable bill. With the Auto Upgrade add-on, a fixed-plan database moves up to the next plan when it hits a limit instead of throttling or rejecting writes.

How is Upstash Redis billed? +

On your regular Fly.io invoice. Upstash runs on Fly.io infrastructure but outside your organization's network, so you pay only Upstash's pricing and no extra VM costs. Usage details are in the Upstash console, which fly redis dashboard opens.

Redis is a registered trademark of Redis Ltd. Fly.io's use of the name is referential only and implies no sponsorship or affiliation.

Stop Babysitting Your Cache. Let Upstash handle it.

Try Redis