Skip to content

Graph-RAG: Typical Distributed vs NornicDB In-Memory ​

This document compares a typical distributed Graph-RAG architecture (separate services for embedding, reranking, vector store, and LLM) with NornicDB’s unified in-process design, and summarizes the latency reduction when all three model roles (embedding, reranker, inference) run in memory in a single process.


Typical Distributed Graph-RAG (Reference) ​

Multiple network hops: Orchestrator → Tool Plugin → Embedding API → Vector Store → Reranker API → LLM. Each arrow implies serialization, network RTT, and often queueing.

Latency (typical ballpark per request):

StepServiceEst. latency (network + compute)
1Orchestrator → Tool Plugin1–5 ms
2Query → Embedding API (e.g. FastAPI bge-small)20–80 ms
3Vectors → Vector Store (Qdrant) retrieval10–50 ms
4Chunks → Reranker API (e.g. FastAPI bge-reranker)30–100 ms
5Reranked context → Orchestrator1–5 ms
6Context + Query → LLM API (generation)200–2000+ ms
Total (retrieval path)~60–240 ms (before LLM)
Total (full request)~260–2240+ ms

NornicDB: Single-Process Graph-RAG (Simplified) ​

Embedding, vector search (+ optional BM25), reranking, and graph traversal live in the same process as the application. The inference LLM can be local (e.g. GGUF) in the same host or a separate API; when local, “all 3 LLMs” (embedder, reranker, inference) are in-memory / on-box.

Latency (in-process, no network between components):

StepComponentEst. latency (in-process)
1Query → Embedding (same process)1–15 ms
2Vector + BM25 search (local index)0.5–5 ms
3Graph traversal (depth 1, same store)0.5–3 ms
4Rerank (same process, optional)2–20 ms
5Context + Query → LLM (local or API)200–2000+ ms (unchanged if API)
Total (retrieval path)~4–43 ms
Total (full request, local LLM)~204–2043 ms (LLM dominates)

Side-by-Side Latency Comparison ​

MetricTypical distributedNornicDB in-memory
Retrieval path (embed → search → rerank)~60–240 ms~4–43 ms
Latency reduction (retrieval)—~5–15× lower (ballpark)
Network hops (retrieval)3–4 (embed, store, rerank)0
All 3 “LLMs” (embed, rerank, infer)Separate services/APIsEmbed + rerank in-process; infer local or API

Deployment: Containers and Services ​

Typical Graph-RAG uses multiple discrete services, each often run in its own container with its own process, networking, and scaling. NornicDB collapses retrieval (embedding, vector store, reranker, graph) into one in-memory process deployable as a single Docker container.

Typical Graph-RAG: Multiple Containers ​

Each logical service typically runs in a separate container; the orchestrator and tool plugin may share a container, but embedding, vector store, reranker, and (if self-hosted) the LLM each add at least one container.

#Container / serviceRole
1App / OrchestratorRequest handling, tool plugin, orchestration
2Embedding API (e.g. FastAPI)Query + chunk embedding (bge-small / bge-m3)
3Vector Store (e.g. Qdrant)Vector + optional sparse index, persistence
4Reranker API (e.g. FastAPI)Cross-encoder reranking (bge-reranker)
5LLM (if self-hosted)vLLM, Ollama, or similar for generation
Total5 containers (4 if LLM is external API)

NornicDB: Single Container, Single Process ​

All retrieval components run in one process inside one container: embedding model, vector/BM25 index, optional reranker, graph storage, and (if configured) local inference LLM. No inter-container networking for the retrieval path.

#Container / processContents
1NornicDB (single container, single process)Orchestrator, Tool Plugin, Embedding, Vector Index + BM25, Graph Store (Badger), Reranker (optional), local LLM (optional)
Total1 containerAll retrieval + optional local inference in one deployable unit

Side-by-Side: Container Count and Complexity ​

AspectTypical Graph-RAGNornicDB
Containers (min)4 (orchestrator, embedding, vector store, reranker)1
Containers (with self-hosted LLM)51
Processes (retrieval path)4+ (one per service)1
Inter-service networkingYes (HTTP/gRPC between containers)No (in-process only)
Config / envMultiple images, ports, envs, health checksSingle image, one port, one env
ScalingScale each service independently (more ops)Scale single container (simpler)

Summary ​

  • Typical Graph-RAG: Orchestrator, Tool Plugin, Embedding API, Vector Store (e.g. Qdrant), Reranker API, and LLM API are separate; each step adds network and serialization cost. Deployment usually means 4–5 containers (orchestrator, embedding API, vector store, reranker, and optionally self-hosted LLM), each with its own image, port, and config.
  • NornicDB: Embedding model, vector/BM25 index, optional reranker, and graph storage run in one process; retrieval is in-process and much faster. When inference is also local (e.g. GGUF), all three model roles (embedding, reranking, inference) are in-memory on the same machine. Deployment is a single Docker container (one process, one port, no inter-container networking for retrieval).
  • Latency: Retrieval path drops from roughly 60–240 ms to 4–43 ms in the NornicDB case; end-to-end latency is then dominated by the inference LLM (same as in the distributed setup if both use the same LLM API or local model).
  • Ops simplification: One container and one process to deploy, scale, and monitor instead of 4–5; no retrieval-path networking or cross-service health checks.
Analytics privacy