Tenant Offloading
Tenants can be offloaded to cold storage to reduce memory and disk usage, and onloaded back when needed.
This page explains how to configure tenant offloading in Weaviate. For information on how to offload and onload tenants, see How-to: manage tenant states.
Tenant offload modules
Section titled “Tenant offload modules”To use tenant offloading in Weaviate, you need enable a relevant offloading module.
offload-s3 module
Section titled “offload-s3 module”The offload-s3 module enables you to offload or onload tenants to/from an S3 bucket.
To use the offload-s3 module, add offload-s3 to the ENABLE_MODULES in your docker-compose file as shown below.
services: weaviate: environment: ENABLE_MODULES: 'offload-s3' # plus other modules you may need OFFLOAD_S3_BUCKET: 'weaviate-offload' # the name of the S3 bucket OFFLOAD_S3_BUCKET_AUTO_CREATE: 'true' # create the bucket if it does not existIf the target S3 bucket does not exist, the OFFLOAD_S3_BUCKET_AUTO_CREATE must be set to true so that Weaviate can create the bucket automatically.
For kubernetes users, enable the relevant offload service in the helm chart values file, and set the necessary environment variables:
# Configure offload providers
offload:
s3:
enabled: true # Set this value to true to enable the offload-s3 module
envconfig:
OFFLOAD_S3_BUCKET: weaviate-offload # the name of the S3 bucket
OFFLOAD_S3_BUCKET_AUTO_CREATE: true # create the bucket if it does not existEnvironment variables
Section titled “Environment variables”The offload-s3 module reads the following environment variables:
| Env Var | Description | Default Value |
|---|---|---|
OFFLOAD_S3_BUCKET |
The destination S3 bucket to offload tenants. | weaviate-offload |
OFFLOAD_S3_BUCKET_AUTO_CREATE |
When true, Weaviate automatically creates an S3 bucket if it does not exist. |
false |
OFFLOAD_S3_CONCURRENCY |
The number of concurrent offload operations. | 25 |
OFFLOAD_TIMEOUT |
The timeout for offloading operations (create bucket, upload, download). | 120 (in seconds) |
AWS permissions
Section titled “AWS permissions”You must provide Weaviate with AWS authentication details. You can choose between access-key or ARN-based authentication:
Option 1: With IAM and ARN roles
Section titled “Option 1: With IAM and ARN roles”The backup module will first try to authenticate itself using AWS IAM. If the authentication fails then it will try to authenticate with Option 2.
Option 2: With access key and secret access key
Section titled “Option 2: With access key and secret access key”| Environment variable | Description |
|---|---|
AWS_ACCESS_KEY_ID |
The id of the AWS access key for the desired account. |
AWS_SECRET_ACCESS_KEY |
The secret AWS access key for the desired account. |
AWS_REGION |
(Optional) The AWS Region. If not provided, the module will try to parse AWS_DEFAULT_REGION. |
Related pages
Section titled “Related pages”Questions and feedback
Section titled “Questions and feedback”Have a question or feedback? Here's how to reach us.