Configuration

turbopuffer is configured through the Helm values in your kit's values.yaml, which render to a ConfigMap in the turbopuffer namespace. This page covers how to apply changes and the settings you can change. The turbopuffer team can also propose changes through the control plane, such as tuning cache sizes, LSM settings, or recall.

Applying configuration changes

In Managed BYOC, turbopuffer applies configuration changes for you. Ask us in your shared Slack channel.

To apply a change, edit values.yaml at the kit root and run:

helm upgrade -n default turbopuffer \
  oci://us-central1-docker.pkg.dev/turbopuffer-onprem/charts/tpuf \
  --values=values.yaml \
  --values=values.secret.yaml \
  --values=metrics-keys.yaml

You may need to log in to the Helm registry first:

helm registry login us-central1-docker.pkg.dev

Bucket per customer

If you serve your own customers from one BYOC cluster, you can store each customer's data in its own bucket, often called bring your own bucket (BYOB). Give each customer its own organization, then map the org to a dedicated bucket with blob.bucket_overrides_by_org_id. Each bucket can have its own bucket policies, lifecycle rules, and encryption key, and can live in the customer's own cloud account. Orgs without an override use the cluster's default bucket.

Existing data is not migrated. Configure the override before the org writes any data, or contact us on Slack to migrate existing data first.

The bucket can live in a different GCP project than the turbopuffer cluster. Grant the cluster's service account roles/storage.objectAdmin on the bucket.

blob:
  bucket_overrides_by_org_id:  # org ID -> bucket ID
    "m3vjrpgnvlcm5x8olkguh1l2": customer-b-bucket
  buckets:
    customer-b-bucket:
      bucket_url: "https://customer-b-turbopuffer.storage.googleapis.com"
      provider: gcp-workload-identity

Customer managed encryption keys (CMEK)

Namespaces can be encrypted with a customer managed key. In BYOC the cluster's own identity accesses the key, so there is no turbopuffer service account to grant.

  1. Create a symmetric Cloud KMS key in the same region as the bucket.

  2. Grant roles/cloudkms.cryptoKeyEncrypterDecrypter on the key to the Cloud Storage service agent of the project that owns the bucket. Cloud Storage encrypts and decrypts objects with this service agent, not with the cluster's service account.

    # Prints the service agent email, e.g. service-123456789012@gs-project-accounts.iam.gserviceaccount.com
    SERVICE_AGENT=$(gcloud storage service-agent --project BUCKET_PROJECT_ID)
    
    gcloud kms keys add-iam-policy-binding KEY --keyring KEYRING --location REGION \
      --member "serviceAccount:$SERVICE_AGENT" \
      --role roles/cloudkms.cryptoKeyEncrypterDecrypter
    
  3. Set blob.cmek_enabled to true and apply the configuration change. The flag is per bucket. If the org's data lives in a bucket under blob.buckets (see bucket per customer), set it on that entry, since entries do not inherit the top-level value:

    blob:
      cmek_enabled: true  # default bucket
      buckets:
        customer-b-bucket:
          bucket_url: "https://customer-b-turbopuffer.storage.googleapis.com"
          provider: gcp-workload-identity
          cmek_enabled: true  # required for orgs mapped to this bucket
    
  4. Write with encryption set to the key resource name.

Restricting upgrades to a maintenance window

By default, the control plane applies new turbopuffer versions as soon as they're available. If you'd rather upgrades land only during predictable off-hours, configure a maintenance_window. Only upgrades are gated by the window — routine operations (restarting pods, scaling, reindex, compaction, gc) still run whenever they're needed.

Add the window to your Helm values.yaml:

control_plane:
  additional_config:
    maintenance_window:
      schedule: "0 2 * * *"  # 5-field cron in UTC: opens every day at 02:00
      duration: "8h"         # how long the window stays open (default: "8h")
  • schedule is a standard 5-field cron expression evaluated in UTC, and defines when each window opens.
  • duration is how long the window stays open after each trigger. It accepts compound values such as 4h, 30m, or 10h5m, and defaults to 8h. The example above keeps the window open every day from 02:00 to 10:00 UTC.

