Key Value
Use a private Redis-compatible service for caching, queues, and shared application state.
Openstead Key Value provides a Redis-compatible service for caches, background-job queues, rate limits, and shared application state. It runs separately from your web application and connects through the private network.
Create a Key Value service
- In your application's project and environment, select New → Key Value.
- Choose a service name and a paid instance type.
- Select the eviction policy appropriate to the workload.
- Review the service-month quote and complete checkout.
- Wait for the service to be running, then open Connections.
Key Value uses the paid application compute tiers and includes 5 GB of persistent database storage. It does not use the MySQL Free plan. See Pricing.
Connect with a client
Connect the service's Connection URL field to REDIS_URL on your application, then redeploy. The private port is 6379. The URL contains the authentication password; treat it as a secret.
For Python with the redis package:
import os
import redis
client = redis.Redis.from_url(os.environ["REDIS_URL"], decode_responses=True)
client.set("example:message", "Hello from Openstead", ex=60)
print(client.get("example:message"))Use connection pooling rather than opening a new connection for every command. Select client timeouts and retry behaviour that suit your request latency and queue semantics.
The connection is for applications in the same environment. A browser, laptop, or service in another environment cannot use the private hostname. Key Value has no public endpoint or phpMyAdmin interface.
Choose an eviction policy
| Policy | Behaviour |
|---|---|
allkeys-lru | Prefers evicting less recently used keys |
allkeys-lfu | Prefers evicting less frequently used keys |
volatile-lru | Evicts less recently used keys only when they have an expiry |
noeviction | Refuses writes that require more memory instead of evicting keys |
An eviction policy controls Redis behaviour when its configured memory threshold is reached; it is not a guarantee that a process can never exhaust its instance memory. Monitor resource use and leave room for Redis overhead, persistence, and client buffers.
For caches, set expirations and design the application to rebuild missing values. For durable job queues, review the queue library's recommended policy; silently evicting queue keys can lose work. noeviction requires monitoring and handling write errors when capacity is exhausted.
Persistence and recovery
Openstead enables append-only persistence and stores the data directory on a persistent volume. Logical backups produce .rdb exports and can be managed in Recovery. See Backups.
A restored queue may contain work that was already processed after the recovery point. Design consumers to be idempotent, and pause producers or consumers during a recovery cutover when required.
Persistent storage and backups do not provide an automatic high-availability cluster or continuous point-in-time recovery. Use your application's source-of-truth database for data that should not depend solely on cache availability.
Common issues
- Authentication error: use the complete current connection reference, including its password.
- Connection refused: check service state and that the client is in the same environment.
- Missing cache entries: inspect TTLs and eviction behaviour before assuming a storage failure.
- Unexpected queue behaviour after restore: reconcile queued jobs with the application database and avoid replaying non-idempotent operations blindly.