Internal Systems Engineering
VaagaGraph Architecture
How VaagaGraph achieves sub-10ms cold boot times, O(1) append durability, and multi-writer consistency across ephemeral serverless runtimes.
Part I: Logical Architecture
Property graph data model, dual-adjacency index representation, traversal algorithm automata (BFS, Dijkstra, WCC, Dynamic Match Threshold scoring), and cryptographic tenant isolation models.
Dual-Adjacency Graph Model
Nodes and directional edges are stored in RAM across dual adjacency sets. Finding incoming edges (transitive dependents) or outgoing edges (dependencies) is executed in exact O(1) time without full table scans.
Dynamic Match Threshold Scoring
Graph relationships evaluate contextual similarity vectors across properties. Matches exceeding dynamic score thresholds automatically link nodes into transitive clusters for real-time deduplication and blast-radius evaluation.
Part II: Technical Architecture & Physical Infrastructure
Physical Kubernetes pod sizing, stateless compute decoupling, dual protocol wire listeners (HTTP Port 4000 vs. TCP Wire Port 4001), S3/R2 ETag Optimistic Concurrency Control, and disaster recovery specifications.
1GB Pod Envelopes & 85% Memory Governor
EKS pods run on Node.js 24 with --max-old-space-size=768 inside 1024MiB limits. A background memory governor triggers proactive garbage collection if heap allocation reaches 85%, eliminating container termination crashes.
Dual Protocol: HTTP (4000) & Binary Wire (4001)
Port 4000 serves JSON REST for web clients, Kubernetes health probes, and Prometheus scraping. Port 4001 runs VaagaWire, a zero-copy 12-byte header binary protocol delivering sub-2ms network round-trips for microservices.
ETag OCC Multi-Writer Coordination
Multiple stateless compute pods write concurrently against commodity object storage using HTTP If-Match headers. Conflicting writes receive HTTP 412, trigger an automatic state delta replay, and resolve without database table locks.
High Availability & Disaster Recovery
Write-Ahead-Logs persist directly to multi-AZ AWS S3 / Cloudflare R2 with 99.999999999% durability. RPO = 0 across all mutations. Cold boot replay from compacted snapshots recovers full in-memory indexes in under 200 milliseconds (RTO < 200ms).
5. Multi-Tenancy & Physical Storage Separation
Enterprise deployments demand strict multi-tenant isolation. VaagaGraph provides logical and physical database separation managed by the DatabaseCatalog:
- Physical Directory Isolation: Every database is allocated its own directory (
<dataDir>/databases/<db_name>/) containing dedicated WAL and snapshot partitions. - Zero Cross-Tenant Leakage: Graph adjacency maps, inverted indices, and Bloom filters are isolated per database.
- Cold Backup Portability: Entire databases can be snapshotted, moved, or restored across physical environments using native filesystem commands (
cp -r). - Per-Database Memory Quotas: Each database runs its own
TieredLRUStorage(capped at 350MB) to preserve the 85% memory governor target on 1GB EKS pods.
6. Hardened Role-Based Access Control (RBAC)
Built strictly with Node.js built-ins (node:crypto) for zero supply-chain risk and maximum auditability:
- Timing-Attack Immune: Token verification utilizes
crypto.timingSafeEqualto prevent side-channel timing analysis. - Granular Role Scopes:
admin(full cluster authority),readwrite(data ingestion and mutations), andreadonly(queries and graph algorithms). - Database Access Whitelisting: API tokens can be restricted to specific database instances (e.g.
allowedDatabases: ['tenant_finance']).