|
1
|
export const metadata = { |
|
2
|
title: `Redis`, |
|
3
|
} |
|
4
|
|
|
5
|
# {metadata.title} |
|
6
|
|
|
7
|
In this guide, you'll learn about the managed Redis service that Medusa provides as part of your project environments on Cloud. |
|
8
|
|
|
9
|
<Note> |
|
10
|
|
|
11
|
The Redis service is only available for Launch, Scale, and Enterprise plans. If you're on the Develop plan, please upgrade to start using Redis in your Cloud projects. |
|
12
|
|
|
13
|
</Note> |
|
14
|
|
|
15
|
## Managed Redis Service on Cloud |
|
16
|
|
|
17
|
Medusa provisions and manages Redis servers for each of your environments on Cloud. |
|
18
|
|
|
19
|
Each project environment has a dedicated Redis server. These Redis servers are entirely isolated from one another, similar to the Postgres databases. |
|
20
|
|
|
21
|
 |
|
22
|
|
|
23
|
--- |
|
24
|
|
|
25
|
## Configured Redis Infrastructure Modules on Cloud |
|
26
|
|
|
27
|
Medusa automatically configures your Medusa application hosted on Cloud to use Redis-based Infrastructure Modules, including: |
|
28
|
|
|
29
|
- [Redis Event Module](!resources!/infrastructure-modules/event/redis) |
|
30
|
- [Redis Caching Module Provider](!resources!/infrastructure-modules/caching/providers/redis) |
|
31
|
- [Redis Locking Module Provider](!resources!/infrastructure-modules/locking/redis) |
|
32
|
- [Redis Workflow Engine Module](!resources!/infrastructure-modules/workflow-engine/redis) |
|
33
|
|
|
34
|
So, you don't need to configure any of these modules and providers or set up Redis manually. |
|
35
|
|
|
36
|
<Note type="warning"> |
|
37
|
|
|
38
|
If you have any of these modules configured in your `medusa-config.ts`, remove them before deploying to Cloud. Keeping them causes configuration conflicts that result in deployment failures or in-memory fallback warnings at runtime. Also remove any `redisUrl` set in `projectConfig`, since Cloud manages Redis provisioning automatically. |
|
39
|
|
|
40
|
Remove these modules entirely instead of registering them conditionally, such as only when a `REDIS_URL` environment variable is set. If the variable is set when Cloud builds your application, the modules register and conflict with the Redis modules that Cloud configures. The deployment then fails, often with empty logs or unclear error messages. |
|
41
|
|
|
42
|
</Note> |
|
43
|
|
|
44
|
<Note> |
|
45
|
|
|
46
|
If you're using a Medusa version before v2.7.0, contact support for assistance in configuring the Redis modules. |
|
47
|
|
|
48
|
</Note> |
|
49
|
|
|
50
|
<Note title="Tip"> |
|
51
|
|
|
52
|
The Caching Module was introduced in [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0) to replace the deprecated Cache Module. |
|
53
|
|
|
54
|
</Note> |
|
55
|
|
|
56
|
### Access Redis Configurations on Cloud |
|
57
|
|
|
58
|
Since Cloud is a managed service, you can't directly access your Redis instance or its configurations. Medusa also doesn't expose the Redis instance connection or configuration details. |
|
59
|
|
|
60
|
### Override Redis Configurations on Cloud |
|
61
|
|
|
62
|
If you need to customize the Redis configurations for any of the Redis modules and providers in your Cloud project, you must host and manage your own Redis instance externally. |
|
63
|
|
|
64
|
Then, configure the modules and providers you're overriding in your `medusa-config.ts` file to connect to your external Redis instance. Refer to the documentation for each module for more details on how to configure it. |
|
65
|
|
|
66
|
<Note title="Tip"> |
|
67
|
|
|
68
|
To set the connection URL of your external Redis instance, refer to the [Manage Environment Variables](../environments/environment-variables/page.mdx) guide to learn how to add environment variables. You can then use these variables in your `medusa-config.ts` file to connect to your Redis instance. |
|
69
|
|
|
70
|
</Note> |