When an upgrade becomes available outside the window, the control plane holds it rather than applying it immediately. The operation waits in the AWAITING_MAINTENANCE_WINDOW state — annotated with the next window's start and end — and is applied automatically the next time the window opens:

$ kubectl get turbopufferoperations -n turbopuffer --sort-by=.metadata.creationTimestamp
NAME               APPROVED   STATE                         AGE   DETAILS
qjh4uts8557qxly3   true       AWAITING_MAINTENANCE_WINDOW   3m    Upgrade to 46bea73f769ed2e4...

The window doesn't apply to upgrades configured for external execution, since your own tooling controls when those roll out. If an upgrade also requires manual approval, the window applies after you approve it.

Helm values

These settings go at the top level of your values.yaml.

Kubernetes

The following configuration settings are under kubernetes:

The preferred availability zone to be used for query and index nodes.

example
kubernetes: preferred_zone: query: "us-central1-a" index: "us-central1-a"

Additional labels to be applied to the node pools.

example
kubernetes: nodepool_labels: yourcorp-billing-code: xyz

To set up namespace pinning, see BYOC Pinning.

Ingress and TLS

The following are configuration settings under ingress:

If true, the turbopuffer ingress will be exposed on an internal IP.

example
ingress: internal: false

Configures how certificates will be handled in the cluster.

  • manual - if using, you must also set manual.secretName: to the name of the secret containing the TLS cert
  • disabled - needed if using Google Managed Certificates or if you wish to not use TLS
  • letsencrypt
  • aws - use an AWS managed certificate. You must also set aws.certificate_arn:
example
ingress: certificates: mode: 'letsencrypt'

turbopuffer settings

These settings go under tpuf_config in your values.yaml.

Authentication

A mapping of org IDs to API key hashes. Each hash must be a 44-character base64-encoded SHA-256 digest.

See Org Configuration for details on generating org IDs and API keys.

A bare hash is an admin key for its organization. To restrict a key, use an object with sha256 and roles, a list of admin, write, read, and list. For example, ["read", "list"] makes a read-only key. To partition your data securely we recommend creating multiple organizations.

example
tpuf_config: authentication: allowed_api_keys_sha256: "5x8olkguh1l2jvtjrpgnvlcm": # Org ID (24 chars, lowercase alphanumeric) - "IaG0JUcIiCXKwqhIWH8Qr0incF2xsbRZRRJJxznl0GM=" # base64(sha256("tpuf_...")), admin - sha256: "K7gNU3sdo+OL0wNhqoVWhr3g6s1xYv72ol/pe/Unols=" roles: ["read", "list"] # read-only

When true, the service loads an additional settings overlay from your blob bucket (S3/GCS) at the path system/settings/default.yaml. This lets you change settings (e.g. add orgs or API keys) by updating that file in object storage without redeploying the ConfigMap. The file is re-fetched on an interval controlled by dynamic_poll_remote_ms (milliseconds). Only settings that are "dynamic" (e.g. authentication.allowed_api_keys_sha256) are applied on each reload without a restart.

example
tpuf_config: remote_settings_overrides: true dynamic_poll_remote_ms: 300000 # optional; re-fetch remote overlay every 5 minutes

Query and write limits

Maximum concurrent queries to a single namespace allowed. This protects the node against a single namespace being overloaded. 429s will be returned from queries if there is not enough capacity to handle them.

Override keys in query_concurrency_overrides are one of org_id, org_id:namespace, or org_id:prefix*. The most specific match wins: exact namespace, then longest matching prefix glob, then the org-wide key, then the default.

example
tpuf_config: fairness: query_concurrency_per_namespace: 16 # default query_concurrency_overrides: "5x8olkguh1l2jvtjrpgnvlcm": 32 # all namespaces in the org "5x8olkguh1l2jvtjrpgnvlcm:my_namespace": 64 # a single namespace "5x8olkguh1l2jvtjrpgnvlcm:prod.*": 48 # namespaces prefixed with prod.

Maximum milliseconds to wait if the query concurrency limit is reached.

