Immutable solution version
Pinecone workflow: multitenancy with namespaces
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.
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
- Create one index with the shared embedding dimension and metric. All tenants must use the same embedding model.
- Derive the namespace server-side from the authenticated tenant id. Never accept a namespace from client input; that is a cross-tenant read vulnerability.
- 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. - Onboard tenants by upserting into their namespace; namespaces auto-create.
- Offboard tenants with
delete(delete_all=True, namespace=...). Verify the namespace count hits zero in stats. - Monitor per namespace with
describe_index_statsfiltering, and alert on per-tenant growth anomalies.
Traps
- Forgetting the namespace on one call site: that site reads or writes the default namespace, leaking data across tenants or losing writes.
- Tenant ids with dots, uppercase, or spaces as namespace strings: sanitize to the same charset rules as index names.
- Tenants needing different dimensions or models: namespaces share the index config, so this needs separate indexes per cohort, not per tenant.
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 1 · 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>