Databases & Storage
Dragonfly
Add a Dragonfly (Redis-compatible) in-memory datastore to your project
Dragonfly is a modern, Redis-compatible in-memory datastore. Use it for caching, session storage, queues, and any workload where you'd normally use Redis.
Create a Dragonfly Service
- Click Add Service in your project
- Select Database
- Choose Dragonfly
- Select a storage size
- Enter a name (e.g.,
dragonfly-cache,dragonfly-sessions) - Click Create
Rock8Cloud provisions the instance with networking handled automatically.
Environment Variables
After creation, Rock8Cloud exposes these variables for your application to connect:
| Variable | Description | Example |
|---|---|---|
HOST | Dragonfly hostname | (auto-generated) |
PORT | Dragonfly port | 6379 |
Linking to Your Application
- Go to your application service → Configuration → Environment Variables
- Add the Dragonfly variables using the names expected by your framework
Common framework patterns:
# Node.js (ioredis / redis)
REDIS_HOST=<HOST>
REDIS_PORT=<PORT>
# or
REDIS_URL=redis://<HOST>:<PORT>
# Python (redis-py)
REDIS_HOST=<HOST>
REDIS_PORT=<PORT>
# Rails (Sidekiq, Action Cable)
REDIS_URL=redis://<HOST>:<PORT>/0After saving, your application automatically redeploys with the new configuration.
Features
- Redis-compatible — drop-in replacement for Redis, works with any Redis client library
- High performance — multi-threaded architecture, significantly faster than Redis for many workloads
- Persistent storage — data survives restarts and redeployments
- Network-isolated — only accessible from services within the same project
- Fully managed — automated lifecycle management with zero configuration
Troubleshooting
Connection refused
- Verify the
HOSTvariable is correct — use the auto-generated hostname provided by Rock8Cloud - Ensure your application service is in the same project as Dragonfly
- Check that the Dragonfly deployment completed successfully
Client compatibility
- Dragonfly supports the Redis protocol — use any standard Redis client
- If using advanced Redis features (e.g., Redis Modules), check Dragonfly's compatibility docs
Related
- PostgreSQL — Relational database
- S3 Object Storage — S3-compatible object storage
- Environment Variables — Configure secrets and settings