example
tpuf_config: fairness: query_bulkhead_wait_ms: 800 # default

Maximum concurrent writes that read existing data (conditional writes and patches) to a single namespace. These writes run a query before writing, so a burst of them can saturate a node's CPU. 0, the default, disables the limit. 429s are returned to writes that can't get capacity within fairness.write_with_reads_bulkhead_wait_ms. You can also configure the limit at the organization level.

example
tpuf_config: fairness: write_with_reads_concurrency_per_namespace: 0 # default, unlimited write_with_reads_concurrency_overrides: "5x8olkguh1l2jvtjrpgnvlcm": 8 # org id

Maximum milliseconds to wait if the write-with-reads concurrency limit is reached.

example
tpuf_config: fairness: write_with_reads_bulkhead_wait_ms: 0 # default

Maximum number of documents that can be requested in a single query via the limit.total parameter.

example
tpuf_config: search: max_topk: 10000 # default

Caching and read scaling

A set of org_ids to keep warm in cache. On node startup, machines will prewarm namespaces for these orgs to ensure their cache is hot.

Not recommended for most users.

example
tpuf_config: cache: prewarm: keep_warm_orgs: - '<premium-users-org>' - '<no-cold-starts-pls-org>'

The absolute number of bytes or percentage of local SSD capacity to use as a cache.

Changing this setting is not recommended for most users.

example
tpuf_config: cache: disk_budget_bytes: 0.95 # default, leaves headroom for the filesystem

Configures additional query replicas for specific (org, namespace) pairs. By default a namespace is served by a single query replica. Configuring read replicas spreads query load across more nodes, which is useful for read-heavy or high-QPS namespaces.

The namespace field supports glob wildcards (*, ?). The first matching entry wins if multiple patterns match the same namespace.

example
tpuf_config: ingress: read_replicas: # Spread load for a high-QPS namespace across 4 replicas. - org_id: "5x8olkguh1l2jvtjrpgnvlcm" namespace: "high-qps-namespace" count: 4 # Glob patterns match many namespaces with a single entry. - org_id: "5x8olkguh1l2jvtjrpgnvlcm" namespace: "prod.shard-*" count: 2

Indexing

Number of cache fills to allow concurrently in the background per node. These are fired after a cold query.

We prioritize cache fills for more important files (i.e. to get faster queries sooner), e.g. centroids.

example
tpuf_config: indexing: cache_fill_concurrency: 2 # default

The maximum number of unindexed bytes allowed in the WAL before a reindex is triggered.

example
tpuf_config: indexing: reindex_unindexed_bytes_max: 64000000 # default

The maximum number of rows we'll allow to remain unindexed. If the namespace has at least this many unindexed rows, a /index call will always trigger an index operation.

example
tpuf_config: indexing: reindex_unindexed_rows_max: 50000 # default

The maximum number of unindexed WAL entries allowed before a reindex is triggered.

example
tpuf_config: indexing: reindex_unindexed_wal_entries: 512 # default

During indexing, the number of document bytes to process at a given time before flushing. An indexing run can be composed of multiple batches, where we flush our progress incrementally after each batch.

example
tpuf_config: indexing: batch_size_bytes: 1250000000 # 1.25 GB, default

Object storage

The maximum number of concurrent requests in flight to object storage at one given time.

example
tpuf_config: blob: max_concurrent_requests: 4000 # default

Maps org IDs to dedicated buckets. Each listed org's data is stored in the mapped bucket instead of the default bucket. Useful for isolating an organization's data at the object storage level, e.g. separate bucket policies, lifecycle rules, or encryption keys.

Bucket IDs refer to entries defined under blob.buckets. A bucket entry accepts the same fields as the top-level blob configuration (e.g. bucket_url, provider, prefix, cmek_enabled). Orgs not listed here use the default bucket.

See Org Configuration for details on creating organizations.

Note: Existing data is not migrated. Configure the override before the org writes any data, or contact us on Slack to migrate existing data first.

