A 12.8M match/sec execution engine paired with a distributed vector database for pattern recognition. Two systems. One stack. Zero dependencies on existing infrastructure.
Orders arrive at Titan's TCP gateway, match at microsecond speed via price-time priority, and emit fill events. Those fills become vectors in Vajra — indexed for semantic pattern search across millions of historical trades.
Titan handles execution — price-time priority matching at hardware limits. Vajra handles memory — indexing fills as vectors for pattern recognition. Each is fault-tolerant independently. Together they form a complete system.
Modern matching engines are extraordinarily fast — but entirely stateless. They can tell you a trade happened. They cannot tell you if they've seen this price pattern before, or whether a particular order flow precedes a crash. Speed without memory is blind execution.
Fill events from Titan become embedding vectors in Vajra. Every matched trade is indexed — price, volume, time, order book state at the moment of match. When a new pattern arrives, Vajra retrieves the 10 most similar historical fills in O(log N) time. The execution layer and the memory layer share the same consensus primitive: Raft.
Using Milvus or an existing matching engine would have answered none of the questions I actually had. I wanted to understand why Raft uses Pre-Vote. Why HNSW beats KD-trees at high dimension. Why cache-line padding matters at 12M ops/sec. You only learn that by building it wrong first, then fixing it.
Both systems were designed with the same philosophy: correctness first, then performance, then fault tolerance. The parallel design decisions are not coincidental.
| Design Decision | ⚡ TITAN | 🔷 VAJRA |
|---|---|---|
| Consensus | Raft — leader election | Raft + Pre-Vote extension |
| Language | Rust 1.75+ | Rust 1.75+ |
| Latency target | <100ns P99 | <1ms P99 |
| Hot path allocation | Zero — ring buffer | Zero — HNSW in-place |
| Durability | Ring buffer snapshots | WAL + CRC32 checksums |
| Fault tolerance | Leader re-election <300ms | Log replication + recovery |
| Benchmarking | RDTSC cycle counter | Criterion micro-benchmarks |
| Transport | Custom TCP gateway | gRPC + protobuf |
| Test coverage | 33 tests — all passing | 110 tests — all passing |
| Build system | Cargo workspace (8 crates) | Cargo workspace (6 crates) |
From late-night tinkering to a complete HFT stack.