zoukankan      html  css  js  c++  java
  • 【redis】无磁盘化传输

    都知道在使用Redis主从复制的时候,数据传输是通过master节点启动一个进程生成RDB文件然后把这个文件通过网络传输给slave节点。

    实际上主从复制传输RDB有两种方式:

    # 1) Disk-backed: The Redis master creates a new process that writes the RDB
    #                 file on disk. Later the file is transferred by the parent
    #                 process to the slaves incrementally.
    # 2) Diskless: The Redis master creates a new process that directly writes the
    #              RDB file to slave sockets, without touching the disk at all.
    
    
    • 磁盘化传输: Redis主进程创建一个编写RDB的新进程放入磁盘文件。稍后,文件由父进程传输进程以增量的方式传递给从进程

    • 无磁盘化传输
      无磁盘化传输,就是master会创建一个新的进程生成RDB文件,并且通过socket传输给slave节点,不会经过磁盘

    如何设置

    默认是磁盘话传输,如果要修改成无磁盘话传输,则修改

    repl-diskless-sync yes
    

    无磁盘化传输适合,服务器磁盘性能低,但是网络好的情况

  • 相关阅读:
    python GUI
    Python 博客网站资源
    Python 100 天学习计划
    pycharm基本设置
    MySQL 57安装部署(Zip版)(Windows版)
    nginx在centos下的安装
    仓位计算
    python笔记
    vue(一)--监听事件
    Hibernate(五)--级联
  • 原文地址:https://www.cnblogs.com/amberbar/p/12994435.html
Copyright © 2011-2022 走看看