database - 是否有类似 Redis DB 的东西,但不受 RAM 大小的限制?

标签 database redis nosql bigdata

<分区>

我正在寻找符合这些条件的数据库:

  • 可能是非持久性的;
  • DB的几乎所有key都需要3-6小时更新一次(100M+ key,总大小100Gb)
  • 能够通过键(或主键)快速选择数据
  • 这需要是一个 DBMS(所以 LevelDB 不适合)
  • 写入数据时,数据库集群必须能够服务于查询(但可以阻塞单个节点)
  • 不在内存中——我们的数据集将超过 RAM 限制
  • 水平扩展和复制
  • 支持所有数据的完全重写(MongoDB删除数据后不清理空间)
  • C# 和 Java 支持

这是我使用此类数据库的过程: 我们有一个分析集群,每 4-6 小时生成 1 亿条记录 (50GB) 的数据。数据是“key - array[20]”。这些数据需要通过前端系统以每秒 1-10k 请求的速率分发给用户。平均只有约 15% 的数据被请求,其余数据将在 4-6 小时内在下一个数据集生成时被重写。

我尝试了什么:

  1. MongoDB。数据存储开销、高碎片整理成本。
  2. Redis。看起来很完美,但它受 RAM 的限制,而我们的数据超出了它。

那么问题来了:有没有像 Redis 一样,但不受 RAM 大小限制的东西?

最佳答案

是的,有两种 Redis 的替代方案,它们不受 RAM 大小的限制,同时保持与 Redis 协议(protocol)兼容:

Ardb (C++),复制(主-从/主-主):https://github.com/yinqiwen/ardb

A redis-protocol compatible persistent storage server, support LevelDB/KyotoCabinet/LMDB as storage engine.

Edis(二郎):https://github.com/cbd/edis

Edis is a protocol-compatible Server replacement for Redis, written in Erlang. Edis's goal is to be a drop-in replacement for Redis when persistence is more important than holding the dataset in-memory. Edis (currently) uses Google's leveldb as a backend.

为了完整起见,这里还有另一个数据结构数据库:

Hyperdex(字符串、整数、 float 、列表、集合、映射):http://hyperdex.org/doc/latest/DataTypes/#chap:data-types

HyperDex is:

  • Fast: HyperDex has lower latency, higher throughput, and lower variance than other key-value stores.
  • Scalable: HyperDex scales as more machines are added to the system.
  • Consistent: HyperDex guarantees linearizability for key-based operations. Thus, a read always returns the latest value inserted into the system. Not just “eventually,” but immediately and always.
  • Fault Tolerant: HyperDex automatically replicates data on multiple machines so that concurrent failures, up to an application-determined limit, will not cause data loss. Searchable:
  • HyperDex enables efficient lookups of secondary data attributes.
  • Easy-to-Use: HyperDex provides APIs for a variety of scripting and native languages.
  • Self-Maintaining: A HyperDex is self-maintaining and requires little user maintenance.

关于database - 是否有类似 Redis DB 的东西,但不受 RAM 大小的限制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18447380/

相关文章:

java - 使用 Vertx 时用于 Redis 的 ORM 框架

java - 如何使用 Spring Data 在 Redis 哈希表中搜索具有特定值的实体?

mysql - 这是 MySQL 的良好做法吗

java - 如何创建具有离线和在线数据库并定期同步的 Java 桌面应用程序?

SQL 为嵌套选择创建别名列?

cassandra - Cassandra 中的宽行与集合

python - 在mongodb中保存numpy数组

mysql - 如何在 SQL 中创建多语言 Unicode 文本属性?

nginx lua redis cookie 未设置

sql - Phoenix 映射现有的 HBase 表