This page describes strategies to implement multitenancy in Pinecone indexes. Multitenancy describes the act of keeping sets of vectors separate within a Pinecone index (e.g., segmenting vectors by customer, physically or logically).

For more information about indexes, see Understanding indexes.

Namespaces

One approach to multitenancy is to use namespaces to isolate segments of vectors within a single index. This is a ‘pool’ model that shares most resources between tenants while keeping them logically separate.

Advantages

  • Namespaces reduce the need for additional indexes, reducing maintenance effort.

Disadvantages

  • Tenants share compute and storage resources.
  • Deleting tenant data is complicated and takes more time.

Metadata filtering

This approach to multitenancy stores all segments of vectors in a single index and filters by metadata at query time. This is another ‘pool’ model; here, you separate tenants at the query level.

Advantages

  • Metadata filtering allows you to query across multiple tenants.
  • Metadata filtering reduces the need for additional indexes, reducing maintenance effort.

Disadvantages

  • Tenants share compute and storage resources.
  • There is no way to track tenant-specific costs.
  • You cannot provision tenants with different dimensions, since dimensionality is set at the index level.

Separate indexes

Another approach to multitenancy is to create a separate index for each segment. This is a ‘silo’ model that provides dedicated resources to each tenant. For example, if you need to separate vectors for each customer, you can create a separate index for each customer.

Advantages

  • This model separates tenants physically, preventing queries across tenants and allocating compute and storage
    resources to each tenant.

Disadvantages

  • Creating and maintaining multiple indexes requires additional effort and cost.
  • This model doesn’t share resources between tenants, which is inefficient if you have tenants
    represented by a small number of vectors.
  • Creating a new index takes more time than creating a namespace.

Next Steps

See our learning center for more information on multitenancy.

Was this page helpful?