FYBY AI

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
Repository A, docs/architecture.md, lines 4 to 91; src/wal/writer.rs, lines 30 to 522; docs/operations.md, lines 21 to 283; Repository B, docs/design.md, lines 10 to 184; raft/README.md, lines 1 to 65; docs/sizing.md, lines 3 to 116; docs/operations.md, lines 60 to 717; Repository C, docs/faq.md, lines 8 to 118; docs/storage.md, lines 4 to 109; docs/storage.md, lines 12 to 1910; docs/storage.md, lines 22 to 3011

In Brief

  1. 1

    B is the only candidate that replicates writes; A does not, and C’s copies do not follow writes.5128

  2. 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. 3

    After a restart A is down about 45 minutes and C answers partially for 33; B serves throughout.3117

  4. 4

    B costs the most to run: ten processes, two languages, 186 dependencies.131415

  5. 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.

Sources Repository B, raft/README.md, lines 1 to 65; Repository A, docs/limits.md, line 312; Repository C, docs/faq.md, lines 8 to 118

02Comparison Subjects

Comparison table

CandidateShapeIndexSizeRead at
ASingle process1Graph, in memory38,400 lines21Fixed commit
BQuery, storage and coordinator nodes4In memory on query nodes214,000 lines20Fixed commit
CSingle node8On disk, in segments1061,200 lines19Fixed commit

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.

Sources Repository C, index.py18; Repository listing19; Repository B, Repository listing20; Repository A, Repository listing21

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
Repository A, docs/architecture.md, lines 4 to 91; docs/sizing.md, lines 6 to 1516; docs/operations.md, lines 21 to 283; docs/limits.md, line 312; bench/results.md, table 122; Cargo lock file and deps report23; Commit history, twelve months24; Repository B, docs/design.md, lines 10 to 184; docs/sizing.md, lines 3 to 116; docs/operations.md, lines 60 to 717; docs/deploy.md, lines 40 to 5213; bench/README.md, table 225; Two lock files and deps report15; Commit history, twelve months26; Repository C, docs/storage.md, lines 12 to 1910; docs/scale.md, lines 2 to 517; docs/storage.md, lines 22 to 3011; docs/faq.md, lines 8 to 118; bench/results.csv27; Requirements file and deps report28; Commit history, twelve months29

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.

Sources Repository A, Repository listing21; Repository B, Repository listing20; Repository C, Repository listing19

05Evidence Table

Comparison table

PointABC
Index kept inMemory1Memory, query nodes4Disk10
ReplicationNot supported12Quorum of storage nodes5Snapshots only8
Sizing ruleRaw plus 300 bytes161.5 × raw, split6Fast while in memory17
Restart9 min per 10M34 min per 10M per node740 s per segment11
Benchmark at 10M6.8 ms2211.2 ms2538.0 ms27

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
Repository A, docs/architecture.md, lines 4 to 91; docs/sizing.md, lines 6 to 1516; docs/limits.md, line 312; src/wal/writer.rs, lines 30 to 522; docs/operations.md, lines 21 to 283; bench/results.md, table 122; Repository listing21; Cargo lock file and deps report23; Commit history, twelve months24; Repository B, docs/design.md, lines 10 to 184; docs/sizing.md, lines 3 to 116; docs/deploy.md, lines 40 to 5213; raft/README.md, lines 1 to 65; docs/operations.md, lines 60 to 717; bench/README.md, table 225; Repository root14; Repository listing20; Two lock files and deps report15; Commit history, twelve months26; Repository C, docs/scale.md, lines 2 to 517; docs/storage.md, lines 12 to 1910; docs/faq.md, lines 8 to 118; docs/storage.md, lines 4 to 109; docs/storage.md, lines 22 to 3011; bench/results.csv27; index.py18; Repository listing19; Requirements file and deps report28; Commit history, twelve months29

06Architecture Comparison

Comparison table

ItemABC
ProcessesOne1Three kinds of node13One8
Index livesMemory1Memory, query nodes4Disk, loaded by segment10
Write pathLog, flushed each second2Quorum of storage nodes5Flush every 10,000 or 5 s9
After a restartRebuilt from the log3Reloaded, replicas serve7Segments load one by one11
CopiesNone12Replicated5Snapshots 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.

B’s guide asks for at least two query nodes; the archive needs four for its index to fit in 64 GB hosts.6

Sources Repository A, docs/limits.md, line 312; Repository B, docs/deploy.md, lines 40 to 5213; docs/sizing.md, lines 3 to 116; Repository C, docs/faq.md, lines 8 to 118

07Dependency Comparison

Comparison table

ItemABC
LanguagesOneTwo14One, with native extensions19
Runtime dependencies3123186154728
Over two years old42323151128
Replication layerNone12Built in5None8

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.

Sources Repository A, Cargo lock file and deps report23; Repository B, Two lock files and deps report15; Repository C, Requirements file and deps report28

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.

One vector a document, 768 dimensions of four bytes: 153.6 GB of raw vectors. The archive’s vector size is an assumption.

Sources Repository A, docs/sizing.md, lines 6 to 1516; Repository B, docs/sizing.md, lines 3 to 116; Repository C, docs/scale.md, lines 2 to 517

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.

