Node.js uses the database LevelDB: ultra-high performance kv storage engine

submited by
Style Pass
2021-05-22 09:02:06

Node.js is designed to do fast and efficient network I/O. Its event-driven flow makes it an ideal choice for intelligent agents, often as the glue between the back-end system and the front-end. Node was originally designed to achieve this goal, but at the same time, it has been successfully used to build traditional web applications: an HTTP server that responds to HTML pages or JSON messages, and uses a database to store data.

Although other platforms and languages ​​have more mature web frameworks and prefer to use open source relational databases, such as MySQL or PostgreSQL, most Node web frameworks (such as Express, Hapi, etc.) do not force the use of any specific database, or even not at all. Mandatory use of any type of database. Yesterday, LevelDB was mentioned in the article "On the implementation of front-end abnormal monitoring platform". Today I will introduce this ultra-high performance Key-Value database LevelDB. The more popular one of the same type is MongoDB. This article will not introduce MongoDB for the time being.

LevelDB is an ultra-high performance Key-Value storage engine open sourced by legendary Google engineers Jeff Dean and Sanjay Ghemawat. With its amazing read performance and more amazing write performance, it stands out among the lightweight NoSql databases. This open source project currently supports A C++ library that handles persistent storage of key-value data at the billion-level scale. With excellent performance, the memory footprint is also very small, and a large amount of data is stored directly on the disk, which can be understood as trading space for time.

Leave a Comment