Comparison on Windows
YCSB results of Raft DB against MongoDB, MySQL, PostgreSQL and SQLite on one Windows laptop, with the exact setup and caveats.
Source: the project's comparison log, first run 2026-11-09. Relative numbers only. One Windows 11 laptop (i7-10750H, 6 cores / 12 threads, 31.8 GB RAM, 512 GB NVMe); clients and servers compete for the same CPU. Harness: Raft DB's own (YCSB 0.17.0, Java client, driven by a script). Raw results are kept by the project and are not published here.
Conditions#
- 100,000 records of 10 fields x 100 bytes; 100,000 operations per workload (workload E: 10,000); 8 client threads, closed loop; Zipfian
(D: latest);
insertorder=hashed;writeallfields=true, so an update replaces the whole record everywhere (Raft DB has no partial update). - Durability: a write is acknowledged only after fsync in every database. Raft DB: default WAL (
syncon, group commit, 2 shards). MongoDB 8.2.2w=1&journal=true. MySQL 9.7.1 InnoDBflush_log_at_trx_commit=1,sync_binlog=1. PostgreSQL 18.0fsync=on,synchronous_commit=on,wal_sync_method=open_datasync. SQLite 3.54 WAL withsynchronous=FULL. - Not tuned: MySQL
innodb_buffer_pool_size128 MB and PostgreSQLshared_buffers128 MB are defaults; MongoDB uses its default cache. A tuned comparison is future work. - Raft DB was first measured through its HTTP/JSON API, its slowest interface (keep-alive, one request per operation). Raft DB has no key-range scan in this benchmark, so workload E was not run for it.
- One run per cell, no variance reported. Treat differences under about 15 % as noise.
Throughput, first run (operations/s)#
| Workload | Raft DB (HTTP) | MongoDB | MySQL | PostgreSQL | SQLite |
|---|---|---|---|---|---|
| Load (100% insert) | 6,557 | 7,579 | 3,270 | 16,049 | 1,751 |
| A 50% read / 50% update | 8,963 | 9,729 | 4,789 | 18,403 | 3,444 |
| B 95% read / 5% update | 13,298 | 16,532 | 14,706 | 29,172 | 15,625 |
| C 100% read | 14,192 | 18,245 | 21,450 | 32,041 | 66,269 |
| D 95% read / 5% insert (latest) | 13,850 | 14,233 | 14,923 | 29,472 | 15,962 |
| E 95% scan / 5% insert | n/a | 2,585 | 4,177 | 5,010 | 2,652 |
| F 50% read / 50% read-modify-write | 7,070 | 6,651 | 3,793 | 15,063 | 3,446 |
Latency, first run (microseconds, average / 99th percentile)#
| Raft DB (HTTP) | MongoDB | MySQL | PostgreSQL | SQLite | |
|---|---|---|---|---|---|
| read, workload C | 532 / 1,523 | 376 / 1,101 | 339 / 755 | 219 / 386 | 99 / 286 |
| insert, load | 1,191 / 2,307 | 1,001 / 1,545 | 2,407 / 12,375 | 475 / 1,051 | 4,216 / 8,335 |
| update, workload A | 1,289 / 2,511 | 1,227 / 2,165 | 3,006 / 14,799 | 587 / 1,347 | 3,779 / 7,131 |
Update the same day: write-through log and the binary protocol#
Studying how PostgreSQL commits on Windows led to D37: Raft DB's log is opened write-through and kept zero-filled. A new YCSB driver speaks
Raft DB's binary protocol (RaftDBBinClient). Same setup, one run per cell. The PostgreSQL and MongoDB columns are from the earlier run, not
re-measured.
| ops/s | Raft DB HTTP (before) | Raft DB HTTP (now) | Raft DB binary (now) | PostgreSQL | MongoDB |
|---|---|---|---|---|---|
| Load (insert) | 6,557 | 11,843 | 26,199 | 16,049 | 7,579 |
| A | 8,963 | 13,087 | 31,270 | 18,403 | 9,729 |
| B | 13,298 | 14,635 | 43,764 | 29,172 | 16,532 |
| C | 14,192 | 14,453 | 45,290 | 32,041 | 18,245 |
| D | 13,850 | 14,728 | 46,620 | 29,472 | 14,233 |
| F | 7,070 | 9,466 | 24,913 | 15,063 | 6,651 |
Raft DB binary latency (average / p99, us): read C 169 / 465 (PostgreSQL 219 / 386); insert 298 / 460 (PostgreSQL 475 / 1,051); update A 335 / 681 (PostgreSQL 587 / 1,347). PostgreSQL still has the better read p99.
What the comparison concludes#
- On the HTTP path Raft DB is in the range of MongoDB for durable writes (about 85-90 % of it) and about 2x behind PostgreSQL.
- SQLite's reads are not comparable: it runs inside the benchmark's process, with no network or protocol cost.
- About 500 inserts per database in workload E fail with
ERRORbecause workload D already inserted those keys; scan figures are unaffected. - Not measured: CPU, memory and disk bytes per operation, multi-run variance, thread sweeps, larger-than-memory data, kill-and-restart durability.
- Windows only. The write-through gain comes from
FlushFileBuffersbeing expensive on NTFS; do not assume it on Linux (Comparison on Linux).