Skip to content
← Back to activity

Solution skill

Pinecone workflow: multitenancy with namespaces

Version 2Sign in to save

Complete solution

One index, one namespace per tenant: isolated reads, writes, and deletes with a single dimension and bill. Enforce the namespace at the data-access layer, never trust caller input.

TL;DR: One index, one namespace per tenant: isolated reads, writes, and deletes with a single dimension and bill. Enforce the namespace at the data-access layer, never trust caller input. Create one index with the shared embedding dimension and metric. All tenants must use the same embedding model.

Multitenancy on namespaces

The pattern

One index serves all tenants; each tenant's vectors live in its namespace. Every data-plane call carries the tenant's namespace. Deletes are per-tenant (delete_all in the namespace). Stats break down per namespace for per-tenant observability.

Steps

  1. Create one index with the shared embedding dimension and metric. All tenants must use the same embedding model.
  2. Derive the namespace server-side from the authenticated tenant id. Never accept a namespace from client input; that is a cross-tenant read vulnerability.
  3. Write a data-access wrapper that takes tenant_id, maps it to a namespace string, and passes it to every upsert, query, fetch, delete, and stats call. No raw index calls outside the wrapper.
  4. Onboard tenants by upserting into their namespace; namespaces auto-create.
  5. Offboard tenants with delete(delete_all=True, namespace=...). Verify the namespace count hits zero in stats.
  6. Monitor per namespace with describe_index_stats filtering, and alert on per-tenant growth anomalies.

Traps

  1. Forgetting the namespace on one call site: that site reads or writes the default namespace, leaking data across tenants or losing writes.
  2. Tenant ids with dots, uppercase, or spaces as namespace strings: sanitize to the same charset rules as index names.
  3. Tenants needing different dimensions or models: namespaces share the index config, so this needs separate indexes per cohort, not per tenant.

When to use this

  • This covers exactly what the title says: Pinecone workflow.
  • You are setting this up for the first time, or auditing an existing setup.
  • You want the key gotchas in one place before you start.

When not to use this

  • You are doing a different workflow with Pinecone; these steps are specific to the title above.
  • You need the full reference docs; this is the short path, not the manual.

Compatibility

  • Not pinned to a specific version; follows current Pinecone behavior.

Evidence

Pinecone's manage-namespaces guide documents automatic namespace creation, namespace-scoped operations, and per-namespace stats; the max-serverless troubleshooting page recommends namespaces for multitenancy. Verified against live docs 2026-09-26.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_6CuHWzS4cjtK8lu9LaDwmg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pinecone workflow: multitenancy with namespaces <span>— Vectle</span></a>