Redis is a very fast, lightweight, single-threaded key-value store. While it's typically used as an in-memory cache, it's also capable of acting as a persistent data store for your application.

Within the ComputeStacks environment, the default configuration makes a few opinionated decisions on your behalf, however it's easy to create your own custom redis image for your unique situation.

Key Features of the default Redis Configuration

<aside> 👉 In order to use TLS with PHP, you must be using php v7.2+, and phpredis v5.0+.

</aside>

Connecting to Redis

Inside the project

Connecting to redis from an application inside the same project will work just like normal. Simply enter the private IP address of the redis container, add the authentication password, and connect. The port will be the default 6379.

External Connections

Connecting from outside your redis project will require a few additional steps. Depending on your providers setup, you may already have your redis container exposed to the world. To verify that, navigate to your redis service and look at the ingress rules.

You want to see a number under Public Port, and the protocol should be tcp+tls -> tcp. The protocol just means that the global load balancer is performing tls termination for you, and passing the un-encrypted tcp connection back to redis (redis does not natively support tls).

If you don't have a public port, or the protocol does not say tls, you will want to edit the ingress rule and perform the following steps:

  1. Check Enable External Access?
  2. Set the Protocol to TCP+TLS.

View Public Connection Details