Skip to content

Commit 746b9e3

Browse files
authored
docs: Remove Redis from docs (#6289)
1 parent 5c44b64 commit 746b9e3

File tree

5 files changed

+5
-166
lines changed

5 files changed

+5
-166
lines changed

docs/content/Caching/Overview.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ menuOrder: 1
1616
</div>
1717

1818
Cube provides a two-level caching system. The first level is **in-memory** cache
19-
and is active by default. Currently, [Redis][link-redis] is being used for
20-
in-memory cache and queue management for [clustered Cube
21-
deployments][ref-production-checklist]. Cube Store will [replace
22-
Redis][replace-redis] in late 2022.
19+
and is active by default.
2320

2421
Cube's [in-memory cache](#in-memory-cache) acts as a buffer for your database
2522
when there's a burst of requests hitting the same data from multiple concurrent

docs/content/Caching/Running-in-Production.mdx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,9 @@ menuOrder: 4
77

88
Cube makes use of two different kinds of cache:
99

10-
- Redis, for in-memory storage of query results
11-
- Cube Store for storing pre-aggregations
10+
- In-memory storage of query results
11+
- Pre-aggregations
1212

13-
In development, Cube uses in-memory storage on the server. In production, we
14-
**strongly** recommend running Redis as a separate service.
15-
16-
<WarningBox>
17-
18-
Cube Store [will replace Redis][replace-redis] for in-memory cache and queue
19-
management in late 2022.
20-
21-
</WarningBox>
2213

2314
Cube Store is enabled by default when running Cube in development mode. In
2415
production, Cube Store **must** run as a separate process. The easiest way to do

docs/content/Deployment/Overview.mdx

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@ production. You can find platform-specific guides for:
1515
- [Cube Cloud][ref-deploy-cubecloud]
1616
- [Docker][ref-deploy-docker]
1717

18-
For information on how to deploy Cube using Kubernetes, please check out the examples for
19-
[Kubernetes][gh-cube-examples-k8s]. You can also check out [Helm Charts](https://artifacthub.io/packages/search?repo=gadsme) from our community members. Please note these examples are community-contributed, and not
20-
officially supported by Cube.
21-
2218
If you are moving Cube to production, check out the [Production
2319
Checklist][ref-deploy-prod-list].
2420

2521
As shown in the diagram below, a typical production Cube cluster consists of one
26-
or multiple API instances, a Refresh Worker, Redis and a Cube Store cluster.
22+
or multiple API instances, a Refresh Worker and a Cube Store cluster.
2723

2824
<div style="text-align: center">
2925
<img
@@ -40,10 +36,6 @@ Worker** builds and refreshes pre-aggregations in the background. **Cube Store**
4036
ingests pre-aggregations built by Refresh Worker and responds to queries from
4137
API instances.
4238

43-
**Redis** is used to manage the queue and query-level cache. Please note, we are
44-
planning to [replace Redis with Cube Store][replace-redis] for in-memory cache
45-
and queue management in late 2022.
46-
4739
API instances and Refresh Worker can be configured via [environment
4840
variables][ref-config-env] or [cube.js configuration file][ref-config-js]. They
4941
also need access to the data schema files.
@@ -68,16 +60,13 @@ services:
6860

6961
- CUBEJS_CUBESTORE_HOST=cubestore_router
7062

71-
- CUBEJS_REDIS_URL=redis://redis:6379
72-
7363
- CUBEJS_API_SECRET=secret
7464
volumes:
7565
- .:/cube/conf
7666
depends_on:
7767
- cubestore_worker_1
7868
- cubestore_worker_2
7969
- cube_refresh_worker
80-
- redis
8170

8271
cube_refresh_worker:
8372
image: cubejs/cube
@@ -89,8 +78,6 @@ services:
8978

9079
- CUBEJS_CUBESTORE_HOST=cubestore_router
9180

92-
- CUBEJS_REDIS_URL=redis://redis:6379
93-
9481
- CUBEJS_API_SECRET=secret
9582

9683
- CUBEJS_REFRESH_WORKER=true
@@ -132,13 +119,6 @@ services:
132119
- .cubestore:/cube/data
133120
depends_on:
134121
- cubestore_router
135-
136-
redis:
137-
image: bitnami/redis:latest
138-
environment:
139-
- ALLOW_EMPTY_PASSWORD=yes
140-
logging:
141-
driver: none
142122
```
143123
144124
## API Instance
@@ -292,63 +272,6 @@ services:
292272
- cubestore_router
293273
```
294274

295-
## Redis
296-
297-
<WarningBox>
298-
299-
Cube Store [will replace Redis][replace-redis] for in-memory cache and queue
300-
management in late 2022.
301-
302-
</WarningBox>
303-
304-
Cube uses Redis, an in-memory data structure store, for query caching and queue.
305-
306-
Set the `CUBEJS_REDIS_URL` environment variable to allow Cube API Instances and
307-
Refresh Worker to connect to Redis. If your Redis instance also has a password,
308-
please set it via the `CUBEJS_REDIS_PASSWORD` environment variable. Set the
309-
`CUBEJS_REDIS_TLS` environment variable to true if you want to enable
310-
SSL-secured connections. Ensure your Redis cluster allows at least 15 concurrent
311-
connections.
312-
313-
### <--{"id" : "Redis"}--> Redis Sentinel
314-
315-
Cube supports Redis Sentinel via `CUBEJS_REDIS_USE_IOREDIS=true` environment
316-
variable. Then set `CUBEJS_REDIS_URL` to the
317-
`redis+sentinel://localhost:26379,otherhost:26479/mymaster/5` to allow Cube to
318-
connect to the Redis Sentinel.
319-
320-
Cube server instances used by same tenant environments should have same Redis
321-
instances. Otherwise they will have different query queues which can lead to
322-
incorrect pre-aggregation states and intermittent data access errors.
323-
324-
### <--{"id" : "Redis"}--> Redis Pool
325-
326-
If `CUBEJS_REDIS_URL` is provided Cube, will create a Redis connection pool with
327-
a minimum of 2 and maximum of 1000 concurrent connections, by default. The
328-
`CUBEJS_REDIS_POOL_MIN` and `CUBEJS_REDIS_POOL_MAX` environment variables can be
329-
used to tweak pool size limits. To disable connection pooling, and instead
330-
create connections on-demand, you can set `CUBEJS_REDIS_POOL_MAX` to 0.
331-
332-
If your maximum concurrent connections limit is too low, you may see
333-
`TimeoutError: ResourceRequest timed out` errors. As a rule of a thumb, you need
334-
to have `Queue Size * Number of tenants` concurrent connections to ensure the
335-
best performance possible. If you use clustered deployments, please make sure
336-
you have enough connections for all Cube server instances. A lower number of
337-
connections still can work, however Redis becomes a performance bottleneck in
338-
this case.
339-
340-
### <--{"id" : "Redis"}--> Running without Redis
341-
342-
If you want to run Cube in production without Redis, you can use
343-
`CUBEJS_CACHE_AND_QUEUE_DRIVER` environment variable to `memory`.
344-
345-
<WarningBox>
346-
347-
Clustered deployments can't be run without Redis as it is used to manage the
348-
query queue.
349-
350-
</WarningBox>
351-
352275
[dh-cubejs]: https://hub.docker.com/r/cubejs/cube
353276
[dh-cubestore]: https://hub.docker.com/r/cubejs/cubestore
354277
[gh-cube-examples-k8s]:

docs/content/Deployment/Production-Checklist.mdx

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ CUBEJS_REFRESH_WORKER=true
4949

5050
## Set up Cube Store
5151

52-
Cube Store is the purpose-built pre-aggregations storage for Cube. Follow the
52+
Cube Store manages in-memory cache, queue and pre-aggregations for Cube. Follow the
5353
[instructions here][ref-caching-cubestore] to set it up.
5454

5555
Depending on your database, Cube may need to "stage" pre-aggregations inside
@@ -69,78 +69,6 @@ configured database][ref-config-connect-db] to set it up.
6969

7070
</InfoBox>
7171

72-
## Set up Redis
73-
74-
<WarningBox>
75-
76-
Cube Store [will replace Redis][replace-redis] for in-memory cache and queue
77-
management in late 2022.
78-
79-
</WarningBox>
80-
81-
Cube requires [Redis](https://redis.io/), an in-memory data structure store, to
82-
run in production.
83-
84-
It uses Redis for query caching and queue. Set the
85-
[`CUBEJS_REDIS_URL`][ref-conf-ref-env-redis-url] environment variable to allow
86-
Cube to connect to Redis. If your Redis instance also has a password, please set
87-
it via the [`CUBEJS_REDIS_PASSWORD`][ref-conf-ref-env-redis-pass] environment
88-
variable. Set the [`CUBEJS_REDIS_TLS`][ref-conf-ref-env-redis-tls] environment
89-
variable to `true` if you want to enable SSL-secured connections. Ensure your
90-
Redis cluster allows at least 15 concurrent connections.
91-
92-
### <--{"id" : "Set up Redis"}--> Redis Sentinel
93-
94-
Redis provides functionality for high availability through [Redis
95-
Sentinel][link-redis-sentinel].
96-
97-
For Redis Sentinel support, the npm package [`ioredis`][gh-ioredis] needs to be
98-
used instead of[`redis`][gh-node-redis]. This is done by setting the
99-
[`CUBEJS_REDIS_USE_IOREDIS`][ref-conf-ref-env-redis-ioredis] environment
100-
variable to `true`. Then set [`CUBEJS_REDIS_URL`][ref-conf-ref-env-redis-url] to
101-
the `redis+sentinel://localhost:26379,otherhost:26479/mymaster/5` to allow Cube
102-
to connect to the Redis Sentinel.
103-
104-
<WarningBox>
105-
106-
Cube server instances used by same tenant environments should have same Redis
107-
instances. Otherwise they will have different query queues which can lead to
108-
incorrect pre-aggregation states and intermittent data access errors.
109-
110-
</WarningBox>
111-
112-
### <--{"id" : "Set up Redis"}--> Redis Pool
113-
114-
If [`CUBEJS_REDIS_URL`][ref-conf-ref-env-redis-url] is provided, Cube will
115-
create a Redis connection pool with a minimum of `2` and maximum of `1000`
116-
concurrent connections, by default. The
117-
[`CUBEJS_REDIS_POOL_MIN`][ref-conf-ref-env-redis-poolmin] and
118-
[`CUBEJS_REDIS_POOL_MAX`][ref-conf-ref-env-redis-poolmax] environment variables
119-
can be used to tweak pool size limits. To disable connection pooling, and
120-
instead create connections on-demand, you can set
121-
[`CUBEJS_REDIS_POOL_MAX`][`cubejs_redis_pool_max`] to `0`.
122-
123-
If your maximum concurrent connections limit is too low, you may see
124-
`TimeoutError: ResourceRequest timed out` errors. As a rule of a thumb, you need
125-
to have `Queue Size * Number of tenants` concurrent connections to ensure the
126-
best performance possible. If you use clustered deployments, please make sure
127-
you have enough connections for all Cube server instances. A lower number of
128-
connections still can work, however Redis becomes a performance bottleneck in
129-
this case.
130-
131-
### <--{"id" : "Set up Redis"}--> Running without Redis
132-
133-
If you want to run Cube in production without Redis, you can use
134-
[`CUBEJS_CACHE_AND_QUEUE_DRIVER`][ref-conf-ref-env-cachequeue-driver]
135-
environment variable to `memory`.
136-
137-
<WarningBox>
138-
139-
Serverless and clustered deployments can't be run without Redis as it is used to
140-
manage the query queue.
141-
142-
</WarningBox>
143-
14472
## Secure the deployment
14573

14674
If you're using JWTs, you can configure Cube to correctly decode them and inject
43.3 KB
Loading

0 commit comments

Comments
 (0)