All projects
SampleSample · unsupportedUnsupported · no SLA

Qdrant Multitenant RAG Tiering

Full-stack sample (Next.js 16 + FastAPI) for multi-tenant RAG with Qdrant: hot tenants are served from Qdrant, idle tenants' collections are parked as verified snapshots in Backblaze B2 and restored on the next query, and a benchmark measures the latency cost and the memory saved.

Built for: Developers and AI coding agents running retrieval for many customers, most of them idle most of the time, who want to keep vector memory only for tenants that query and justify a parking threshold with measured restore cost.

MIT licensed · Updated Nov 17, 2026

Dashboard with hot and parked tenant counts, vector memory in use and freed, and bytes in B2
The Dashboard shows hot, parked and empty tenant counts, vector memory in use and freed, snapshot and corpus bytes in B2, a per-tenant vector footprint chart and the latest latency reports.

What it's built with

Each piece of the stack, and the job it does in this project.

Next.js 16 + React 19
Web application and dashboard UI
Tailwind CSS v4 + shadcn/ui
Design tokens and reusable interface primitives
TanStack Query + Recharts
Client-side data fetching and latency and footprint charts
FastAPI + Pydantic v2
Typed, layered Python 3.12 API with the park and restore state machine
Qdrant v1.20.2 + qdrant-client
Hot tier: one collection per tenant, snapshotted and restored through Qdrant's snapshot API
fastembed (BAAI/bge-small-en-v1.5)
Local CPU embeddings, 384 dimensions, about 67 MB, no external AI calls
boto3 + Backblaze B2
S3-compatible durable tier: multipart snapshot uploads, manifests, corpora, and benchmark reports
pnpm workspaces + Docker Compose
Monorepo workflow and a three-container local stack

Core capabilities

What the project does out of the box, before you write any code of your own.

  • Tenants

    Create tenants from text or Markdown files, or seed demo tenants; each gets its own Qdrant collection, with its source corpus stored in B2.

  • Tiering with verify-before-drop

    An idle policy or a manual Park now snapshots the collection, streams it to B2 with a multipart upload, writes the manifest last, verifies size and sha256 in B2, and only then drops the collection.

  • Restore on query

    The first query to a parked tenant restores its snapshot from B2 into any Qdrant node, including an empty one, checks the hash and point count, and reports the restore cost.

  • Latency report

    Benchmark warm, restore, first-query and post-restore latency plus memory freed for selected tenants, stored as report.json in B2 with a result-match check.

  • Dashboard

    Hot, parked and empty counts, vector memory in use and freed, bytes in B2, a per-tenant footprint chart and recent reports.

  • Library and Bucket Explorer

    Browse the app's own objects under rag/ grouped by tenant and kind, or the whole bucket with preview, download and delete streamed through the API.

A closer look

More screens from the running project.

Tenants table with hot and parked states, points, vector memory and snapshot sizes
Tenants lists every tenant with its hot or parked state, points, documents, vector memory in Qdrant (or memory freed) and snapshot size in B2, plus seed, tiering sweep and prune controls.
Tenant detail answering a query after restoring the parked collection from B2
A query to a parked tenant restores its collection from B2 first, reports the download and load time, then returns the ranked chunks.
Latency reports page with the benchmark form and the list of stored runs
Latency reports: pick up to six tenants and run a benchmark that parks and restores each one, with every past run listed from its report.json in B2.
Latency report with warm, restore and post-restore latency charts and the figures table
One run's warm, restore and post-restore latency per tenant, the memory freed by parking, and the full figures table with a result-match check.
Library of the app's B2 objects grouped by tenant into corpus, snapshots and reports
The Library shows everything the app wrote to B2, grouped by tenant into corpus files, collection snapshots with their latest.json manifest, and latency reports.

Choose it for the right job

Qdrant Multitenant RAG Tiering is a head start for a specific shape of project, not a supported, general-purpose product.

Use it when

  • You run retrieval for many customers with one Qdrant collection per tenant and most tenants are idle most of the time.
  • You want idle tenants' vector memory freed while their collections stay recoverable as verified snapshots in Backblaze B2.
  • You need measured warm latency, restore time and post-restore latency to choose a parking threshold on numbers rather than guesses.
  • You want a worked example of streaming large artifacts to B2 safely: multipart upload, manifest last, verify before delete.

Choose another path when

  • You need a hosted multi-user service: the API has no authentication or tenant-scoped access, and its per-tenant locks assume one API process per Qdrant node.
  • You run Qdrant clusters with replicated shards or payload-based multitenancy inside a single collection; neither is covered.
  • Your tenants are so large that a restore takes minutes, or you want a serverless deploy: the sample needs a Qdrant node and a CPU embedding model, so it runs with Docker Compose.
Sample · unsupported

Project status and support

Report defects and feature requests through the repository's GitHub Issues; the sample carries no SLA.