Platform Architecture
Architectural Blueprint: Logical & Technical Systems
The enterprise architectural specification of Anvesh, decoupled into formal Logical Domain Models and physical Kubernetes / Microservices Technical Topologies.
🧠 Part I: Logical Architecture & Hybrid Search Pipeline
The logical architecture models Anvesh's hybrid search, inverted index construction, scalar vector quantization (SQ8), and reciprocal rank fusion independent of container hosting.
⚙️ Part II: Technical Architecture & Distributed Microservices Topology
The technical architecture details the physical container topology, networking ports, protective throttling semaphores, and memory backpressure mechanisms operating across the fleet.
1. Fleet Resource Envelopes & Memory Governors
| Service / Component | Port | Package | CPU Limit | RAM Limit | Protective Mechanism |
|---|---|---|---|---|---|
| Anvesh Engine | :3848 |
apps/engine |
2.0 vCPU | 2.0 GiB | 3-Tier Throttling (120 RPM, 32 Semaphore, 85% Heap Circuit Breaker) |
| Hub API & Control Plane | :3849 |
apps/hub-api |
1.0 vCPU | 1.0 GiB | AWS Cognito RBAC, System Index Replication |
| Spider & Scheduler | :3851 |
apps/spider |
1.0 vCPU | 1.0 GiB | Async Crawl Semaphore, Domain Politeness Rate Limiting |
| Bulk Indexer | :3852 |
apps/indexer |
2.0 vCPU | 2.0 GiB | Streaming Chunk Batcher, Dead-Letter Queue (DLQ) |
| Change Scanner (CDC) | :3853 |
apps/scanner |
1.0 vCPU | 1.0 GiB | SHA-256 Hash Diffs, Periodic Watermark Checkpoint |
2. 3-Tier Protective Throttling System
Every engine node is shielded by three independent layers of defense:
- Layer 1: RPM Rate Limiter — Fastify token/IP throttling (default 120 req/min).
- Layer 2: In-Flight Concurrency Guard — Maximum 32 concurrent searches per pod. Overflows are shed with HTTP
429 ERR_CIRCUIT_CONCURRENT. - Layer 3: Memory Backpressure — Proactive GC at 75% heap; automatic load shedding at 85% heap (
429 ERR_CIRCUIT_MEMORY) to prevent OOM restarts.
📊 Production Performance & Footprint
| Metric | Value | Conditions |
|---|---|---|
| Search Query Latency (p50) | 0.3 ms | 100K docs, BM25 + Vector Hybrid |
| Search Query Latency (p99) | 0.8 ms | 100K docs, BM25 + Vector Hybrid |
| Ingestion Throughput | 12,000+ docs/s | Bulk streaming API |
| Memory Footprint (Idle) | ~70 MB | Engine Node (Node.js runtime) |
| Vector Memory Savings | 75% reduction | SQ8 8-bit Quantization |