-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add some docs on persistence implementaions
- Loading branch information
Showing
6 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# In-memory persistence | ||
|
||
This persistence stores the data in the RAM of the trino-lb server. | ||
This implies all queued and running queries will be lost when trino-lb is restarted. | ||
Additionally, as multiple trino-lb instances do not share their memory, you can not run multiple trino-lb instances for scalability or availability reasons. | ||
|
||
Because of these restrictions the in-memory persistence is only recommended for testing purpose. | ||
|
||
## Configuration | ||
|
||
The configuration of the in-memory persistence is the most simple, as it does not require any configurations and can be configured as follows: | ||
|
||
```yaml | ||
trinoLb: | ||
persistence: | ||
inMemory: {} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Persistence | ||
|
||
Currently the following persistence implementations are available: | ||
|
||
1. [In-memory](./in-memory.md): Volatile persistence mainly intended for development or testing purposes. | ||
2. [Redis](./redis.md): Uses a [Redis Cluster](https://redis.io/docs/management/scaling/) as a distributed key-value store. | ||
3. [Postgres](./postgres.md): **Experimental**, as performance measurements are missing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Postgres persistence | ||
|
||
## Configuration | ||
|
||
You only need to provide the url the Postgres is available at. | ||
Authentication is supported by providing username and password in the url. | ||
|
||
```yaml | ||
trinoLb: | ||
persistence: | ||
postgres: | ||
url: postgres://trino-lb:[email protected]/trino_lb | ||
maxConnections: 10 # optional, defaults to 10 | ||
``` | ||
## Example installation | ||
The above configuration works with a Postgres installed with the following command: | ||
`helm install postgres bitnami/postgresql --version 13.2.18 --set auth.username=trino-lb,auth.password=trino-lb,auth.database=trino_lb` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Redis persistence | ||
|
||
The Redis persistence currently only supports a [Redis Cluster](https://redis.io/docs/management/scaling/) as a distributed key-value store. | ||
A single-instance Redis server is currently not supported but would be an easy addition. | ||
|
||
The Redis persistence is the most tested implementation and is currently the recommended choice for production systems. | ||
|
||
## Configuration | ||
|
||
You only need to provide the endpoint the Redis cluster is available at. | ||
Authentication is supported by providing the password in the endpoint (the username is set to an empty string). | ||
|
||
The following configuration connects to the Redis cluster running at `trino-lb-redis-cluster.trino-lb.svc.cluster.local` on Port `6379` secured with the password `redis`. | ||
|
||
```yaml | ||
trinoLb: | ||
persistence: | ||
redis: | ||
endpoint: redis://:[email protected]:6379/ | ||
``` |