Galaxy

Redis

Ultra-fast in-memory database for caching and real-time features. Perfect for speed-critical operations.

Redis on Galaxy

Redis is an in-memory database that's incredibly fast. We're talking microseconds, not milliseconds. Use it for caching, storing sessions, and real-time features. Just remember: Redis is for temporary data that can be regenerated, not permanent storage.

Blazing Fast Performance

Redis stores everything in memory. That means your data is always ready, always fast, always available.


When to Use Redis

Choose Redis when you need blazing speed for temporary data. Think caching expensive database queries, storing user sessions, building leaderboards, powering real-time notifications, or managing rate limiting.

The key insight? Redis is a supercharger for your app. Don't use it instead of a real database. Use it alongside one to make everything faster.

Redis + Primary Database = Best of Both Worlds

Pair Redis with MongoDB or PostgreSQL. Store permanent data in your primary database, cache frequently accessed data in Redis. Your users get speed, your data stays safe.


Create a Redis Database

Spinning up Redis takes just a couple of minutes.

Open Your Dashboard

Go to your Galaxy dashboard and click Databases in the sidebar.

Start Database Creation

Click Create Database and select Redis as your database type.

Configure Your Instance

Choose your instance size based on how much data you'll cache. Pick the region closest to your app.

Create and Wait

Click Create Database & Start Billing. Galaxy provisions your Redis instance in a few minutes. You'll see "Running" when it's ready.

Size Matters for Caching

Your Redis instance size determines how much data you can cache. If you run out of memory, Redis starts evicting old data. Plan accordingly.


Connect to Your App

Click your Redis instance in the dashboard to see the connection string. Copy it and add it as an environment variable in your app's settings.

The exact variable name depends on your framework:

  • Node.js apps: Often REDIS_URL or REDIS_HOST
  • Python apps: Typically REDIS_URL
  • Other frameworks: Check your framework's documentation for the expected variable name

Keep Your Connection String Secure

Never hardcode your connection string in your code. Always use environment variables so it stays secure and out of version control.


Features

Redis on Galaxy gives you everything needed for high-performance caching:

Microsecond Speed: Data lives in memory, so reads and writes happen almost instantly. Perfect for high-traffic applications.

Key-Value Storage: Simple but powerful. Store strings, hashes, lists, sets, and sorted sets with optional expiration times.

Automatic Backups: Daily backups included, though remember Redis is designed for temporary data. Your primary database should be your source of truth.

Zero Transfer Fees: Data moving between your Galaxy app and Redis is free.


Common Questions