从 leveldb 到分布式 kv 存储系统

本文探讨了LevelDB及其增强版RocksDB的特性,包括多线程压缩、优化的存储结构等,并介绍了基于RocksDB的分布式KV存储系统,如360的Pika和阿里巴巴的Tair。Pika采用多线程模型和BlackWidow引擎,而Tair利用一致性哈希和版本控制实现分布式策略和数据一致性。
摘要由CSDN通过智能技术生成

LevelDB

详细原理见 leveldb 原理解析

RocksDB : enhanced LevelDB

https://rocksdb.org.cn/doc.html
RocksDB是从 levelDB 的某个 commit checkout 出来的,进化版

RocksDB is a C++ library providing an embedded key-value store, where keys and values are arbitrary byte streams. It was developed at Facebook based on LevelDB and provides backwards-compatible support for LevelDB APIs.

RocksDB is optimized for Flash with extremely low latencies. RocksDB uses a Log Structured Database Engine for storage, written entirely in C++. A Java version called RocksJava is currently in development. See RocksJava Basics.

RocksDB features highly flexible configuration settings that may be tuned to run on a variety of production environments, including pure memory, Flash, hard disks or HDFS. It supports various compression algorithms and good tools for production support and debugging.

Features

  1. Designed for application servers wanting to store up to a few terabytes of data on locally attached Flash drives or in RAM
  2. Optimized for storing small to medium size key-values on fast storage – flash devices or in-memory
  3. Scales linearly with number of CPUs so that it works well on processors with many cores

RocksDB Features that are not in LevelDB

Performance

  1. Multithread compaction
  2. Multithread memtable inserts
  3. Reduced DB mutex holding
  4. Optimized level-based compaction style and universal compaction style
  5. Prefix bloom filter
  6. Memtable bloom filter
  7. Single bloom filter covering the whole SST file
  8. Write lock optimization
  9. Improved Iter::Prev() performance
  10. Fewer comparator calls during SkipList searches
  11. Allocate memtable memory using huge page.

Features
12. Column Families
13. Transactions and WriteBatchWithIndex
14. Backup and Checkpoints
15. Merge Operators
16. Compaction Filters
17. RocksDB Java
18. Manual Compactions Run in Parallel with Automatic Compactions
19. Persistent Cache
20. Bulk loading
21. Forward Iterators/ Tailing iterator
22. Single delete
23. Delete files in range
24. Pin iterator

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值