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

如果根据日志实现故障转移

  •  
  •   wjdfx · May 18, 2018 · 2861 views
    This topic created in 2909 days ago, the information mentioned may be changed or developed.

    跟大伙请教一个问题,我有两个 linux 系统,做主备,两台 linux 系统分别有一个程序在上边跑( BTCCOIN 节点),它会生成日志(区块高度),日志中有一个关键字是 height= XXX。

    还有应用 JS 应用程序在请求这两个 linux 系统的 RPC 服务。

    我想对这两台 linux 做个故障转移,平时 JS 应用程序请求主服务器的 RPC 服务。对主服务器进行监控,当主服务器 linux 当中的日志跟我从第三方网站 API 的 height 不同,或者低于第三方网站 API 的 height 太多的时候,就故障转移到备服务器 linux 上。

    跟据日志实现 JS 应用程序请求这两台 linux 的故障转移。这情况情况有什么成熟的解决方案吗?

    第三方网站 API: https://chain.api.btc.com/v3/block/latest?_ga=2.219671129.1780545720.1526450659-798722702.1525663830

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2910 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 09:12 · PVG 17:12 · LAX 02:12 · JFK 05:12
    ♥ Do have faith in what you're doing.