Skip to main content

Build

Qdrant Multitenancy

Qdrant SkillsOfficialCertified

Guides tenant isolation architecture in Qdrant for multi-tenant or multi-user applications. Use when someone asks 'how to isolate customer data', 'how to build multi-tenant search/RAG', 'how many collections should I create', 'how to partition tenants by payload', 'a customer's data legally has to stay in a certain country or region'. Also use when they describe a symptom: one customer's data is way bigger than the rest and slowing everyone down, or one tenant is hogging resources.

  • New
  • v1.0.4
  • Reviewed Jul 20
  • No reviews yet

Getting started

Full instructions

Install the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.

Instructions: SKILL.mdv1.0.4

Qdrant Multitenancy

Multitenancy is how you isolate data across multiple users or tenants within a single Qdrant deployment.

  • The question to ask is: how many tenants, and how unevenly sized are they? That answer picks the isolation strategy.
  • Understand the three isolation levels before choosing: payload-based, shard-based and collection-based.
  • For almost everyone the right default is a single collection partitioned by payload, NOT a collection per tenant.

Many Small Tenants (Default: Payload Partitioning)

Use when: you have many tenants of roughly similar, modest size. This is the recommended default for most users.

How It Works

  • Create a keyword payload index on the tenant field with is_tenant=true (v1.11+), so each tenant's points are stored together and read sequentially Partition by payload.
  • Filter every query with a must condition on the tenant field. Without it, a query searches every tenant's data.
  • Text relevance (BM25 or sparse vectors with the IDF modifier) is scored with statistics computed over the whole shard, so tenants with different vocabularies distort each other's scores. On Qdrant 1.19 or newer, pass the idf search parameter with the tenant filter and index the tenant field; on 1.20 or newer this covers BM25 text queries on a full-text index too Per-tenant scoring statistics.
  • Every tenant indexes into the same collection, so indexing can become a bottleneck at scale. Build per-tenant HNSW graphs instead of a global one: set payload_m to a non-zero value explicitly (it defaults to m), then set m=0. Queries without a tenant filter get slower, so only make this trade if you hit the bottleneck and cross-tenant search is rare Calibrate performance.

A Few Large Tenants Plus a Long Tail (Tiered Multitenancy)

Use when: you have a realistic SaaS distribution: a few large customers and many small ones, possibly with small tenants that grow over time. Available in v1.16+. It avoids the noisy-neighbor problem, where one big tenant forces the whole cluster to scale, raising costs and degrading performance for everyone else.

Small tenants share a fallback shard and large tenants get dedicated shards, all in one collection. A tenant that outgrows the fallback shard can be promoted to a dedicated shard later with no downtime.

How It Works

  • Create the collection with custom sharding and shard_number: 1, add a fallback shard for the small tenants, and keep the is_tenant payload index from payload partitioning Configure tiered multitenancy.
  • Promote a tenant to a dedicated shard once it approaches the indexing threshold, about 20,000 points. Qdrant moves its data with a shard transfer and keeps serving reads and writes Promote tenant to dedicated shard.
  • Set payload_m to a non-zero value and m=0 when creating the collection, if tenant queries are always filtered. Dedicated shards already give large tenants their own graphs, but without this the fallback shard keeps one global graph shared by every small tenant, and continuous writes keep rebuilding it. Set it up front because changing m later forces a reindex. Queries without a tenant filter get slower Calibrate performance.
  • Keep in mind that re-sharding can be an expensive and time-consuming process, so consider your tenant growth patterns carefully when deciding which tenants should receive dedicated shards.
  • It's not recommended to exceed ~1000 dedicated shards per cluster (resource overhead).
  • The fallback shard (small tenants) must fit on a single node.
  • Sharding method is fixed at collection creation: an auto-sharded collection (default) cannot be converted to custom sharding in place. If there is any realistic chance you will need to isolate a large tenant later, create the collection with custom sharding up front and put every tenant in the fallback shard. Switching an existing auto-sharded collection requires creating a new collection and migrating data.

Few Non-Homogenous Tenants (Collection per Tenant)

Use when: you have a limited number of tenants with different per-tenant embedding models or collection schemas.

  • You should only create multiple collections when you have a limited number of tenants that need strict isolation, or when tenants' vectors are created by different embedding models.

