search

Home  >  Q&A  >  body text

Redis 如何避免数据丢失

Redis 如何才可以避免因为突然断电/系统死机等突发情况而丢失数据呢?

阿神阿神2798 days ago762

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-22 08:58:26

    1. Master and slave are necessary, but the proxy of redis is not stable yet. If the master and slave are abnormal, you have to switch manually
    2. Persistence, adjust the persistence parameters according to the frequency of data changes and the amount of data, and choose RDB or AOF for persistence
    3. However, if you are doing caching, it is best to rebuild it from the business. The avalanche problem can be solved by resuming business in batches
    4. There is an ssdb in China. Personal test results show that ssdb can have about 20% of the performance of redis, but the cluster is better and can be used to replace redis in some projects. http://ssdb.io/

    reply
    0
  • Cancelreply