Why choose SQLite for DenoKV over alternatives like LevelDB? #26106
thelovekesh
started this conversation in
General
Replies: 1 comment 2 replies
-
I believe there's more to consider than just raw performance. The LevelDB ecosystem isn't as robust, user-friendly, and established as SQLite. This makes SQLite a safer choice to avoid a lot of headaches. Finally, if you are really settled on the idea of using LevelDB (and you need to handle 50k writes/sec in a single box), you can implement a Deno KV backend using LevelDB. BTW: Deno KV uses a FoundationDB backend in Deno deployment. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
DenoKV utilizes SQLite for creating key-value stores and queues. Although SQLite is efficient, why not opt for a more native solution like LevelDB, which is specifically designed as a persistent key-value database?
Although I’m new to this area, I executed a script to read and write records using both DenoKV and LevelDB. Here are the results: I performed one million reads and writes with LevelDB, while I limited DenoKV to 100,000 due to significant slowdowns after 500,000 records.
LevelDB script - 1 million read and and 1 million writes
DenoKV script - 100, 000 reads and 100, 000 writes
The scripts were executed on a machine equipped with 64 GB of DDR5 memory and the following configuration:
I understand there can be various reasons for these results, but from a high-level perspective, LevelDB is significantly faster at its tasks.
Beta Was this translation helpful? Give feedback.
All reactions