V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
foonpcf
V2EX  ›  Linux

請問當設置好load balance功能後,怎樣保持兩台資料同步更新 (資料庫及檔案)

  •  
  •   foonpcf · Jun 15, 2013 · 3674 views
    This topic created in 4701 days ago, the information mentioned may be changed or developed.
    10 replies    1970-01-01 08:00:00 +08:00
    Zhang
        1
    Zhang  
       Jun 15, 2013
    将rsync命令保存到脚本了,在用crob定期执行就可以了!
    foonpcf
        2
    foonpcf  
    OP
       Jun 15, 2013 via iPhone
    Zhang謝謝,MySQL應怎樣處理?
    likuku
        3
    likuku  
       Jun 16, 2013
    btsync 作文件同步,或者多机使用同一个nfs-server 提供的资源,mysql 使用 master-slave 同步,记得读写分离。

    mysql 多机写不会,貌似还是个很难的事情。
    foonpcf
        4
    foonpcf  
    OP
       Jun 18, 2013
    用crob的話,如設定* * * * * /path/to/php /var/www/html/a.php,會否出現負載問題?
    Zhang
        5
    Zhang  
       Jun 18, 2013
    MySQL有Duplication功能
    Zhang
        6
    Zhang  
       Jun 18, 2013   ❤️ 1
    说错了,是replication
    foonpcf
        7
    foonpcf  
    OP
       Jun 18, 2013
    @Zhang, 我用crob 設定每分鐘備份,伺服器(CPU)會出現負荷嗎?
    Zhang
        8
    Zhang  
       Jun 18, 2013
    没有尝试过
    Zhang
        9
    Zhang  
       Jun 18, 2013
    听说rsync只会同步改动的部分,所以应该很轻松吧!
    msg7086
        10
    msg7086  
       Jun 18, 2013
    rsync同步速度与文件数相关。数十万个文件同步起来会有性能影响。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1344 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 17:18 · PVG 01:18 · LAX 10:18 · JFK 13:18
    ♥ Do have faith in what you're doing.