Docstore Roadmap

Scaling to thousands of tenants and documents

Docstore can scale, but the important idea is this: the current single-VPS production shape is a solid early product foundation, not the forever architecture. The right path is staged hardening, workload separation, and operational maturity — not a panicked rewrite.

Short answer

Will it scale?

Yes. The underlying direction is sound: Postgres, pgvector, object storage, async ingestion, and separate bot/voice execution planes are all reasonable building blocks.

What won’t scale forever?

The current one-box deployment. The first limits will likely be database pressure, worker contention, retrieval latency, and noisy-neighbor effects.

Do we need a rewrite?

No. The smarter path is staged infra and product hardening: observability, queue isolation, retrieval tuning, and cleaner workload separation.

What already scales reasonably well

What breaks first at 10×

Database pressure

Postgres + pgvector can go surprisingly far, but more chunks, more embeddings, and more concurrent retrieval will eventually push CPU, memory, index size, and maintenance overhead.

Worker contention

Heavy extraction, embeddings, connector sync, reports, and chat-adjacent background tasks should not all compete in one undifferentiated worker pool forever.

Noisy neighbors

One big tenant with massive syncs or lots of traffic can distort everyone else’s experience unless we add queue isolation, limits, and fairness controls.

What to change at 10×

What to change at 100×

App layer

Run multiple app instances behind a proper load balancer instead of assuming one gunicorn node is enough.

Retrieval layer

Stay on Postgres + pgvector if it still performs, but be willing to isolate retrieval-heavy concerns or tune indexes/table layouts aggressively.

Operational controls

Add quotas, tenant-aware scheduling, usage analytics, and stronger admission control so growth stays predictable instead of chaotic.

What not to over-engineer yet

Practical scaling roadmap

Now

Keep shipping product features, but add observability, queue visibility, and database performance checks so scaling conversations are grounded in data.

Next

Split worker roles, improve tenant fairness, and strengthen retrieval performance before traffic makes those decisions for us.

Later

Scale out app nodes, harden storage, and introduce stronger quota/isolation controls as the customer base and corpus size justify it.