---
title: Redis
description: >-
  Persistent Redis 8 for caching, sessions, queues, and rate limiting, right
  next to your apps, with no key eviction.
sidebar:
  label: Introduction
  icon: zap
---
An Olimpia Redis instance is your own Redis 8, persisted to disk and connected to your apps over the [internal network](/en/plataforma/red-interna). Use it for caching, sessions, job queues, pub/sub, or rate limiting.

## Create an instance [#crear-una-instancia]

1. **Open Redis**

    In the console, go to **Redis → Create instance** and choose a name.

2. **Connect it to your app**

    In the app, open **Variables** and add the instance. Olimpia sets `REDIS_URL`. Deploy to apply the change.

## What's included [#qué-incluye]

- **Redis 8**, ready in seconds.
- **Disk persistence** (AOF): if the instance restarts, your data is still there.
- **No key eviction.** Redis never deletes keys to free up space (`noeviction`). This is what queues like BullMQ, Sidekiq, or Celery need.
- **Up to 1 GB of data.** When it reaches that cap (`maxmemory`), Redis rejects new writes with an out-of-memory error instead of deleting keys; reads keep working. Set an expiration (`EX`) on anything you use as a cache.
- **Usage-based pricing.** Each instance runs with up to 2 GB of memory and 2 vCPU, and you pay only for what it uses. See [Pricing and billing](/en/cuenta/facturacion).
- **Optional external access** over TLS. See [Connection](/en/redis/conexion).
- **Metrics**: memory used, operations per second, connected and blocked clients, number of keys, and cache hits.

## Examples [#ejemplos]

**ioredis**

```js
import Redis from "ioredis";

const redis = new Redis(process.env.REDIS_URL);
await redis.set("saludo", "hola", "EX", 60);
```

**BullMQ**

```js
import { Queue, Worker } from "bullmq";
import Redis from "ioredis";

const connection = new Redis(process.env.REDIS_URL, { maxRetriesPerRequest: null });
const emails = new Queue("emails", { connection });
new Worker("emails", async (job) => enviar(job.data), { connection });
```

**redis-py**

```python
import os
import redis

r = redis.from_url(os.environ["REDIS_URL"])
r.set("saludo", "hola", ex=60)
```

**go-redis**

```go
opt, _ := redis.ParseURL(os.Getenv("REDIS_URL"))
rdb := redis.NewClient(opt)
rdb.Set(ctx, "saludo", "hola", time.Minute)
```

## Allowed commands [#comandos-permitidos]

You connect as the `default` user, which can run all data commands. Admin commands (`CONFIG`, `ACL`, `SHUTDOWN`, `DEBUG`, and similar) are disabled.
