MCP HubMCP Hub
SKILL·46DC04

qdrant-multitenancy

qdrant
Mis à jour 3 days ago
208
23
208
Voir sur GitHub
Métaaiapidesigndata

À propos

Cette compétence fournit des conseils architecturaux pour la mise en œuvre de l'isolation des locataires dans les bases de données vectorielles Qdrant. Elle aide les développeurs à choisir entre des stratégies d'isolation basées sur les *payloads*, les fragments (*shards*) ou les collections, en fonction du nombre de locataires et de la distribution de la taille des données. Utilisez-la lors de la conception de systèmes de recherche/RAG multi-locataires ou pour résoudre les problèmes de performance liés à une répartition inégale des données entre locataires.

Installation rapide

Claude Code

Recommandé
Principal
npx skills add qdrant/skills -a claude-code
Commande PluginAlternatif
/plugin add https://github.com/qdrant/skills
Git CloneAlternatif
git clone https://github.com/qdrant/skills.git ~/.claude/skills/qdrant-multitenancy

Copiez et collez cette commande dans Claude Code pour installer cette compétence

Documentation

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.

One collection holds every tenant. A payload field marks ownership, and a filter on that field at query time is what isolates each tenant's results.

How It Works

  • Create a keyword payload index on the tenant field with is_tenant=true (the flag requires v1.11+). is_tenant tells Qdrant the field identifies tenants, so each tenant's vectors are stored together and served by sequential reads. Check .
  • At query time, isolate each tenant with a must filter on the tenant field. Without it, a query searches every tenant's data. Check Payload-based multitenancy.
  • With this strategy, the indexing speed might become a bottleneck at scale because every tenant indexes into the same collection. To avoid this, you can disable the global HNSW creation (for the entire collection) and only build per-tenant indexes: set m=0 and payload_m to a non-zero value. Although this accelerates the indexing process, keep in mind that requests without a tenant filter will become slower as they must scan all groups. 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.

Tiered multitenancy keeps small tenants together in a shared fallback shard while isolating large tenants in their own dedicated shards, all in one collection. It layers two isolation levels: payload-based tenancy for logical isolation, and custom sharding for physical/ resource-based isolation of the large tenants. A tenant that outgrows the shared shard can be promoted to a dedicated shard later with no downtime.

How It Works

  • Create the collection with custom (user-defined) sharding, and configure payload-based tenancy. A single shared fallback shard holds all the small tenants. If you have large tenants, create dedicated shards (one per tenant). Check Tiered multitenancy.
  • When to promote a tenant? If a tenant becomes large enough to warrant dedicated resources (a reasonable promotion trigger is when a tenant approaches the indexing threshold), promote it to a dedicated shard. Qdrant moves its data into a new shard transparently, serving reads and writes throughout. Check how to promote tenant to dedicated shard.
  • 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.

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 your data is not homogenous or if users' 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.

Dépôt GitHub

qdrant/skills
Chemin: skills/qdrant-multitenancy
0
agent-skillsai-agentsclaude-codecodexcursorembeddings
FAQ

Questions fréquentes

Qu’est-ce que le Skill qdrant-multitenancy ?

qdrant-multitenancy est un Skill Claude créé par qdrant. Un Skill regroupe des instructions et des ressources que Claude charge à la demande pour effectuer des tâches liées à qdrant-multitenancy sans consigne supplémentaire.

Comment installer qdrant-multitenancy ?

Utilisez les commandes d’installation de cette page : ajoutez qdrant-multitenancy à Claude Code comme plugin ou clonez son dépôt dans votre dossier skills, puis redémarrez Claude pour charger le Skill.

À quelle catégorie appartient qdrant-multitenancy ?

qdrant-multitenancy appartient à la catégorie Méta.

qdrant-multitenancy est-il gratuit ?

Oui. qdrant-multitenancy est référencé sur AIMCP et son installation est gratuite.

Compétences associées

content-collections
Méta

Cette compétence propose une configuration éprouvée en production pour Content Collections, un outil axé sur TypeScript qui transforme des fichiers Markdown/MDX en collections de données typées de manière sûre avec une validation Zod. Utilisez-la lors de la création de blogs, de sites de documentation ou d'applications Vite + React riches en contenu pour garantir la sécurité de typage et la validation automatique du contenu. Elle couvre tout, de la configuration du plugin Vite et de la compilation MDX à l'optimisation des déploiements et la validation des schémas.

Voir la compétence
polymarket
Méta

Cette compétence permet aux développeurs de créer des applications avec la plateforme de marchés prédictifs Polymarket, incluant l'intégration d'API pour le trading et les données de marché. Elle fournit également une diffusion de données en temps réel via WebSocket pour surveiller les transactions en direct et l'activité du marché. Utilisez-la pour mettre en œuvre des stratégies de trading ou pour créer des outils traitant les mises à jour de marché en direct.

Voir la compétence
creating-opencode-plugins
Méta

Cette compétence aide les développeurs à créer des plugins OpenCode qui s'interconnectent avec plus de 25 types d'événements tels que les commandes, les fichiers et les opérations LSP. Elle fournit la structure du plugin, les spécifications de l'API événementielle et les modèles d'implémentation pour les modules JavaScript/TypeScript. Utilisez-la lorsque vous avez besoin d'intercepter, de surveiller ou d'étendre le cycle de vie de l'assistant IA OpenCode avec une logique personnalisée pilotée par les événements.

Voir la compétence
sglang
Méta

SGLang est un framework de service LLM haute performance spécialisé dans la génération rapide et structurée pour les workflows JSON, regex et agentiques grâce à son cache de préfixe RadixAttention. Il offre une inférence nettement plus rapide, particulièrement pour les tâches avec des préfixes répétés, ce qui le rend idéal pour les sorties complexes et structurées ainsi que les conversations multi-tours. Choisissez SGLang plutôt que des alternatives comme vLLM lorsque vous avez besoin d'un décodage contraint ou que vous construisez des applications avec un partage étendu de préfixes.

Voir la compétence