Sources Repository A, bench/results.md, table 122; Repository B, bench/README.md, table 225; Repository C, bench/results.csv27

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.

Sources Repository A, docs/operations.md, lines 21 to 283; Repository B, docs/operations.md, lines 60 to 717; Repository C, docs/storage.md, lines 22 to 3011

09Maintainability Signals

Comparison table

ItemABC
Source lines38,40021214,0002061,20019
Test lines per source line0.55210.61200.1619
Largest file2,100 lines213,900 lines20About 6,000 lines18
Commits, twelve months620244,81026288, falling29
Share of the most active author41%2412%2668%29

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).

Sources Repository A, Commit history, twelve months24; Repository B, Commit history, twelve months26; Repository C, Commit history, twelve months29

10Trade-Off Matrix

Comparison table

DimensionCodebase ACodebase BCodebase 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.

Sources Repository A, docs/limits.md, line 312; Repository B, docs/deploy.md, lines 40 to 5213; Repository C, docs/scale.md, lines 2 to 517

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.

Sources Repository A, bench/results.md, table 122; docs/architecture.md, lines 4 to 91; Commit history, twelve months24; Repository B, raft/README.md, lines 1 to 65; docs/operations.md, lines 60 to 717; Repository C, docs/scale.md, lines 2 to 517

12System Context

Flow diagram

Exhibit 14

Deployed for the archive, B is ten processes in three roles behind one proxy

B as its deployment guide lays it out for 50M with failover.

Sources Repository B, docs/design.md, lines 10 to 184; docs/deploy.md, lines 40 to 5213; docs/sizing.md, lines 3 to 116; raft/README.md, lines 1 to 65

13Request and Data Flow

Sequence diagram

Exhibit 15

A search fans out to every query node; a write is acknowledged only once a quorum holds it

One search and one write through B, from docs/design.md and raft/README.md.

Sources Repository B, docs/design.md, lines 10 to 184; raft/README.md, lines 1 to 65; docs/operations.md, lines 60 to 717

14Key Figures

Metrics

Candidates
3Read at fixed commits.
Replicate writes
1 of 3B.5
B’s score, of 60
50Against 37 for A and 26 for C, on twelve criteria.
Memory at 50M, B
57.6 GBA query node, of four.6
Restart at 50M, A
45 minDown while it rebuilds.3
Largest module
~6,000 linesC, index.py.18

15Open Questions

None of the repositories reports a measurement at 50M documents. The archive’s vector size is assumed, not given. Whether C flags its partial answers during start-up to the caller is not said in its documentation.11 Whether B’s two languages share one build is not clear from the listing.14

16Appendix

File paths and lines refer to the commits that were captured. Memory and restart times at 50M are worked here from each repository’s documented rule; they are not measurements. Scores run from 1 to 5 and are unweighted.166

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.

  1. Repository AGitHub repositoryNine passages, cited 67 times

    1. 1docs/architecture.md, lines 4 to 9

      A runs as a single process and keeps its index in memory.
    2. 12docs/limits.md, line 3

      Replication is not supported.
    3. 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.
    4. 2src/wal/writer.rs, lines 30 to 52

      The write log is flushed to disk once a second.
    5. 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.
    6. 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.
    7. 21Repository listing

      214 source files, 38,400 lines; 96 test files, 21,100 lines. Largest file src/index/graph.rs, 2,100 lines.
    8. 23Cargo lock file and deps report

      31 runtime dependencies, 4 of them on a release over two years old.
    9. 24Commit history, twelve months

      620 commits by 14 people; the most active wrote 41 per cent of them.
  2. Repository BGitHub repositoryTen passages, cited 91 times

    1. 4docs/design.md, lines 10 to 18

      Query nodes hold the index in memory; storage nodes keep the data.
    2. 5raft/README.md, lines 1 to 6

      Every write is replicated to a quorum of storage nodes.
    3. 14Repository root

      The code is split between two languages.
    4. 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.
    5. 13docs/deploy.md, lines 40 to 52

      A highly available deployment runs at least three storage nodes, two query nodes and three coordinators.
    6. 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.
    7. 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.
    8. 20Repository listing

      1,480 source files, 214,000 lines; 1,140 test files, 131,000 lines.
    9. 15Two lock files and deps report

      186 runtime dependencies across two ecosystems, 23 of them on a release over two years old.
    10. 26Commit history, twelve months

      4,810 commits by 131 people; the most active wrote 12 per cent of them.
  3. Repository CGitHub repositoryTen passages, cited 72 times

    1. 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.
    2. 17docs/scale.md, lines 2 to 5

      Performance falls once the index no longer fits in one node’s memory.
    3. 18index.py

      The query path lives in one module, index.py, of about six thousand lines.
    4. 9docs/storage.md, lines 4 to 10

      Writes are flushed every 10,000 vectors or every five seconds, whichever comes first.
    5. 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.
    6. 8docs/faq.md, lines 8 to 11

      C runs on one node. Copies can be made from snapshots, but they do not follow writes.
    7. 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.
    8. 19Repository listing

      128 source files, 61,200 lines, three native extensions; 58 test files, 9,800 lines.
    9. 28Requirements file and deps report

      47 runtime dependencies, 11 of them on a release over two years old.
    10. 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