frontback / databases / valkey

Managed Valkey

A cache and a queue that speak the Redis protocol, created per project and linked to your services. Why we run Valkey rather than Redis, and what it changes for your code.

Why Valkey and not Redis

Redis left its BSD licence in 2024 for terms written to stop clouds from offering it as a service. The maintainers who disagreed forked the last open version, the Linux Foundation took the fork in, and it is called Valkey. Most of the ecosystem, and most of the Linux distributions, went with it.

We could not offer Redis under those terms without a commercial agreement with one company, and a small European cloud does not get that agreement on terms it would want to pass on to you. So we did not pretend otherwise: we run the open fork, we say so on the page, and what you pay for is the machine rather than somebody's licensing strategy.

For your code this is a non-event. The protocol is the same, the commands are the same, and the client you already import connects to the URL we hand you exactly as it did before.

main.ts
import { createClient } from "npm:redis";

// The library is still called redis. Only the server changed.
const cache = createClient({ url: Deno.env.get("CACHE_URL") });
await cache.connect();

export default {
  async fetch(request: Request) {
    const key = new URL(request.url).pathname;
    const hit = await cache.get(key);
    if (hit) return new Response(hit);

    const fresh = await render(key);
    await cache.set(key, fresh, { EX: 60 });
    return new Response(fresh);
  },
};

What you get

Like every database here, it is a project-level resource. You create one, link it to the services that should reach it, and the name you give the link becomes the environment variable prefix: CACHE arrives as CACHE_URL. Nothing listens on the public internet, and a link cannot cross into another project.

As a cache
Set a TTL and forget it. This is the shape most projects want, and the one that survives a restart best: anything you can rebuild from the database costs nothing to lose.
As a queue or a lock
Lists, streams and SET NX work exactly as they do in Redis. Keep in mind that a restart is a real event for data you cannot rebuild, and design the job to be retried.
As a rate limiter
A counter with an expiry, next to the service that increments it, which is a short hop rather than a trip across the internet.

What it is good at, and what it is not

  • It is protocol-compatible with Redis, so every client, every command and every piece of code you already wrote keeps working.
  • The licence is BSD, under the Linux Foundation, which is the whole reason it can be here at all and not behind a sales call.
  • It sits next to the service that uses it, so a cache hit is a short hop and the credentials arrive as environment variables.
  • It is memory, and memory is finite. Set a ceiling and an eviction policy, or the ceiling will find you.
  • One instance. Clustering and automatic failover are not here yet, so treat it as something you can lose and rebuild.
  • It is not a database with durability guarantees. If the data must survive everything, it belongs in Postgres or libsql.

What it costs

It counts against the same database allowance as the other engines. There is no separate cache product and no per-command billing to model.

  • Free, €010 databases, 50 MB each
  • Pro, €19 a month10 databases, 5 GB each
  • Business, €99 a month50 databases, 20 GB each

Questions people ask about it

No. Valkey speaks the Redis protocol and answers the same commands, so your client library connects to it unchanged. In practice the change is one URL in one environment variable.

Because of the licence it moved to in 2024, which is written to keep clouds from offering it as a service without a commercial agreement. We are a small European cloud, that agreement is not on offer to us on sensible terms, and we would rather run the open fork than quietly pass a licensing bill to you.

Yes. It is a Linux Foundation project carrying the maintainers, vendors and distributions that used to sit behind Redis, and it has shipped major versions of its own since the fork.

Yes, with one honest caveat: there is no failover yet, so a restart is a real event. Design the job to be retried and you will never think about it again.

No. Linked services reach it over the internal network, and a link cannot cross into another project.

On our own machines in the EU, the same ones your services run on. EU hosting is the default on every plan, not an add-on.

The other two

Go beyond what seems possible.