Redis 比 Aerospike 更受欢迎的用例是什么?
我们目前正在使用 Redis,它是一个很棒的内存数据存储.我们开始研究一些新问题,其中内存限制是一个因素,并考虑其他选项.我们遇到的一个是 Aerospike - 它看起来非常快,甚至比内存中单分片操作上的 redis 还要快.
We are currently using Redis and it's a great in-memory datastore. We're starting to look at some new problems where the in-memory limitation is a factor and looking at other option. One we came across is Aerospike - it seems very fast, even faster than redis on in-memory single-shard operation.
既然我们正在将它添加到我们的堆栈中,我正在尝试了解 Aerospike 无法替换 redis 的用例?
Now that we're adding this to our stack, I'm trying to understand the use cases where Aerospike would not be able to replace redis?
Redis:
键/值存储,数据集适合单个机器的 RAM,或者您可以将自己分片到多台机器(和/或内核,因为它是单线程的),将数据持久化到磁盘,具有列表/集合等数据结构,基本 pub/sub,简单的从复制,Lua 脚本.
Key/value store, dataset fits into RAM in single machine or you can shard yourself across multiple machines (and/or cores since it's single-threaded), persists data to disk, has data structures like lists/sets, basic pub/sub, simple slave replication, Lua scripting.
气钉:
键/值行存储(意思是值包含带有值的箱,这些值可以是更多的映射/列表/值以具有多个级别),多线程以使用所有核心,为跨机器集群而构建,可以进行复制,并且可以做跨数据中心复制,UDF 的 Lua 脚本.可以直接在 SSD 上运行,因此您可以存储更多数据而无需将其装入 RAM.
Key/value row-store (meaning value contains bins with values and those values can be more maps/lists/values to have multiple levels), multithreaded to use all cores, built for clustering across machines with replication, and can do cross-datacenter replication, Lua scripting for UDFs. Can run directly on SSDs so you can store much more data without it fitting into RAM.
对比:
如果您只有一个较小的数据集或对单核性能很好,那么 Redis 非常棒.安装快速,运行简单,如果您需要更多读取可扩展性,只需使用 1 个命令即可轻松连接从站.Redis 还具有更多独特的列表/设置/位图操作功能,因此您可以立即执行更多"操作.
If you just have a smaller dataset or are fine with single-core performance then Redis is great. Quick to install, simple to run, easy to just attach a slave with 1 command if you need more read scalability. Redis also has more unique functionality with list/set/bitmap operations so you can do "more" out of the box.
如果您想在单台机器或集群上存储更复杂或嵌套的数据,或者需要更高的性能,那么 Aerospike 可以以更少的运营开销完成出色的工作.非常快的性能和简单的集群设置,所有节点的角色完全相同,因此您可以扩展读取和写入.
If you want to store more complicated or nested data or need more performance on a single machine or clustering, then Aerospike gets the job done really well with less operational overhead. Very fast performance and easy cluster setup with all nodes being exactly the same role so you can scale reads and writes.
这就是最大的不同,可扩展性超出单核或服务器.使用 Lua 脚本,您通常可以将 Redis 具有的任何原生功能填充到 Aerospike 中.如果您有大量数据(例如 TB),那么 Aerospike 的 SSD 功能意味着您可以获得类似 RAM 的性能,而无需花费 RAM.
That's the big difference, scalability beyond a single core or server. With Lua scripting, you can usually fill in any native feature that Redis has into Aerospike. If you have lots of data (like TBs) then Aerospike's SSD feature means you get RAM-like performance without the RAM cost.