In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the difference between redis persistence, the introduction in the article is very detailed, has a certain reference value, interested friends must read it!
Redis is an advanced key-value database. It is similar to memcached, but data can be persisted and the supported data types are rich. There are strings, lists, sets and ordered sets. Support server-side computation of set union, intersection and complement (difference), etc., but also support a variety of sorting functions. Redis can also be considered a data structure server.
All data in Redis is stored in memory and then asynchronously saved to disk from time to time (this is called "semi-persistent mode"); each data change can also be written to an append only file(aof)(this is called "fully persistent mode").
Because Redis data are stored in memory, if there is no configuration persistence, all data will be lost after redis restart, so you need to turn on the persistence function of redis and save the data to the magnetic disk. When redis restarts, you can recover the data from the disk.
Redis provides two ways to persist, one is RDB persistence (the principle is to dump Reids database records in memory to RDB persistence on disk at regular intervals), and the other is AOF (append only file) persistence (the principle is to write Reids operation logs to files in an appended manner). So what's the difference between these two persistence methods, and how do you choose them?
difference
RDB persistence refers to writing a snapshot of a dataset in memory to disk within a specified time interval. The actual operation process is to fork a child process, first write the dataset to a temporary file, and then replace the previous file after writing successfully, and store it with binary compression.
AOF persistence records every write and delete operation handled by the server in the form of logs. Query operations are not recorded, but recorded in text. You can open the file to see detailed operation records.
The above is what the difference between redis persistence is all about. Thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.