Configuring your existing managed Redis
To use Superlinked with Redis, you will need several Redis modules. The simplest approach is to use the official Redis Stack, which includes all the necessary modules. Installation instructions for the Redis Stack can be found in the Redis official documentation. Alternatively, you can start a managed instance provided by Redis (a free-tier is available). For detailed steps on initiating a managed instance, refer to the Start a Managed Redis Instance section below. Once your Redis instance is up and running, ensure it is accessible from the server that will use it. Additionally, configure the necessary authentication settings as described below.Modifications in your configuration
To integrate Redis, you need to add theRedisVectorDatabase
class and include it in the executor. Here’s how you can do it:
To configure your Redis, the following code will help you:
Start a Managed Redis Instance
1
Access Redis Labs and create database
Navigate to Redis Labs and sign in.Click the “New Database” button to start creating your Redis instance.
2
Select database type
On the database creation page, locate the
Type
selector, which offers two options: Redis Stack
and Memcached
.Ensure Redis Stack
is selected (it should be pre-selected by default).3
Configure basic settings
For basic usage, no further configuration is necessary.Redis has already generated a user called
default
and a password that you can see below it.Make note of the default username and password as you’ll need these for your Superlinked configuration.
4
Consider production settings (optional)
If you intend to use the instance for persistent data storage beyond sandbox purposes, consider configuring:
- High Availability (HA)
- Data persistence
- Other relevant production settings
For production workloads, review Redis Labs’ documentation for recommended configuration options.