We want to provide apps access to Redis in Staging, but providing a dedicated ElastiCache instance to each application is problematic for 2 reasons:
- Large financial costs where we would at worst case, double our costs.
- Increased complexity as any outage or problems caused by AWS would cascade onto us (and other classic external dependency problems).
We also cannot use a shared Redis ElastiCache instance across all apps as there is no built-in way to guarantee unique prefix keys for each service in order to avoid collisions between services.
A CodeAmp extension that initializes a Redis deployment that contains a container of the official Redis image within the namespace of the requesting project. In case of instability in any of the redis containers, we may need to manually intervene and restart containers, but this provides us guaranteed isolation between services as well as reducing our cost burden since the container resource requirements are much lighter (100mb, 100 millicpus per pod).
kubernetes:redis:create
, kubernetes:redis:delete
project.slug, project.environment.key
- Redis deployment in <project.slug>-<project.environment.key> Kubernetes namespace
REDIS_DNS
REDIS_PORT