Redis
Step-by-step guide to set up Redis as a destination in RudderStack.
Last updated
Was this helpful?
Step-by-step guide to set up Redis as a destination in RudderStack.
Last updated
Was this helpful?
Redis is an open-source, in-memory data structure store, which can be used as a database, and a message broker.
RudderStack stores all the traits of your user as a Redis hash, allowing you to access user profiles in real-time.
Redis destination only processes identify
API calls. Other event types are ignored.
It is highly recommended that you keep your Redis instance inside a private network and make it accessible to RudderStack.
Find the open-source transformer code for this destination in our GitHub repo.
Select the destination as Redis to your source. Give your destination a name and then click on Next.
Next, in the Connection Settings, fill all the fields with the relevant information and click on Next.
Redis Destination Settings on the RudderStack Dashboard
Prefix By default, RudderStack stores user traits with the key user:<user_id>
. An extra prefix can be added in the destination configuration to distinguish all RudderStack-stored keys with a prefix.
Database RudderStack stores the user traits in the default database of the Redis instance. A different database inside the Redis instance can be configured from the destination configuration.
Secure Switch this on to enable secure TLS communication between RudderStack redis client and your redis server
Skip Verify Switch this on to skip the client's verification of the server's certificate chain and host name. In this mode, TLS is susceptible to man-in-the-middle attacks. This should be used only for testing.
CA certificate Certificate which needs to be verified while establishing a secure connection. Skip setting this if Root CA of your server can be verified with any client eg. Elasticache
The identify
call lets you associate the actions to a user and record their traits like name, email, etc.
For more information on the identify
method, please refer to our RudderStack API Specification guide.
RudderStack stores the user traits in the configured Redis instance. You can access the latest user traits by querying Redis for the key user:<user_id>
.
Here is an example of an identify
event with traits from RudderStack JavaScript SDK and how it is stored in Redis.
Nested Properties If your user traits have nested properties, they will be flattened out with .
as the separator.
Custom Prefix If you configure a Redis destination with a prefix rudderstack
, then all the keys will be prefixed in the same manner.
Here's an example of how it works:
One way to enable a TLS endpoint for accessing redis is to run a redis-stunnel
container with a link to the redis
container and exposing the TLS port. More instructions can be found here
Set Common Name to localhost
while generating CA certificate and server certificates
Set the TLS endpoint of the redis-stunnel
container as the address in the RudderStack Redis destination settings. Eg. 127.0.0.1:6380
while running containers locally with defaults. Set the ca.pem
file generated above as the CA certificate in the settings
If you come across any issues while configuring Redis with RudderStack, please feel free to contact us. You can also start a conversation in our Slack community; we will be happy to talk to you!