记录Redis重新记录AOF,重启记录重新告知(redis 重置 aof)

Redis is an open source, data structure server that is popularly used because of its high performance, advanced features, and scalability. It can be used to store key-value data, lists, hashes, sets and other data structures. As an in-memory data store, Redis requires that all data is stored in memory to ensure maximum performance. Redis can also store data on disk for persistence.

创新互联建站专注于企业营销型网站、网站重做改版、新邵网站定制设计、自适应品牌网站建设、H5响应式网站商城网站建设、集团公司官网建设、成都外贸网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为新邵等各大城市提供网站开发制作服务。

In some cases, when Redis is restarted, the data does not persist and is lost, so Redis provides persistency and durability through the redis append-only-file (AOF). The AOF is a log-structured format which continuously updates with every write operation to Redis which is then stored on disk. When Redis is restarted, the contents of the AOF are entered into the new Redis process which re-creates the Redis data store.

Recording AOF happens periodically and can also be triggered manually. There are two ways to trigger an AOF rewrite:

• By running the SAVE command: This command forces an AOF rewrite.

• By changing the auto-AOF-rewrite-percentage setting: This setting controls when a rewrite is automatically triggered. When the size of the AOF increases past the auto-AOF-rewrite-percentage value, an AOF rewrite will be triggered automatically.

The AOF rewrite can be disabled. To do this, the no-appendfsync-on-rewrite configuration setting must be set to “yes”.

Once the configuration settings for AOF recording and rewriting have been set up, Redis can be restarted. On restart, Redis will open the AOF file and execute the log of operations on it, re-creating the Redis data store. The AOF file will be re-recorded on every restart so that the data within it is up-to-date.

In summary, Redis provides durability through the use of the AOF recording and rewriting. Recording the AOF ensures that data is not lost when Redis is restarted, and rewriting the AOF ensures that it is up-to-date. This process happens automatically when Redis is restarted and must be configured correctly in order to work correctly.

成都服务器托管选创新互联,先上架开通再付费。
创新互联(www.cdcxhl.com)专业-网站建设,软件开发老牌服务商!微信小程序开发,APP开发,网站制作,网站营销推广服务众多企业。电话:028-86922220


分享名称:记录Redis重新记录AOF,重启记录重新告知(redis 重置 aof)
URL链接:http://www.gydahua.com/article/djphdpo.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流