Skip to content

Commit a8ef748

Browse files
docs(deployment): add Redis notice to Overview (#6375)
Co-authored-by: Hassan Khan <[email protected]>
1 parent be7d40b commit a8ef748

File tree

4 files changed

+42
-106
lines changed

4 files changed

+42
-106
lines changed

docs/content/Configuration/Advanced/Multitenancy.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,6 @@ input.
349349

350350
</WarningBox>
351351

352-
## Connecting to Redis
353-
354-
When configured for multitenancy, Cube uses a separate connection pool for each
355-
configured tenant. This means that the `CUBEJS_REDIS_POOL_MIN` and
356-
`CUBEJS_REDIS_POOL_MAX` environment variables specify the minimum and maximum
357-
number of Redis connections **per-tenant**.
358-
359352
[ref-config]: /config
360353
[ref-config-opts]: /config#options-reference
361354
[ref-config-db]: /config/databases

docs/content/Deployment/Overview.mdx

Lines changed: 40 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ redirect_from:
1010
---
1111

1212
This section contains a general overview of deploying a Cube cluster in
13-
production. You can find platform-specific guides for:
14-
15-
- [Cube Cloud][ref-deploy-cubecloud]
16-
- [Docker][ref-deploy-docker]
13+
production. You can also check platform-specific guides for [Cube
14+
Cloud][ref-deploy-cubecloud] and [Docker][ref-deploy-docker].
1715

1816
If you are moving Cube to production, check out the [Production
1917
Checklist][ref-deploy-prod-list].
2018

21-
As shown in the diagram below, a typical production Cube cluster consists of one
22-
or multiple API instances, a Refresh Worker and a Cube Store cluster.
19+
## Components
20+
21+
As shown in the diagram below, a typical production deployment of Cube includes
22+
the following components:
23+
24+
- One or multiple API instances
25+
- A Refresh Worker
26+
- A Cube Store cluster
2327

2428
<div style="text-align: center">
2529
<img
@@ -42,86 +46,10 @@ also need access to the data schema files.
4246

4347
Cube Store cluster can be configured via environment variables.
4448

45-
Below you can find an example Docker Compose configuration for a Cube cluster:
46-
47-
```yaml
48-
version: '2.2'
49-
50-
services:
51-
cube_api:
52-
image: cubejs/cube
53-
ports:
54-
- 4000:4000
55-
environment:
56-
- CUBEJS_DB_TYPE=bigquery
57-
- CUBEJS_DB_BQ_PROJECT_ID=cubejs-k8s-cluster
58-
- CUBEJS_DB_BQ_CREDENTIALS=<BQ-KEY>
59-
- CUBEJS_DB_EXPORT_BUCKET=cubestore
60-
61-
- CUBEJS_CUBESTORE_HOST=cubestore_router
62-
63-
- CUBEJS_API_SECRET=secret
64-
volumes:
65-
- .:/cube/conf
66-
depends_on:
67-
- cubestore_worker_1
68-
- cubestore_worker_2
69-
- cube_refresh_worker
70-
71-
cube_refresh_worker:
72-
image: cubejs/cube
73-
environment:
74-
- CUBEJS_DB_TYPE=bigquery
75-
- CUBEJS_DB_BQ_PROJECT_ID=cubejs-k8s-cluster
76-
- CUBEJS_DB_BQ_CREDENTIALS=<BQ-KEY>
77-
- CUBEJS_DB_EXPORT_BUCKET=cubestore
78-
79-
- CUBEJS_CUBESTORE_HOST=cubestore_router
80-
81-
- CUBEJS_API_SECRET=secret
82-
83-
- CUBEJS_REFRESH_WORKER=true
84-
volumes:
85-
- .:/cube/conf
49+
You can find an example Docker Compose configuration for a Cube deployment in
50+
the platform-specific guide for [Docker][ref-deploy-docker].
8651

87-
cubestore_router:
88-
image: cubejs/cubestore:latest
89-
environment:
90-
- CUBESTORE_WORKERS=cubestore_worker_1:10001,cubestore_worker_2:10002
91-
- CUBESTORE_REMOTE_DIR=/cube/data
92-
- CUBESTORE_META_PORT=9999
93-
- CUBESTORE_SERVER_NAME=cubestore_router:9999
94-
volumes:
95-
- .cubestore:/cube/data
96-
97-
cubestore_worker_1:
98-
image: cubejs/cubestore:latest
99-
environment:
100-
- CUBESTORE_WORKERS=cubestore_worker_1:10001,cubestore_worker_2:10002
101-
- CUBESTORE_SERVER_NAME=cubestore_worker_1:10001
102-
- CUBESTORE_WORKER_PORT=10001
103-
- CUBESTORE_REMOTE_DIR=/cube/data
104-
- CUBESTORE_META_ADDR=cubestore_router:9999
105-
volumes:
106-
- .cubestore:/cube/data
107-
depends_on:
108-
- cubestore_router
109-
110-
cubestore_worker_2:
111-
image: cubejs/cubestore:latest
112-
environment:
113-
- CUBESTORE_WORKERS=cubestore_worker_1:10001,cubestore_worker_2:10002
114-
- CUBESTORE_SERVER_NAME=cubestore_worker_2:10002
115-
- CUBESTORE_WORKER_PORT=10002
116-
- CUBESTORE_REMOTE_DIR=/cube/data
117-
- CUBESTORE_META_ADDR=cubestore_router:9999
118-
volumes:
119-
- .cubestore:/cube/data
120-
depends_on:
121-
- cubestore_router
122-
```
123-
124-
## API Instance
52+
## API instances
12553

12654
API instances process incoming API requests and query either Cube Store for
12755
pre-aggregated data or connected data sources for raw data. It is possible to
@@ -135,12 +63,12 @@ has access to the data schema files.
13563

13664
## Refresh Worker
13765

138-
A Refresh Worker updates pre-aggregations and invalidates the in-memory cache in the
139-
background. They also keep the refresh keys up-to-date for all defined schemas
140-
and pre-aggregations.
141-
Please note that the in-memory cache is just invalidated but not populated by Refresh Worker.
142-
In-memory cache is populated lazily during querying.
143-
On the other hand, pre-aggregations are eagerly populated and kept up-to-date by Refresh Worker.
66+
A Refresh Worker updates pre-aggregations and invalidates the in-memory cache in
67+
the background. They also keep the refresh keys up-to-date for all defined
68+
schemas and pre-aggregations. Please note that the in-memory cache is just
69+
invalidated but not populated by Refresh Worker. In-memory cache is populated
70+
lazily during querying. On the other hand, pre-aggregations are eagerly
71+
populated and kept up-to-date by Refresh Worker.
14472

14573
[Cube Docker image][dh-cubejs] can be used for creating Refresh Workers; to make
14674
the service act as a Refresh Worker, `CUBEJS_REFRESH_WORKER=true` should be set
@@ -275,6 +203,22 @@ services:
275203
- cubestore_router
276204
```
277205
206+
## Redis
207+
208+
Earlier, [Redis][redis] was used in production deployments as storage
209+
for in-memory cache and query queue. Since version v0.32.0, Cube Store is used
210+
for that purpose. It is still possible to [configure][ref-config-redis] Cube to
211+
use Redis; however, it is strongly not recommended. Please check the [blog
212+
post][blog-details] for details.
213+
214+
<WarningBox>
215+
216+
Redis support is deprecated and will be removed from Cube in the future. Upgrade
217+
to v0.32.0 or later to use Cube Store instead of Redis. See the [migration
218+
guide][blog-migration-guide].
219+
220+
</WarningBox>
221+
278222
[dh-cubejs]: https://hub.docker.com/r/cubejs/cube
279223
[dh-cubestore]: https://hub.docker.com/r/cubejs/cubestore
280224
[gh-cube-examples-k8s]:
@@ -286,3 +230,8 @@ services:
286230
[ref-deploy-docker]: /deployment/platforms/docker
287231
[ref-config-env]: /reference/environment-variables
288232
[ref-config-js]: /config
233+
[redis]: https://redis.io
234+
[ref-config-redis]: /reference/environment-variables#cubejs-redis-password
235+
[blog-details]: https://cube.dev/blog/how-you-win-by-using-cube-store-part-1
236+
[blog-migration-guide]:
237+
https://cube.dev/blog/how-you-win-by-using-cube-store-part-1#how-to-migrate-to-cube-store

docs/content/Deployment/Platform-Cube-Cloud.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ menuTitle: Cube Cloud
44
permalink: /deployment/platforms/cube-cloud
55
category: Deployment
66
subCategory: Platforms
7-
menuOrder: 1
7+
menuOrder: 10
88
---
99

1010
This guide walks you through deploying Cube with [Cube Cloud][link-cube-cloud],

docs/content/Deployment/Platform-Docker.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ menuTitle: Docker
44
permalink: /deployment/platforms/docker
55
category: Deployment
66
subCategory: Platforms
7-
menuOrder: 2
7+
menuOrder: 11
88
---
99

1010
This guide walks you through deploying Cube with Docker.
@@ -207,7 +207,6 @@ services:
207207
- CUBEJS_DB_BQ_CREDENTIALS=<BQ-KEY>
208208
- CUBEJS_DB_EXPORT_BUCKET=cubestore
209209
- CUBEJS_CUBESTORE_HOST=cubestore_router
210-
- CUBEJS_REDIS_URL=redis://redis:6379
211210
- CUBEJS_API_SECRET=secret
212211
- CUBEJS_JWK_URL=https://cognito-idp.<AWS_REGION>.amazonaws.com/<USER_POOL_ID>/.well-known/jwks.json
213212
- CUBEJS_JWT_AUDIENCE=<APPLICATION_URL>
@@ -220,7 +219,6 @@ services:
220219
- cubestore_worker_1
221220
- cubestore_worker_2
222221
- cube_refresh_worker
223-
- redis
224222
```
225223

226224
### <--{"id" : "Security"}--> Securing Cube Store
@@ -274,14 +272,12 @@ services:
274272
- CUBEJS_DB_BQ_CREDENTIALS=<BQ-KEY>
275273
- CUBEJS_DB_EXPORT_BUCKET=cubestore
276274
- CUBEJS_CUBESTORE_HOST=cubestore_router
277-
- CUBEJS_REDIS_URL=redis://redis:6379
278275
- CUBEJS_API_SECRET=secret
279276
volumes:
280277
- .:/cube/conf
281278
depends_on:
282279
- cubestore_router
283280
- cube_refresh_worker
284-
- redis
285281
```
286282
287283
## Extend the Docker image
@@ -337,7 +333,6 @@ services:
337333
- CUBEJS_DB_BQ_CREDENTIALS=<BQ-KEY>
338334
- CUBEJS_DB_EXPORT_BUCKET=cubestore
339335
- CUBEJS_CUBESTORE_HOST=cubestore_router
340-
- CUBEJS_REDIS_URL=redis://redis:6379
341336
- CUBEJS_API_SECRET=secret
342337
volumes:
343338
- .:/cube/conf
@@ -346,7 +341,6 @@ services:
346341
depends_on:
347342
- cubestore_router
348343
- cube_refresh_worker
349-
- redis
350344
```
351345
352346
[medium-letsencrypt-nginx]:

0 commit comments

Comments
 (0)