Deployment

Creating Fly Redis

Provision Upstash Redis on Fly and configure the runtime connection.

When to use this page

  • You need Redis for caching, queues, or short-lived data.
  • You are deploying on Fly and using Upstash Redis integration.

Prerequisites

  • Fly app created and target region selected.
  • Expected Redis workload understood (cache-only vs queue-heavy).

Documentation: https://fly.io/docs/upstash/redis/

Fly Redis Upstash

Usage considerations

  • Use Redis for caching, queues, and ephemeral data
  • Avoid storing long-lived system-of-record data

Plan options

Fly offers two variants of Upstash Redis:

  • Pay-as-you-go plan - You pay per 100k requests. There's no constant connection, making it ideal for KV (key-value) storage and caching.
  • Fixed Price plan - Recommended when you need queues or require a constant connection.

Creation checklist

Follow the official Fly.io Upstash Redis documentation for the latest CLI commands and options.

  1. Choose between Pay-as-you-go or Fixed Price plan based on your needs
  2. Select a name and primary region for your Redis instance
  3. Decide on memory size and eviction policy
  4. Configure persistence settings (if needed)
  5. Set up connection method (internal Fly network vs public)

After creation

  • You'll receive a REDIS_URL connection string
  • Add it to your app's secrets: fly secrets set REDIS_URL=<your-redis-url>

What you should know

Your databases run within Fly.io infrastructure, but not inside your organization’s network. So you’re only paying Upstash pricing - not additional VM costs.

Verify

  • App can connect with REDIS_URL.
  • Cache read/write test succeeds from the running app.
  • Queue worker (if used) can process jobs reliably.

Troubleshooting

  • Frequent connection drops: Verify selected plan supports your connection behavior.
  • High latency: Confirm Redis region is close to app region.
  • Unexpected eviction: Revisit memory sizing and eviction policy.

On this page