> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowwarden.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Redis Backend

> Redis-backed LockService and CheckpointStore for FlowWarden Stream Core — a drop-in alternative to the default MongoDB backends

`flowwarden-redis` provides Redis-backed implementations of the [`LockService`](/reference/lock-service) and [`CheckpointStore`](/reference/checkpoint-store) SPIs defined in [FlowWarden Stream Core](/quickstart). It is a drop-in alternative to the default MongoDB backends shipped in the core library — useful when your Spring Boot application already runs Redis (cache, sessions, pub/sub) and you'd rather keep your distributed locks and Change Stream checkpoints there too.

Both the blocking and reactive Spring Data Redis stacks are supported. Auto-configuration wires the blocking variants for you; the reactive variants are opt-in (see [Configuration](/redis/configuration#reactive-variants)).

## When to use

* You already operate Redis and want to avoid spreading your runtime state across two stores.
* Your Mongo cluster is sized for application data and you'd prefer to keep coordination traffic (locks, checkpoint upserts) off it.
* You want sub-millisecond checkpoint writes for high-throughput streams.

## When not to use

* You have no Redis in production and don't plan to add one — the default MongoDB backends already provide the same guarantees out of the box.
* You need transactional coupling between your application writes and your checkpoint writes — only the MongoDB backends can share a transaction with your domain writes.

## How it fits

```mermaid theme={null}
flowchart LR
    annotations["@ChangeStream<br/>@Checkpoint"] --> core["FlowWarden Stream Core"]
    core -->|LockService SPI| lockSpi{Lock backend}
    core -->|CheckpointStore SPI| cpSpi{Checkpoint backend}
    lockSpi -->|default| mongoLock["MongoLockService<br/>(_fw_locks collection)"]
    lockSpi -->|flowwarden-redis| redisLock["RedisLockService<br/>(Hash + Lua scripts)"]
    cpSpi -->|default| mongoCp["MongoCheckpointStore<br/>(_fw_checkpoints collection)"]
    cpSpi -->|flowwarden-redis| redisCp["RedisCheckpointStore<br/>(Hash + targeted HSET)"]
```

The two SPI choices are independent. You can mix backends — for example, locks in Redis and checkpoints in Mongo — by overriding only one of the auto-configured beans (see [Hybrid Mongo + Redis](/redis/configuration#hybrid-mongo--redis)).

## Compatibility

| Component              | Minimum              | Recommended |
| ---------------------- | -------------------- | ----------- |
| Java                   | 17                   | 21          |
| Spring Boot            | 3.2.x                | 3.2.x+      |
| Spring Data Redis      | 3.2.x (via Boot BOM) | 3.2.x+      |
| Redis Server           | 6.0                  | 7.x+        |
| FlowWarden Stream Core | 1.0.0-rc.3           | 1.0.0-rc.3+ |

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/redis/quickstart">
    Add `flowwarden-redis` to your project in 5 minutes.
  </Card>

  <Card title="Configuration" icon="gear" href="/redis/configuration">
    Properties reference, storage layout, reactive variants, hybrid setups.
  </Card>

  <Card title="LockService SPI" icon="lock" href="/reference/lock-service">
    The contract Redis (and Mongo) implements for `SINGLE_LEADER` coordination.
  </Card>

  <Card title="@Checkpoint storage SPI" icon="bookmark" href="/reference/checkpoint-store">
    The sister SPI that backs `@Checkpoint`.
  </Card>

  <Card title="Source on GitHub" icon="github" href="https://github.com/flowwarden-io/flowwarden-redis">
    Browse the `flowwarden-redis` source, issues, and releases.
  </Card>
</CardGroup>
