Redis AOF和Tarantool WAL日志之间的区别 [英] Difference between Redis AOF and Tarantool WAL log

查看:91
本文介绍了Redis AOF和Tarantool WAL日志之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读有关Tarantool的文章,他们似乎在说AOF和WAL日志工作方式不同.

I was reading this article about Tarantool and they seem to say that AOF and WAL log are not working the same way.

Tarantool:除了快照外,它还具有全面的WAL(预先写入日志).因此,它可以确保每次交易后的数据持久性盒子外面.Redis:实际上,它仅具有快照.从技术上讲您有AOF(仅附加文件,其中写入了所有操作),但它需要对其进行手动控制,包括之后的手动还原重启.简而言之,使用Redis,您需要手动挂起服务器时不时地制作快照并存档AOF.

Tarantool: besides snapshots, it has a full-scale WAL (write ahead log). So it can secure data persistency after each transaction out-of-the-box. Redis: in fact, it has snapshots only. Technically, you have AOF (append-only file, where all the operations are written), but it requires manual control over it, including manual restore after reboot. Simply put, with Redis you need to manually suspend the server now and then, make snapshots and archive AOF.

有人可以更清楚地说明这两种策略之间的区别是什么,以及每种策略在更高层次上的工作方式.

Could someone explain more clearly what is the different between the 2 strategy and how each work at a high level.

我一直以为Redis AOF以相同的方式处理SQL数据库事务日志(例如在Postgresql中实现),但是我可能错了.

I always assumed that Redis AOF was working the same way to a SQL database transaction log such as implemented in Postgresql but I might have been wrong.

推荐答案

AOF是Redis的主要持久性选项.任何时候只要有写操作会修改内存中的数据集,就会记录该操作.因此,在重新启动期间,Redis将重播所有操作以重建数据集.您还可以选择3种不同的fsync配置策略(no,everysec,始终).FWIW,通常建议您在需要较高级别的数据安全性的情况下同时使用AOF + RDB.这超出了您的问题范围,但我想提一提.

AOF is the main persistence option for Redis. Any time there's a write operation that modifies the dataset in memory, that operation is logged. So during a restart, Redis will replay all of the operations to reconstruct the dataset. You also have 3 different fsync configuration policies to choose from (no, everysec, always). FWIW, it is usually advised to use both AOF + RDB in the event you want a good level of data-safety. This is kind of outside of the scope of your question, but figured i'd mention it.

主要Redis持久性文档

Redis持久化神秘化

Tarantool使用一种叫做"WAL writer"的东西.这将在单独的线程中运行,并记录处理数据插入和更新请求"的请求.重新启动后,Tarantool通过读取WAL文件并重播每个请求来恢复.

Tarantool's uses something called a "WAL writer". This will run in a separate thread and log requests that manipulate data "insert and update requests". On restart, Tarantool recovers by reading the WAL file and replaying each of the requests.

Tarantool持久性文档

内部结构上显然存在差异,但从总体上讲,它们非常相似.本文中的持久性比较非常奇怪,根本不正确.

There's a difference in the internals obviously, but at a high level they are pretty similar. The persistence comparison in the article is pretty odd and simply not true.

有关低级差异的更多信息,请参阅上面列出的文档.

For more information on the low level differences, refer to the docs listed above.

希望有帮助

这篇关于Redis AOF和Tarantool WAL日志之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