Managed Valkey on Zenifra
Managed Valkey provides an instance compatible with the Redis protocol for three different needs: key-value data, cache, and work queues. The card selected in the Console defines the profile; there is no later profile selector.
Required permissions
Creating any Valkey profile requires managed_service.create on organization:*. To read status, use managed_service.status.read on the project ID; for the connection, managed_service.connection.read; for rotation, managed_service.credentials.rotate; to turn public access on or off, managed_service.exposure.update. owner has full access; assistant, member, and organization API Keys need the specific grants.
Choose the right product
| Product | Use it for | Durable storage | High availability | Commercial plans |
|---|---|---|---|---|
| Key‑Value | sessions, shared state, counters, and locks | Fixed at 1 GB on db-free; on other plans, capacity is chosen at creation and billed separately | One primary and two replicas on db-basic, db-premium, and db-enterprise; single instance on db-free and db-starter | db-starter, db-basic, db-premium, db-enterprise (db-free only for organizations created before the free offer update) |
| Cache | computed responses, queries, and disposable data | None on any plan: data lives only in memory | No; single instance on every plan | cache-starter, cache-basic, cache-premium, cache-enterprise (cache-free: legacy plan) |
| Queues | asynchronous tasks, workers, and durable events | Fixed at 1 GB on queue-free; 5 GB included on other plans, expandable with the excess billed | One primary and two replicas on queue-basic, queue-premium, and queue-enterprise; single instance on queue-free and queue-starter | queue-starter, queue-basic, queue-premium, queue-enterprise (queue-free: legacy plan) |
Prices, benefits, capacity, and billing mode should be read from the public catalog (GET /v1/managed-services/catalog or zenifra plans --type database, --type cache, or --type queue) or the Console cards. They may change without requiring application code changes. The plan price is per instance. On plans with one primary and two replicas (db-basic, db-premium, db-enterprise, queue-basic, queue-premium, and queue-enterprise), you pay 3 times the plan price, and additional storage is charged on each of the 3 copies. When you create the service, the Console shows the price per instance on the plan card and the total in the Cost Summary. The Premium and Enterprise plans of each profile include instance metrics on the project page, as point-in-time readings without history.
The free plans (db-free, cache-free, and queue-free) are legacy plans, available only to organizations that already received the free plans; other organizations get an error when they try to use them. On the free Key‑Value and Queues plans, storage is fixed at 1 GB and cannot be changed during creation. Free Cache does not present a durable-storage control.
The Starter plans (db-starter, cache-starter and queue-starter) have less than 1 vCPU. With that fraction of a processor, the server is paused in short cycles under continuous load: p99 latency stays in the tens of milliseconds (around 60 to 70 ms in tests with few connections), even when the average stays low. For latency of a few milliseconds under steady load, use the Basic plan or above.
Storage
Key‑Value and Queues write every change to disk. To rewrite that data safely, the storage must be at least three times the plan's data limit. The Console starts each plan at that minimum and does not accept less. The API refuses a creation below it with 400 STORAGE_BELOW_PLAN_MINIMUM, returning minimum_storage_gb. The catalog publishes the value as min_storage_gb.
| Plan | Minimum |
|---|---|
db-free, db-starter, queue-free | 1 GB |
queue-starter | 2 GB |
db-basic, queue-basic | 3 GB |
db-premium, queue-premium | 5 GB |
db-enterprise, queue-enterprise | 20 GB |
When the plan already includes more storage than the minimum (such as the 5 GB of the paid Queues plans), the included amount applies.
To grow the storage of a Key‑Value or Queues service, open the service settings, enter the new capacity in the Storage card and confirm. The service keeps answering during the expansion. Only the excess over the storage included in the plan is billed. Capacity cannot be reduced, and Free plans and monthly or yearly contracts do not allow the change. Through the API, use PATCH /v1/project/:id/storage/size. To move to a plan whose minimum is above the current storage, grow the storage first; otherwise the change is refused. Cache has no durable storage.
Change the plan
With hourly billing and the service running, you can change the plan in the Plan card of the service settings: choose the new plan, click Save plan, and confirm. The change only happens between paid plans with the same number of instances:
| Product | Plans the service can change among |
|---|---|
| Key‑Value | db-basic, db-premium, db-enterprise |
| Cache | cache-starter, cache-basic, cache-premium, cache-enterprise |
| Queues | queue-basic, queue-premium, queue-enterprise |
On the Free plans, db-starter, and queue-starter, the Plan card is locked; to leave them, create a new service on the plan you want. On monthly and yearly contracts, the plan does not change during the contract.
- Cache: the change restarts the cache, which comes back empty. Your application may be slower until it fills up again.
- Queues: while the plan changes, writes to the queue pause for about 1 to 2 minutes while the instances restart. Stored data is kept.
- Key‑Value: the change may make the service briefly unavailable until the process finishes.
- Key‑Value and Queues: to move to a smaller plan, the stored data must fit the memory of the selected plan; if it does not, remove data or choose a larger plan. If the storage is below the selected plan's minimum (see the table in Storage), grow the storage before changing.
Through the API, use PATCH /v1/project/:id/plan. To change the plan of a queue on the RabbitMQ engine, see Queues with RabbitMQ.
Security and connection
By default, the endpoint is publicly reachable over IPv4 and requires TLS and authentication. You can turn public access off; in that case, the public endpoint stops accepting connections and the service is reachable only through private connections between applications or from inside the platform. The initial connection uses the valkeys:// scheme and the default username; the full password is revealed only during project creation or credential rotation.
export VALKEY_URL='valkeys://default:RECEIVED_PASSWORD@PROJECT_HOST:PROJECT_PORT/0'Store VALKEY_URL in a secret manager or protected variable. Never put it in source code, logs, tickets, or images. Some clients do not recognize valkeys://; in that case, read the host, port, username, and password and configure TLS explicitly, or replace only the scheme with rediss://. Never disable certificate or hostname validation.
Credential rotation is asynchronous and idempotent: the request carries the Idempotency-Key header, is accepted with 202, and returns an operation; repeating the same key returns the same operation. The new connection, including the password, appears when you read the completed operation (in the CLI, use zenifra database credentials rotate --wait). The service must be running. Before rotating, list the linked applications to know which ones will need the new secret. See Connect to Valkey for examples in eight languages and Rotate credentials for the API operation.
Public access
Key‑Value, Cache, and Queues have public access on by default. To turn it off, open the service edit page, use the Public access card, and confirm. While access is off:
- the public host and port stop accepting connections, including from
valkey-cliand applications outside Zenifra; - applications and Jobs in your organization keep connecting through private connections, at
<project>.<organization-id>.zenifra.localon the service port; - credential rotation keeps working;
- the connection card shows the Public access off notice.
When you turn it back on, the service answers again on the same host and port, and the external VALKEY_URL stays the same. The service must be running, with no other operation in progress. Through the API, use PATCH /v1/managed-services/:id/exposure (Managed services — API).
Choosing a profile
- Choose Key‑Value when data is part of application state and must survive restarts.
- Choose Cache when the application can rebuild the value and accepts expiration or eviction.
- Choose Queues when work must be delivered to workers. For new integrations, start with Streams and consumer groups; use Pub/Sub only for real-time events that may be lost during a disconnect.
Create and operate
- Open Create project in the Console.
- Select the Valkey card for Key‑Value, Cache, or Queues.
- Select a plan and billing mode: hourly, monthly, or yearly, on all three profiles. On the legacy Free Key‑Value or Queues plans, storage remains fixed at 1 GB; on other durable plans, choose capacity when the Console offers that option.
- Wait for the service to become ready and copy the connection shown once.
- Use the project page, CLI, or API to inspect status, read the masked connection, and rotate credentials.
To list only one profile through the API, call GET /v1/project with type=valkey and profile=key_value, profile=cache, or profile=queue. See the projects reference for pagination, search, status, and sorting.
Do not provide an image, runtime, port, instance count, or IP rules: these fields are not part of the public managed Valkey configuration.
Choose by data lifecycle
Before creating an instance, decide whether the value can be rebuilt, must survive restarts, and has a responsible consumer that confirms each piece of work. This avoids using Cache for important data or turning a queue into a notification channel without retention. The catalog shows the current capacity and plan benefits; the project page shows status and connection details without revealing the previous password.
Reuse one connection or pool per process and close it during application shutdown. For workers, define time limits, retries with backoff, and a strategy for messages that remain pending. For Cache, record hits, misses, latency, and rebuild rate. For Key‑Value, monitor value sizes and key count. These metrics help choose the next plan without coupling the application to infrastructure details.
Backups
Key‑Value and Queues have automatic backups included in the plan, with restores done by support. Cache has no backups, since it keeps data in memory only. See Automatic backups.
Next steps
Last updated on
Zenifra managed services
Explore Zenifra managed services: Valkey for Key Value, Cache, and Queue, and RabbitMQ for messaging, with permissions, plans, and how to choose by use case.
Connect to Valkey
Connect to Zenifra Valkey over TLS with VALKEY_URL in Node.js, Python, Go, Java, PHP, .NET, Ruby, and Rust, with certificate validation and a valkey-cli test.