zoukankan      html  css  js  c++  java
  • keeplive 和 heartbeat 的区别

    https://serverfault.com/questions/361071/what-is-the-difference-between-keepalive-and-heartbeat

    http://www.formilux.org/archives/haproxy/1003/3259.html

    上面两篇博客内容告诉我们

    keeplive 更注重冗余网络的建设,确保同一时间只有一个共享IP,注重IP 地址 

    heartbeat 更注重于服务集群的搭建。但是目前更多的网络设备,安全设备,负载设备更多的使用 heartbeat ,提供更多的服务冗余机制和故障迁移参数。

    所谓的电口的心跳也是heartbeat 的功能。不是某个设备的功能

    Believe the question has been very precisely answered by Willy Tarreau, the author of HAProxy, in http://www.formilux.org/archives/haproxy/1003/3259.html.我相信这个问题已经由《哈普洛西》一书的作者威利·塔罗(Willy Tarreau)在年准确地回答了http://www.formilux.org/archives/haproxy/1003/3259.html.

    Citation from the above link引文来自上述链接

    Heartbeat is not the best tool to get a redundant haproxy setup, it was designed to build clusters, which is a lot different from having two redundant stateless network equipments. Network oriented tools such as keepalived or ucarp are the best suited for that taskHeartbeat不是获得冗余haproxy设置的最佳工具,它被设计用于构建集群,这与拥有两个冗余无状态网络设备有很大不同。面向网络的工具,如Keepalive或ucarp,最适合该任务

    The difference between those two families is simple这两个家庭之间的区别很简单

    1. a cluster-oriented product such as heartbeat will ensure that a shared resource will be present at at most one place. This is very important for shared filesystems, disks, etc... It is designed to take a service down on one node and up on another one during a switchover. That way, the shared resource may never be concurrently accessed. This is a very hard task to accomplish and it does it well.
    2. 诸如heartbeat之类的面向集群的产品将确保共享资源最多出现在一个地方。这对于共享文件系统、磁盘等非常重要。。。它的设计目的是在切换过程中在一个节点上关闭服务,在另一个节点上启动服务。这样,共享资源可能永远不会被并发访问。这是一项很难完成的任务,而且做得很好。
    3. a network-oriented product such as keepalived will ensure that a shared IP address will be present at at least one place. Please note that I'm not talking about a service or resource anymore, it just plays with IP addresses. It will not try to down or up any service, it will just consider a certain number of criteria to decide which node is the most suited to offer the service. But the service must already be up on both nodes. As such, it is very well suited for redundant routers, firewalls and proxies, but not at all for disk arrays nor filesystems.
    4. 面向网络的产品(如KeepAlive)将确保至少有一个共享IP地址存在。请注意,我不再谈论服务或资源,它只是在玩IP地址。它不会尝试降低或提升任何服务,它只考虑一定数量的标准来决定哪个节点是最适合提供服务的。但服务必须已在两个节点上启动。因此,它非常适合冗余路由器、防火墙和代理,但根本不适合磁盘阵列或文件系统。

    There is no clear, consistent differentiation. Those words are sometimes used more or less interchangeably.没有明确、一致的区别。这些词有时或多或少可以互换使用。

    There is a common userland deamon for high availability setups called Keepalived, and the Linux HA project used to have a deamon called Heartbeat, which has now changed to Pacemaker. (I trust you didn't ask for a complete overview of those two systems, and what all the differences are, that would IMHO be off topic.)对于高可用性设置,有一个通用的userland deamon,名为Keepalive,Linux HA项目过去有一个deamon,名为Heartbeat,现在改为Pacemaker。(我相信你没有要求对这两个系统进行全面的概述,以及所有的区别是什么,这将是离题的。)

    In daily use of the terms, I would say the most common use is that:在日常使用中,我想说最常见的用法是:

    • "Keepalive" refers more generally to a system which keeps a service highly available.“Keepalive”更一般地指的是保持服务高度可用的系统。

    • "Heartbeat" refers more specifically to a communication protocol, where to or more members of a high-availability setup periodically send "Yes, I'm still alive!" messages. Their peers then take action if they don't see a "Yes, I'm alive" message before a set time (i.e. the other host has gone down). This is a bit like feeling for a pulse, hence the name.“Heartbeat”更具体地说是指通信协议,在该协议中,高可用性设置的一个或多个成员会定期发送“是的,我还活着!”信息。然后,如果他们在设定的时间之前没有看到“Yes,I'm alive”(是的,我还活着)消息(即,另一台主机已停机),他们的同龄人会采取行动。这有点像感觉脉搏,因此得名。

  • 相关阅读:
    字典树略解
    NOIP2018普及组初赛解题报告
    Codeforces 23A You're Given a String...
    远程消息推送的简单方法
    IOS5,6,7的新特性
    面试问题1
    IOS推送消息的步骤
    C面试问题
    label的自适应文本,让文本自适应
    TCP连接的三次握手,TCP/UDP区别联系,socket连接和http连接的区别
  • 原文地址:https://www.cnblogs.com/zy09/p/15783293.html
Copyright © 2011-2022 走看看