Three Vector Databases for a 50M-Document Archive
Three repositories read at fixed commits and scored on the same twelve criteria. Only one replicates writes, and it is the one to pilot.
The question, as asked in the composer
Compare the three leading vector databases for a 50M-document archive
- Source
- Three open-source vector databasesGitHub repository
- Template
- Comparative Codebase AssessmentSoftware
- Sections
- 16
- Exhibits
- 15
- Sources
- 329 passages
- Citations
- 230
Sample reportThe sources, passages and figures in this report are invented for illustration.
Drawn the same way, the three designs differ at two points: where the index lives and what a restart costs
The path of a write and of a restart in each repository, from its own documentation. Lit: where it breaks at 50M.
Times at 50M are worked here from each repository’s documented rate; none was measured at that size.
Sources Repository A; Repository B; Repository C11 passages
In Brief
- 1
B is the only candidate that replicates writes; A does not, and C’s copies do not follow writes.5128
- 2
At 50M only B keeps a full-precision index within a 64 GB host per node: 57.6 GB on each of four.6
- 3
After a restart A is down about 45 minutes and C answers partially for 33; B serves throughout.3117
- 4
B costs the most to run: ten processes, two languages, 186 dependencies.131415
- 5
No repository has measured anything at 50M: pilot B at full size before committing.
01Executive Summary
Two of the three keep their index in memory; the third writes it to disk and rebuilds it on start.10 That is the difference that decides the archive. At 50M documents A’s index fits one host only compressed, and C’s spills past memory, where its own documentation says it slows.1617 B is the only candidate that replicates writes and scales reads,54 and it scores 50 of 60 on twelve criteria, against 37 for A and 26 for C.
B is also the largest and the most expensive to run: ten processes for 50M with failover, two languages and 186 dependencies.131415 None of the three reports a measurement at 50M, so the recommendation is B, proved first on a pilot at full size.
Exhibit 1
B scores 50 of 60, and leads on reliability by the widest margin of any dimension
Twelve criteria scored 1 to 5 from what each repository shows, summed by dimension. Unweighted.
02Comparison Subjects
Comparison table
Exhibit 2
At one scale: B is five times A’s size, and C keeps its query path in one file of six thousand lines
Source lines by top-level module; each square’s area is the repository’s size. Lit: the largest single file.
03Source Snapshot
Fact list
- Repositories
- Three, each read at one fixed commit.
- Read
- Documentation, benchmarks, lock files, source listings and twelve months of history in each.
- Asked to decide
- Which one to adopt.
- Dimensions chosen
- Architecture and reliability; performance and maintainability are scored as well.
- Sizing basis
- One vector a document, 768 dimensions: an assumption the repositories cannot confirm.
- Not captured
- Issue trackers, mailing lists and benchmarks run by anyone else.
Exhibit 3
All three document their design; only B documents how to run it with failover
What each repository holds that this comparison read.
Sources Repository A; Repository B; Repository C21 passages
04Key Findings
B is the only candidate that replicates writes;5 A says plainly that it does not,12 and C’s copies do not follow writes.8 C slows once its index outgrows one node’s memory,17 which a 50M archive does on any single host at full precision.
The benchmarks cannot be set side by side: each ran on its own hardware, and C’s used vectors of half the size.27 Read alone, A is fastest at 10M, but A has nothing beyond 10M and C’s time triples between 5M and 10M on its own host.2227
Exhibit 4
A and B tie on maintainability; B pulls away on reliability, C trails everywhere but architecture
Mean score in each dimension, 1 to 5.
05Evidence Table
Comparison table
Exhibit 5
Every score rests on a passage: twelve criteria, three repositories
Hotter is better. Point at a cell for the passage behind the score.
Sources Repository A; Repository B; Repository C29 passages
06Architecture Comparison
Comparison table
| Item | A | B | C |
|---|---|---|---|
| Processes | One1 | Three kinds of node13 | One8 |
| Index lives | Memory1 | Memory, query nodes4 | Disk, loaded by segment10 |
| Write path | Log, flushed each second2 | Quorum of storage nodes5 | Flush every 10,000 or 5 s9 |
| After a restart | Rebuilt from the log3 | Reloaded, replicas serve7 | Segments load one by one11 |
| Copies | None12 | Replicated5 | Snapshots that do not follow writes8 |
Exhibit 6
For 50M with failover B runs ten processes; A and C cannot fail over at all
Processes each candidate needs for the archive, by role, from each repository’s deployment notes.
07Dependency Comparison
Comparison table
Exhibit 7
B carries six times A’s dependencies; C has the largest share past two years
Runtime dependencies by the age of the pinned release: dark under a year, bronze one to two years, pale over two.
08Performance and Scalability
At 50M and 768 dimensions the raw vectors alone are 153.6 GB. By A’s own rule the index needs 168.6 GB at full precision, or 53.4 GB compressed, in one process.16 B’s rule asks for 230.4 GB, but across four query nodes that is 57.6 GB each.6 C keeps 169 GB on disk and is fast only for the part that is in memory.17
Restart matters as much as speed for an archive. Worked from each repository’s documented rate, A is down about 45 minutes after a restart,3 C answers from a growing fraction of its segments for about 33 minutes,11 and B reloads a node in about five while its replicas serve.7
Exhibit 8
At 50M documents only B keeps a full-precision index within one 64 GB host per node
Memory the index needs, worked from each repository’s own sizing rule, against a 64 GB host.
Exhibit 9
Each benchmark ran on its own hardware; read alone, C’s time triples between 5M and 10M
p95 query time as each repository reports it, against the number of vectors (log scale). The dashed line used vectors of half the size.
Exhibit 10
After a restart A is down for about 45 minutes; B keeps serving
Minutes to full service at 50M, worked from each repository’s documented rate.
A: nine minutes per ten million vectors. B: four minutes per ten million on each of four nodes. C: forty seconds for each of fifty one-million-vector segments.
09Maintainability Signals
Comparison table
Exhibit 11
C’s commits have fallen by four fifths in a year, and one person wrote two thirds of them
Commits in each of the twelve months, as a share of each repository’s first month (month 1 = 100).
10Trade-Off Matrix
Comparison table
| Dimension | Codebase A | Codebase B | Codebase C |
|---|---|---|---|
| Architecture | Single process, simple to reason about1 Favourable | Separate query and storage nodes4 Favourable | Single node, index on disk10 Unfavourable |
| Maintainability | Small core, one language21 Favourable | Two languages in one codebase14 Unfavourable | Query path in one large module18 Unfavourable |
| Reliability | No replication12 Unfavourable | Replicated writes5 Favourable | Copies that do not follow writes8 Unfavourable |
| Performance | Fastest it reports, to 10M22 Favourable | Scales out reads4 Favourable | Slows past one node’s memory17 Unfavourable |
| Operations | One process; 45 min down after a restart3 Unfavourable | Ten processes; serves through a restart7 Favourable | One process; partial answers while starting11 Unfavourable |
Exhibit 12
Each candidate buys something with something else
What each keeps and what it gives up, for this archive.
Repository A
One process, index in memory
Keeps
- One process to run
- Smallest code base
- Lowest latency it reports
Gives up
- Any replication
- 45 minutes down after a restart
- Fits 50M only compressed
Repository B
Query nodes, storage nodes, coordinators
Keeps
- Replicated writes
- Reads that scale out
- Service through a restart
Gives up
- Ten processes to run
- Two languages, 186 dependencies
- The most memory in total
Repository C
One process, index on disk
Keeps
- Memory below the index size
- A single process
- The highest recall it reports
Gives up
- Speed past one node’s memory
- Complete results while starting
- A spread of maintainers
11Recommendation
Adopt B for the archive: it is the only one that replicates writes and scales reads.54 Budget for what that costs: ten processes for 50M with failover,13 two languages,14 and the largest dependency tree.15
Before committing, load the full 50M into a pilot of four query nodes and measure latency and a node restart, because none of the three repositories has measured anything at that size. If the archive turns out to be far smaller, or failover is not required, A is the simpler choice.22
Exhibit 13
For this archive’s needs B is the only fit; A wins only if failover is not needed
Which candidate meets each need, from the evidence above.
12System Context
Flow diagram
13Request and Data Flow
Sequence diagram
14Key Figures
Metrics
15Open Questions
16Appendix
Sources
What the run captured and read: three sources, 29 passages. Each passage is quoted as it stands in the source; the marked words are the ones the report relies on.
Repository AGitHub repositoryNine passages, cited 67 times
-
1docs/architecture.md, lines 4 to 9
A runs as a single process and keeps its index in memory.
-
12docs/limits.md, line 3
Replication is not supported.
-
16docs/sizing.md, lines 6 to 15
Each vector takes its raw size plus about 300 bytes of graph links. Vectors may be stored compressed to one byte per dimension.
-
2src/wal/writer.rs, lines 30 to 52
The write log is flushed to disk once a second.
-
3docs/operations.md, lines 21 to 28
After a restart the index is rebuilt from the write log, about nine minutes for every ten million vectors.
-
22bench/results.md, table 1
One host, 64 GB, 16 cores, 768 dimensions, recall at 10 of 0.97. p95: 4.1 ms at 1M, 5.6 ms at 5M, 6.8 ms at 10M. Ingest 18,000 vectors a second.
-
21Repository listing
214 source files, 38,400 lines; 96 test files, 21,100 lines. Largest file src/index/graph.rs, 2,100 lines.
-
23Cargo lock file and deps report
31 runtime dependencies, 4 of them on a release over two years old.
-
24Commit history, twelve months
620 commits by 14 people; the most active wrote 41 per cent of them.
-
Repository BGitHub repositoryTen passages, cited 91 times
-
4docs/design.md, lines 10 to 18
Query nodes hold the index in memory; storage nodes keep the data.
-
5raft/README.md, lines 1 to 6
Every write is replicated to a quorum of storage nodes.
-
14Repository root
The code is split between two languages.
-
6docs/sizing.md, lines 3 to 11
Plan query-node memory at one and a half times the raw vector size, split across the query nodes.
-
13docs/deploy.md, lines 40 to 52
A highly available deployment runs at least three storage nodes, two query nodes and three coordinators.
-
7docs/operations.md, lines 60 to 71
A restarted query node reloads its segments from the storage nodes, about four minutes for every ten million vectors, while its replicas serve.
-
25bench/README.md, table 2
Eight query nodes of 32 GB, 768 dimensions, recall at 10 of 0.96. p95: 9.5 ms at 1M, 11.2 ms at 10M, 14.8 ms at 100M. Ingest 42,000 vectors a second on three storage nodes.
-
20Repository listing
1,480 source files, 214,000 lines; 1,140 test files, 131,000 lines.
-
15Two lock files and deps report
186 runtime dependencies across two ecosystems, 23 of them on a release over two years old.
-
26Commit history, twelve months
4,810 commits by 131 people; the most active wrote 12 per cent of them.
-
Repository CGitHub repositoryTen passages, cited 72 times
-
10docs/storage.md, lines 12 to 19
The index is written to disk after every flush and loaded again, segment by segment, when the server starts.
-
17docs/scale.md, lines 2 to 5
Performance falls once the index no longer fits in one node’s memory.
-
18index.py
The query path lives in one module, index.py, of about six thousand lines.
-
9docs/storage.md, lines 4 to 10
Writes are flushed every 10,000 vectors or every five seconds, whichever comes first.
-
11docs/storage.md, lines 22 to 30
Each segment of one million vectors loads in about forty seconds; queries are answered from the segments already loaded.
-
8docs/faq.md, lines 8 to 11
C runs on one node. Copies can be made from snapshots, but they do not follow writes.
-
27bench/results.csv
One host, 32 GB, 8 cores, 384 dimensions, recall at 10 of 0.98. p95: 7.9 ms at 1M, 12.4 ms at 5M, 38.0 ms at 10M. Ingest 6,500 vectors a second.
-
19Repository listing
128 source files, 61,200 lines, three native extensions; 58 test files, 9,800 lines.
-
28Requirements file and deps report
47 runtime dependencies, 11 of them on a release over two years old.
-
29Commit history, twelve months
288 commits by 9 people, falling from 41 a month to 9; the most active wrote 68 per cent of them.
-
In the App
Bring it up to date. Each makes a new revision.
