Published on
Where can you get managed Redis or Valkey in Brazil, paying in reais?
At Zenifra, managed Valkey works with Redis clients, runs in Brazil, and is billed in reais: Valkey Cache starts at R$ 34.90 a month and Valkey Queue at R$ 44.90 a month. Payment comes from credit added by PIX or boleto, or from a card, with no IOF for international purchases.
Short answer: managed Valkey in Brazil, in reais
At Zenifra you can create a managed Valkey, compatible with Redis clients and commands, priced in Brazilian reais and running on infrastructure in São Paulo. Plans start at R$ 34.90 a month (Cache Starter, 512 MiB of RAM) and R$ 44.90 a month (Queue Starter, 512 MiB of RAM and 5 GB of persistent storage).
The service has three profiles, chosen on the Console card at creation: Key‑Value for application state that must survive restarts, Cache for disposable in-memory data, and Queues for asynchronous work with workers. All three accept hourly, monthly, or yearly billing, require TLS and authentication, and provide a connection in the valkeys:// format. Payment comes from the organization’s credit, added by PIX (from R$ 5) or boleto (from R$ 30), and the card acts as a fallback when credit runs out.
If you are looking for managed Redis in São Paulo, there are other options: Upstash lets you pick the sa-east-1 (São Paulo) region, and AWS offers ElastiCache in the same region. Both charge in US dollars. Render and Railway, which many people use for small projects, have no region in Brazil. Further down, the comparison shows official prices converted to reais with PTAX and IOF.
What Valkey is and how it relates to Redis
Valkey is an in-memory key-value datastore, open source under the BSD license, run as a Linux Foundation project. According to the project’s own history page, it is a fork of open source Redis: in 2024, Redis Ltd. moved the Redis license from BSD to two source-available licenses (RSALv2 and SSPLv1), and a group of six active contributors, one from each of Alibaba, Amazon, Ericsson, Google, Huawei, and Tencent, launched Valkey at the Linux Foundation eight days later. The first release was 7.2.5.
On the Redis side, the redis.io licensing page explains the current situation: up to version 7.2, Redis remains BSD-3-Clause; 7.4 is under RSALv2 or SSPLv1; from Redis 8 onward, users can choose among RSALv2, SSPLv1, and AGPLv3, and only AGPLv3 is an OSI-approved open source license. If you only connect an application to a managed service, the server’s license rarely changes your day-to-day work. It matters to people who redistribute the software or offer the database as a service.
In practice, what matters to developers is compatibility. Valkey speaks the same protocol and accepts the commands you already use (GET, SET with EX, INCR, EXPIRE, lists, hashes, Streams, Pub/Sub), and well-known clients such as redis for Ruby and Rust, phpredis, and Predis work with it. The project also maintains its own clients, such as valkey-py, valkey-go, valkey-java, and Valkey GLIDE. At Zenifra, the catalog lists the Valkey engine on the 9.1 line (version 9.1.2 in the catalog’s version field on November 6, 2026).
| Project and version | License | Source |
|---|---|---|
| Valkey (all versions) | BSD (open source), Linux Foundation project | valkey.io |
| Redis 7.2 and earlier | BSD-3-Clause | redis.io/legal/licenses |
| Redis Community Edition 7.4 | RSALv2 or SSPLv1 (source-available) | redis.io/legal/licenses |
| Redis Open Source 8 and later | RSALv2, SSPLv1, or AGPLv3, at the user’s choice | redis.io/legal/licenses |
Cache, Key‑Value, or Queues: which profile to choose (and when to use RabbitMQ)
The question that decides the profile is what happens if the data disappears. If the application can rebuild the value from the source of truth, such as the result of an expensive query or a rendered page, use Cache: data lives only in memory, with no persistent storage and no replicas, and when the plan’s memory fills up the least-used keys are evicted. If the data is part of the application’s state and must survive restarts, such as sessions, counters, locks, and shared state, use Key‑Value, which writes every change to disk with AOF. If producers and consumers need to hand off work with acknowledgments, use Queues.
Queues has two engines. Valkey is the short path for background jobs: Streams with consumer groups, acknowledgment with XACK, and recovery of pending messages with XPENDING and XAUTOCLAIM. RabbitMQ (version 4.4, AMQP 0-9-1) is the choice when several services exchange messages with routing rules, because it offers exchanges, routing keys, publisher confirms, and native dead-lettering. Both use the same plans and prices. The engine is chosen at creation and cannot be changed later.
High availability also depends on the profile. Cache is always a single instance, on every plan. Key‑Value and Queues with Valkey have one primary and two replicas from the Basic plan up; Starter is a single instance. On RabbitMQ, Starter has 1 node with a classic queue, and Basic, Premium, and Enterprise have 3 nodes with quorum queues by default. Key‑Value and Queues include automatic backups, with restores through support; Cache has no backups because it keeps data only in memory.
| Profile | Use for | Persistence | High availability | Plans |
|---|---|---|---|---|
| Valkey Cache | computed responses, queries, and disposable data | none: memory only, with eviction of least-used keys | no, single instance on every plan | cache-starter, cache-basic, cache-premium, cache-enterprise |
| Valkey Key‑Value | sessions, shared state, counters, and locks | yes, AOF on disk; capacity chosen at creation and billed separately | one primary and two replicas from db-basic | db-starter, db-basic, db-premium, db-enterprise |
| Queues with Valkey | async jobs, workers, and durable events | yes, AOF; 5 GB included | one primary and two replicas from queue-basic | queue-starter, queue-basic, queue-premium, queue-enterprise |
| Queues with RabbitMQ | messaging between microservices with routing and dead-lettering | yes, durable or quorum queues | 3 nodes with quorum queues from queue-basic | queue-starter, queue-basic, queue-premium, queue-enterprise |
Managed Valkey plans and prices in reais
The values below come from Zenifra’s public managed services catalog (GET https://api.zenifra.com/v1/managed-services/catalog, read on November 6, 2026), which publishes prices in Brazilian centavos. All three profiles accept hourly, monthly, or yearly billing. With hourly billing, the running hours in the cycle are added up and rounded up to the full hour, and a stopped project incurs no compute charge. With a monthly or yearly contract, the amount is fixed even if you pause the project.
Premium and Enterprise plans on each profile include instance metrics on the project page. On paid Queues plans, the 5 GB of included storage can be expanded, and only the excess is billed. On Key‑Value, storage capacity is chosen at creation and billed separately, with a minimum of 1 GB on db-starter, 3 GB on db-basic, 5 GB on db-premium, and 20 GB on db-enterprise, because storage must be at least three times the plan’s data limit to rewrite data safely.
To compare with other providers’ hourly prices: Cache Starter costs R$ 0.06 per hour, which comes to R$ 43.80 for a 730-hour month running nonstop; the monthly plan, at R$ 34.90, is cheaper if you leave the cache on all month. Hourly billing pays off for test environments that are off much of the time.
| Plan | vCPU and RAM | Persistence and HA | Hourly | Monthly | Yearly |
|---|---|---|---|---|---|
| cache-starter | 0.5 vCPU, 512 MiB | no persistence, single instance | R$ 0.06 | R$ 34.90 | R$ 349.00 |
| cache-basic | 1 vCPU, 1 GiB | no persistence, single instance | R$ 0.10 | R$ 59.90 | R$ 599.00 |
| cache-premium | 2 vCPU, 2 GiB | no persistence, single instance, metrics | R$ 0.21 | R$ 119.90 | R$ 1,199.00 |
| cache-enterprise | 8 vCPU, 8 GiB | no persistence, single instance, metrics | R$ 0.87 | R$ 499.90 | R$ 4,999.00 |
| queue-starter | 0.5 vCPU, 512 MiB | 5 GB with AOF, backup every 24 h, single instance | R$ 0.08 | R$ 44.90 | R$ 449.00 |
| queue-basic | 1 vCPU, 1 GiB | 5 GB with AOF, primary and two replicas, backup every 12 h | R$ 0.13 | R$ 74.90 | R$ 749.90 |
| queue-premium | 2 vCPU, 2 GiB | 5 GB with AOF, primary and two replicas, metrics | R$ 0.26 | R$ 149.90 | R$ 1,499.00 |
| queue-enterprise | 8 vCPU, 8 GiB | 5 GB with AOF, primary and two replicas, backup every 8 h | R$ 1.13 | R$ 649.90 | R$ 6,499.00 |
| db-starter (Key‑Value) | 0.3 vCPU, 256 MB | AOF, storage billed separately, single instance | R$ 0.018 | R$ 11.90 | R$ 130.90 |
| db-basic (Key‑Value) | 1 vCPU, 1 GB | AOF, primary and two replicas | R$ 0.076 | R$ 49.90 | R$ 548.90 |
| db-premium (Key‑Value) | 2 vCPU, 2 GB | AOF, primary and two replicas, metrics | R$ 0.18 | R$ 129.90 | R$ 1,428.90 |
| db-enterprise (Key‑Value) | 8 vCPU, 8 GB | AOF, primary and two replicas, metrics | R$ 0.75 | R$ 489.00 | R$ 5,388.90 |
The cheapest Valkey is the Key‑Value profile on db-starter, at R$ 11.90 a month plus storage, for state that must survive restarts; for an in-memory cache, the starting point is cache-starter, at R$ 34.90. Sign-up asks for a Brazilian CPF or CNPJ, a mobile number, and an address in Brazil.
Comparison with Upstash, Redis Cloud, ElastiCache, Render, and Railway
We read each provider’s official pricing pages on November 6, 2026 and converted dollar prices to reais with the November 5, 2026 PTAX selling rate (R$ 5.4621) plus the 3.5% IOF that applies to purchases on an international card. The exception is AWS: for customers in Brazil, the billing entity is Amazon AWS Serviços Brasil Ltda., which invoices in reais at the exchange rate on the day the invoice is generated, with PIS/COFINS and ISS itemized on the tax invoice; that is why the ElastiCache rows show only the PTAX conversion, without IOF. For hourly prices, we assume a 730-hour month.
The comparisons are not identical, because each provider meters something different. Upstash sells by data size (Fixed) or per command (Pay as You Go). Redis Cloud and Render sell by memory. ElastiCache sells per node (instance) or, in serverless mode, per GB-hour of data and per processing unit. Railway charges for the resources each service consumes. The table lines up entry plans by the closest memory or data size.
On region, which matters for latency: Upstash lists São Paulo (sa-east-1) among its available regions, and the AWS price list publishes ElastiCache in South America (São Paulo). Render offers Oregon, Ohio, Virginia, Frankfurt, and Singapore, and Railway offers US West, US East, EU West, and Southeast Asia.
| Provider and plan | Memory or data | Official price | In R$ (PTAX + 3.5% IOF) | Region in Brazil |
|---|---|---|---|---|
| Zenifra cache-starter | 512 MiB of RAM | R$ 34.90/month | R$ 34.90 (already in reais) | yes, São Paulo |
| Zenifra cache-basic | 1 GiB of RAM | R$ 59.90/month | R$ 59.90 (already in reais) | yes, São Paulo |
| Upstash Free | 250 MB of data, 500K commands/month | US$ 0 | R$ 0 | sa-east-1 available |
| Upstash Fixed 250MB | 250 MB of data, 50 GB of bandwidth | US$ 10/month | R$ 56.5327 | sa-east-1 available |
| Upstash Fixed 1GB | 1 GB of data, 100 GB of bandwidth | US$ 20/month | R$ 113.0655 | sa-east-1 available |
| Upstash Pay as You Go | up to 100 GB of data | US$ 0.20 per 100K commands; US$ 0.25/GB of storage (first GB free) | R$ 1.1307 per 100K commands | sa-east-1 available |
| Redis Cloud Free | 30 MB | US$ 0 | R$ 0 | , |
| Redis Cloud Essentials | from 250 MB | from US$ 0.007/hour, total of US$ 5/month | R$ 28.2664 | , |
| AWS ElastiCache Valkey cache.t4g.micro (sa-east-1) | 0.5 GiB | US$ 0.024/hour = US$ 17.52/month | R$ 95.6960 (PTAX only; invoiced in reais by AWS SBL) | yes, São Paulo |
| AWS ElastiCache Valkey cache.t4g.small (sa-east-1) | 1.37 GiB | US$ 0.0488/hour = US$ 35.624/month | R$ 194.5819 (PTAX only) | yes, São Paulo |
| Render Key Value Free | 25 MB of RAM | US$ 0 | R$ 0 | no |
| Render Key Value 256 MB | 256 MB of RAM, 256 MB of disk | US$ 10/month | R$ 56.5327 | no |
| Render Key Value 1 GB | 1 GB of RAM, 2.5 GB of disk | US$ 20/month | R$ 113.0655 | no |
| Railway (resource-based billing) | RAM at US$ 10 per GB-month and CPU at US$ 20 per vCPU-month, within the Hobby (US$ 5) or Pro (US$ 20) subscription | 256 MB of RAM = US$ 2.50/month for memory alone | R$ 14.1332 for memory alone, plus CPU and subscription | no |
Where another option fits better: for a low-traffic cache, Upstash Pay as You Go can cost less than a fixed plan, and Upstash’s free plan, with 250 MB of data, covers tests and small projects. If your application already runs on AWS in São Paulo, ElastiCache sits on the same network as the application and is invoiced in reais by AWS SBL. If your application is on Render or Railway, the platform’s own Key Value sits on its private network. Zenifra wins when you want a fixed price in reais, PIX or boleto, high availability from the Basic plan on Queues and Key‑Value, and your application in the same Console.
How to create it in the Console and connect from Node.js or Python
The documented steps for a Cache: in the menu, click Create project and choose Valkey Cache. In Configure Valkey, pick the profile and the plan. Choose the Payment Type (hourly, monthly, or yearly) and name the cache in Basic Information. Review the Cost Summary and click Create Managed Service. For Queues, the flow is the same, with the engine choice (Valkey or RabbitMQ) before the plan. The connection credential is shown only once, right after creation, and appears again only after a credential rotation.
The connection has the format valkeys://default:PASSWORD@HOST:PORT/0 and should reach the application through the VALKEY_URL variable, stored as a protected variable or in a secrets manager, never in code. By default, the endpoint is public over IPv4 and requires TLS and authentication. You can turn off public access on the Public access card; then only the organization’s applications and Jobs can connect, through private connections at the <project>.<organization-id>.zenifra.local address. Some libraries do not recognize the valkeys:// scheme; in that case, change only the scheme to rediss:// and keep certificate and hostname validation on.
For Node.js, the documentation uses the iovalkey package (npm install iovalkey); for Python, valkey-py (python -m pip install valkey). The two examples below, copied from the documentation, read VALKEY_URL, validate the scheme, enable TLS with hostname verification, write a key with a 60-second expiry, and read it back. To test from a terminal, use valkey-cli -u "${VALKEY_URL/valkeys:/rediss:}" --tls ping, which should answer PONG. Open one reusable connection per process, not one per command.
- Other clients listed in the documentation: valkey-go (Go), valkey-java (Java), phpredis and Predis (PHP; the redis extension ships with Zenifra’s PHP runtime), Valkey GLIDE (.NET), the redis gem (Ruby), and the redis crate (Rust). In Laravel, set REDIS_URL to the URI from the Console.
import Redis from 'iovalkey'
const rawUrl = process.env.VALKEY_URL
if (!rawUrl) throw new Error('VALKEY_URL is required')
const parsed = new URL(rawUrl)
if (parsed.protocol !== 'valkeys:') throw new Error('VALKEY_URL must use valkeys://')
const client = new Redis({
host: parsed.hostname,
port: Number(parsed.port),
username: decodeURIComponent(parsed.username),
password: decodeURIComponent(parsed.password),
tls: { servername: parsed.hostname },
})
await client.set('healthcheck', 'ok', 'EX', 60)
console.log(await client.get('healthcheck'))
await client.quit()import os
from urllib.parse import urlparse
from valkey import Valkey
raw_url = os.environ["VALKEY_URL"]
parsed = urlparse(raw_url)
if parsed.scheme != "valkeys":
raise ValueError("VALKEY_URL must use valkeys://")
client = Valkey(
host=parsed.hostname,
port=parsed.port,
username=parsed.username,
password=parsed.password,
db=0,
ssl=True,
ssl_check_hostname=True,
decode_responses=True,
)
client.set("healthcheck", "ok", ex=60)
print(client.get("healthcheck"))
client.close()Pattern 1: sessions and cache-aside
A user session is application state: if it disappears, the user is logged out. That is why the documentation points to the Key‑Value profile for sessions, with a namespaced key and an expiry that matches your authentication cycle, such as SET session:{user-id} <json> EX 3600 for one hour. If you accept that a restart logs everyone out, as in a prototype, Cache also works, but keep in mind it has no persistence or replicas. For short locks, use SET lock:{resource} <unique-token> NX EX 30 and, when releasing, compare the token on the server so you do not remove a lock another worker took over.
Cache-aside is the most common pattern for the Cache profile: read the key; on a miss, query the source of truth; write the result with a TTL and, when possible, a small random jitter; invalidate the key when the source of truth changes. The commands are GET catalog:product:42, SET catalog:product:42 <json> EX 300, and DEL catalog:product:42. The jitter keeps thousands of keys from expiring in the same second and sending every request to the database at once.
The documentation lists what not to do: do not treat Cache as permanent storage, do not use an infinite TTL for data that grows without bound, do not use KEYS * to clear the cache (use namespaces with SCAN or per-key invalidation instead), and do not assume a hit means the data is current. Track hit rate, miss rate, latency, and evictions, and treat a Cache failure as a normal path: the application queries the source and keeps working.
import Redis from 'iovalkey'
import { randomInt } from 'node:crypto'
async function loadProductFromSource() {
return { id: 42, name: 'example' }
}
const url = new URL(process.env.VALKEY_URL ?? '')
const client = new Redis({
host: url.hostname,
port: Number(url.port),
username: decodeURIComponent(url.username),
password: decodeURIComponent(url.password),
tls: { servername: url.hostname },
})
const key = 'catalog:product:42'
const cached = await client.get(key)
const value = cached ?? JSON.stringify(await loadProductFromSource())
if (!cached) await client.set(key, value, 'EX', 300 + randomInt(0, 30))
console.log(value)
await client.quit()Pattern 2: rate limiting and job queues with Streams
A rate limit is a counter with an expiry. Valkey’s command documentation describes the pattern with INCR: to limit an API to 10 requests per second per IP, create one key per IP per second, increment it with INCR, and set EXPIRE to 10 seconds in the same transaction (MULTI and EXEC), so the expiry always goes with the increment. If the value INCR returns is above 10, reject the request. Old keys go away on their own. Because the counter can be lost without serious harm, it fits the Cache profile; if losing counters on a restart is unacceptable, use Key‑Value.
For a job queue, the documentation recommends Streams with consumer groups on the Queues profile: the producer adds the task with XADD, the group is created once with XGROUP CREATE ... MKSTREAM, the worker reads new messages with XREADGROUP, processes them, and only then acknowledges with XACK. A separate process inspects XPENDING and uses XAUTOCLAIM to take over messages from consumers that stopped, and the stream is capped with approximate MAXLEN or XTRIM. Delivery is at-least-once, so processing must be idempotent: the same task can arrive twice after a timeout or a recovery.
Pub/Sub works on the service, but it does not store messages: if the consumer is disconnected, the event is lost. Use it for presence, live invalidation, and disposable notifications. Lists with BLPOP remove the item before processing; when loss matters, prefer BLMOVE or Streams. If you need exchanges, routing keys, or native dead-lettering, the RabbitMQ engine on Queues handles that without a custom strategy.
MULTI
INCR rl:203.0.113.7:1793966400
EXPIRE rl:203.0.113.7:1793966400 10
EXEC
# if the INCR result is above 10, respond with 429import os
import uuid
from urllib.parse import urlparse
from valkey import Valkey
from valkey.exceptions import ResponseError
def process_email(fields):
print("process message", fields)
url = urlparse(os.environ["VALKEY_URL"])
client = Valkey(
host=url.hostname, port=url.port, username=url.username, password=url.password,
ssl=True, ssl_check_hostname=True, decode_responses=True,
)
stream = "jobs:emails"
group = "email-workers"
consumer = f"worker-{uuid.uuid4()}"
try:
client.xgroup_create(stream, group, id="$", mkstream=True)
except ResponseError as error:
if "BUSYGROUP" not in str(error):
raise
client.xadd(stream, {"type": "welcome", "user_id": "42"}, maxlen=10000, approximate=True)
for _, messages in client.xreadgroup(group, consumer, {stream: ">"}, count=10, block=5000):
for message_id, fields in messages:
process_email(fields)
client.xack(stream, group, message_id)
client.xtrim(stream, maxlen=10000, approximate=True)
client.close()Latency: what changes when the service is in Brazil
Caches and queues are hit many times per request, so the distance between the application and the service matters more here than for almost any other component. Every command is a network round trip: if a page makes five cache reads in sequence, the network time shows up five times. When the application is in Brazil and Redis is on another continent, every round trip crosses an ocean, and the cache that was supposed to speed up the response can become the slowest part of it.
The practical rule is to put Valkey in the same region as the application that uses it. If the application runs on Zenifra, Valkey sits on the same infrastructure in São Paulo, and you can turn off public access so the connection uses only the private network, at the project’s internal address. If the application runs on AWS in São Paulo, ElastiCache sa-east-1 plays the same role. If the application is in Oregon or Frankfurt, a Redis in São Paulo does not help: what matters is proximity to the application, not to the end user.
We do not publish a latency number here because it depends on where your application runs, the client, value sizes, and whether you pipeline. Measure it in your own setup: valkey-cli has a --latency option that continuously measures the server’s response time from the machine where it runs. Run the measurement from inside the application’s environment, not from your laptop, and compare it with the total time of your requests. To cut round trips, batch commands with pipelining, MGET, or MSET.
Is Valkey compatible with Redis clients?
Yes. Valkey speaks the Redis protocol, and Zenifra’s documentation lists compatible clients in eight languages, including the redis gem (Ruby), the redis crate (Rust), phpredis and Predis (PHP), plus the project’s own clients such as iovalkey, valkey-py, valkey-go, and valkey-java.
The only common adjustment is the URL scheme: Zenifra’s connection uses valkeys://, and libraries that only accept redis:// or rediss:// work once you change the scheme to rediss://. TLS remains mandatory and certificate validation should never be turned off.
Is there free managed Redis or Valkey in Brazil?
Among providers with a São Paulo region, Upstash has a free plan with 250 MB of data and 500K commands a month, and a free account can have 1 database.
At Zenifra, Valkey Cache starts on cache-starter, at R$ 34.90 a month or R$ 0.06 an hour, and Valkey Queue on queue-starter, at R$ 44.90 a month or R$ 0.08 an hour. For short tests, hourly billing is the cheapest path, and a stopped project is not charged for compute. Sign-up asks for a Brazilian CPF or CNPJ, a mobile number, and an address in Brazil.
Does Zenifra’s Cache keep data if the service restarts?
No. The Cache profile keeps data only in memory on every plan, with no persistent storage, no replicas, and no backups: a restart can empty the cache, and when memory runs out the least-used keys are evicted.
For data that must survive, use the Key‑Value profile (AOF on disk, automatic backups, and high availability from db-basic) or the Queues profile for jobs. A Cache’s plan cannot be changed after creation; to switch, create a new Cache.
Can I pay for managed Valkey with PIX or boleto?
Yes. At Zenifra, Valkey is charged to the organization’s credit, which you add by PIX from R$ 5 or by boleto from R$ 30; a card can stay on file as a fallback for when credit runs out.
Because the price is already in reais, there is no international-purchase IOF and no exchange-rate swing on the bill. Upstash, Redis Cloud, Render, and Railway charge in US dollars. AWS invoices customers in Brazil in reais through AWS SBL, with prices set in dollars and converted on the invoice date.
When do Upstash, ElastiCache, or Render make more sense?
When your application already runs on those providers or your usage pattern fits their billing model. A low-traffic cache can be cheaper on Upstash Pay as You Go, at US$ 0.20 per 100K commands; an application on AWS in São Paulo benefits from ElastiCache on the same network; a service on Render talks to Render Key Value over the platform’s private network.
Zenifra makes more sense when you want a fixed price in reais, payment by PIX or boleto, hourly billing for testing, queues with Streams or RabbitMQ in the same Console, and your application running in Brazil next to the service.