Redis
Redis is an in-memory data store commonly used for caching, message brokering (e.g., Celery), and session storage. Appliku supports multiple Redis versions and includes Redis in the free plan.
Supported Versions
| Version | Notes |
|---|---|
| Redis 8 | Latest release |
| Redis 7 | Stable, widely used |
| Redis 6 | Legacy support |
Redis is available on the free plan at no extra cost. It is the recommended choice for Django cache backends, Celery brokers, and session stores.
Provisioning Redis
- Open your application in the Appliku dashboard
- On the Application Overview page, find the Databases block on the bottom-right sidebar
- Click Add Database
- Select the desired Redis version from the dropdown
- Select the server where Redis should run
- Click Create
If you cannot find the Databases section, look for the database block on the bottom right of the Application Overview page.
Connection URL
Once provisioned, Appliku injects the Redis connection URL as an environment variable:
redis://host:port/0
The variable name depends on the database name you assigned (e.g., REDIS_URL). Your application can read this variable directly.
Common Use Cases
Django Cache Backend
Use django-redis to configure Redis as your cache backend:
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": os.environ.get("REDIS_URL", "redis://localhost:6379/0"),
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
}
}
Celery Message Broker
Point Celery at your Redis instance:
import os
CELERY_BROKER_URL = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
CELERY_RESULT_BACKEND = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
Session Store
Store Django sessions in Redis for faster access and shared state across processes:
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default"
This requires the cache backend to be configured with Redis (see above).
Managing Redis
From the Application Overview page, click Manage in the Databases card to:
- Start / Stop / Restart the Redis container
- View logs for debugging connection issues
- Delete the instance (data in memory is lost)
Redis is an in-memory store. Data does not persist across container restarts unless Redis persistence is configured. For durable data, use PostgreSQL.
Next Steps
- RabbitMQ -- Alternative message broker
- Database Management Overview -- All supported database engines