Data Residency and Geographic Isolation (Custom Sharding)

Use when: data must be physically pinned to a location, e.g. regional compliance for healthcare industry (one region's data in Canada, another's in Germany). This is not only a tenant concern, a single tenant may also need to separate its own data by region.

  • Like tiered multitenancy, this uses custom sharding; the difference is what you shard by. Here the shard key is a region. Each key's data lands on specific shards you can place in specific locations, while everything stays in one collection. Combine it with payload partitioning if you also need per-tenant isolation within a region. Check User-defined sharding for setup.
  • Geographic residency follows only if your cluster's nodes are actually in the target regions.
  • Qdrant Cloud deploys a cluster in a single region and has no managed multi-region today.

What NOT to Do

  • Treat a payload filter as your whole security model. In Qdrant, (unless you're using per-tenant collections), tenant isolation is payload-based. It is an application-layer responsibility, and the filter is only one small part of it.
  • Set m=0 when your application also runs queries without a tenant filter (admin search, cross-tenant analytics), since those lose the global graph and get slower. Don't switch m on a live collection either: it drops the existing graph and forces a full reindex.
  • Recommend collection-per-tenant for thousands of tenants: per-collection overhead (memory, open file handles, cluster state) does not scale, while payload partitioning or tiered multitenancy does.

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from Qdrant Skills

View source →
qdrant-sliding-time-windowGuides sliding time window scaling in Qdrant. Use when someone asks 'only recent data matters', 'how to expire old vectors', 'time-based data rotation', 'delete old data efficiently', 'social media feed search', 'news search', 'log search…0 installsqdrant-advisorDiagnose, troubleshoot, and advise on any Qdrant deployment by loading the latest official Qdrant skills live from skills.qdrant.tech. Use this whenever someone raises a Qdrant problem or question — slow or degraded search, high or growing…0 installsqdrant-minimize-latencyGuides Qdrant query latency optimization. Use when someone asks 'search is slow', 'how to reduce latency', 'p99 is too high', 'tail latency', 'single query too slow', 'how to make search faster', or 'latency spikes'.0 installsqdrant-model-migrationGuides embedding model migration in Qdrant without downtime. Use when someone asks 'how to switch embedding models', 'how to migrate vectors', 'how to update to a new model', 'zero-downtime model change', 'how to re-embed my data', or 'can…0 installsqdrant-memory-usage-optimizationDiagnoses and reduces Qdrant memory usage. Use when someone reports 'memory too high', 'RAM keeps growing', 'node crashed', 'out of memory', 'memory leak', or asks 'why is memory usage so high?', 'how to reduce RAM?'. Also use when memory…0 installsqdrant-tenant-scalingGuides Qdrant multi-tenant scaling. Use when someone asks 'how to scale tenants', 'one collection per tenant?', 'tenant isolation', 'dedicated shards', or reports tenant performance issues. Also use when multi-tenant workloads outgrow…0 installs

Frequently asked questions about qdrant-multitenancy

What does the qdrant-multitenancy skill do?

Guides tenant isolation architecture in Qdrant for multi-tenant or multi-user applications. Use when someone asks 'how to isolate customer data', 'how to build multi-tenant search/RAG', 'how many collections should I create', 'how to partition tenants by payload', 'a customer's data legally has to stay in a certain country or region'. Also use when they describe a symptom: one customer's data is way bigger than the rest and slowing everyone down, or one tenant is hogging resources. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the qdrant-multitenancy skill?

Run `npx @skills-hub-ai/cli install qdrant-multitenancy` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/qdrant-multitenancy/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does qdrant-multitenancy work with?

qdrant-multitenancy runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the qdrant-multitenancy skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use qdrant-multitenancy after installing it?

In Claude Code, type `/qdrant-multitenancy` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the qdrant-multitenancy skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/qdrant-multitenancy)](https://skills-hub.ai/skills/qdrant-multitenancy)
HTML
<a href="https://skills-hub.ai/skills/qdrant-multitenancy"><img src="https://skills-hub.ai/api/badges/skill/qdrant-multitenancy" alt="Install on Skills Hub"></a>

More options in the badge docs.