example
tpuf_config: blob: bucket_overrides_by_org_id: "5x8olkguh1l2jvtjrpgnvlcm": isolated # org ID -> bucket ID buckets: isolated: bucket_url: "https://my-isolated-bucket.s3.us-east-1.amazonaws.com" provider: aws-irsa: region: us-east-1

Allows namespaces in this bucket to be written with a customer managed encryption key. Defaults to false, in which case writes with a CMEK key fail. The cluster's identity must be granted access to the key, see enabling CMEK.

Set it at the top level for the default bucket. Buckets listed under blob.buckets do not inherit it and need their own cmek_enabled.

example
tpuf_config: blob: cmek_enabled: true # default bucket buckets: isolated: bucket_url: "https://my-isolated-bucket.s3.us-east-1.amazonaws.com" provider: aws-irsa: region: us-east-1 cmek_enabled: true # set per bucket entry

Maps source region names to bucket IDs for copy_from_namespace. Bucket IDs refer to entries under blob.buckets. The request's source_region selects a bucket from this map without changing the bucket used for ordinary requests.

Region names can be names you choose, including when both buckets are in the same cloud region. Set enable_maintenance: false and read_only: true on source bucket entries. See Copying namespaces across clusters for authentication and request details.

example
tpuf_config: blob: buckets: source-bucket: bucket_url: "https://source-turbopuffer.s3.us-east-1.amazonaws.com" provider: aws-irsa: region: us-east-1 enable_maintenance: false read_only: true known_region_buckets: source-cluster: source-bucket

Whether this cluster includes an additional bucket in automatic maintenance sweeps, such as garbage collection. Defaults to true. For a bucket managed by another cluster, set to false so the owning cluster remains responsible for maintenance. Leave maintenance enabled on the source cluster.

example
tpuf_config: blob: buckets: source-bucket: bucket_url: "https://source-turbopuffer.s3.us-east-1.amazonaws.com" provider: aws-irsa: region: us-east-1 enable_maintenance: false

Whether this cluster rejects writes to a bucket. Defaults to false. When true, reads are allowed, but writes and deletes are rejected. Set to true on buckets used only as copy sources. This does not change access from the cluster that owns the bucket.

example
tpuf_config: blob: buckets: source-bucket: bucket_url: "https://source-turbopuffer.s3.us-east-1.amazonaws.com" provider: aws-irsa: region: us-east-1 read_only: true

Overrides the Azure tenant used to authenticate against a bucket. Defaults to the cluster's own tenant. Useful for storing data in storage accounts across multiple Azure tenants. The cluster's workload identity must be granted access to the storage account in the target tenant.

example
tpuf_config: blob: buckets: partner: bucket_url: "https://partneraccount.blob.core.windows.net/partner-container" provider: azure-workload-identity azure_tenant_id: "00000000-0000-0000-0000-000000000000"

Overrides the Azure client ID used to authenticate against a bucket. Defaults to the client ID annotated on the cluster's service account. Useful for accessing a bucket with a dedicated identity.

example
tpuf_config: blob: buckets: partner: bucket_url: "https://partneraccount.blob.core.windows.net/partner-container" provider: azure-workload-identity azure_tenant_id: "00000000-0000-0000-0000-000000000000" azure_client_id: "00000000-0000-0000-0000-000000000000"

The amount of time data can live in the LSM tree before being force-compacted.

This setting serves two purposes:

  • Compaction speeds up queries. By compacting more frequently, queries will be more efficient.
  • For compliance, i.e. if a customer requires that deletes (via the API) are properly deleted within X days, setting this to a value < X days will ensure that the index doesn't still contain any residual data from the deleted documents.
example
tpuf_config: storage: lsm_ttl_seconds: 1728000 # 20 days, default

Observability

The OTLP endpoint to emit traces to, if any. Should end with /v1/traces. If empty, traces won't be emitted.

example
tpuf_config: tracing: otlp_endpoint: "http://localhost:4318/v1/traces"

A statsd endpoint to emit metrics to.

If present, all three subfields are required.

example
tpuf_config: stats_export: prefix: "foocorp.turbopuffer" # do not include trailing dot host: "foocorp-statsd" port: 8125