AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 950447
Accepted
Younes
Younes
Asked: 2019-01-24 12:41:01 +0800 CST2019-01-24 12:41:01 +0800 CST 2019-01-24 12:41:01 +0800 CST

keepalived:什么是 `fo` 和 `mh` lvs 调度算法?

  • 772

keepalived.conf 中的参数virtual_server.lvs_sched支持两个我找不到解释的选项: fo和md.

有人知道它们的含义吗?

keepalived
  • 1 1 个回答
  • 1189 Views

1 个回答

  • Voted
  1. Best Answer
    HBruijn
    2019-01-25T06:04:25+08:002019-01-25T06:04:25+08:00

    允许的值virtual_server.lvs_sched是 IPVS(IP 虚拟服务器)调度程序的名称。keepalived手册页提到 rr|wrr|lc|wlc|lblc|sh|mh|dh|fo|ovf|lblcr|sed|nq了调度程序的受支持名称,这比原始 IPVS 文档描述的要多得多。

    我不得不看一下内核源代码,以了解那些较新的调度程序是什么:

    • fo是“加权故障转移”——所有其他调度模块都实现了某种形式的负载平衡,而这提供了一个简单的故障转移解决方案。加权故障转移调度算法将网络连接定向到当前可用权重最高的服务器。
      来源:https ://patchwork.ozlabs.org/patch/390597/

    • mh是“磁悬浮哈希”

      /* The mh algorithm is to assign a preference list of all the lookup
       * table positions to each destination and populate the table with
       * the most-preferred position of destinations. Then it is to select
       * destination with the hash key of source IP address through looking
       * up a the lookup table.
       *
      

      该算法详述于:3.4 一致性哈希

    为了完整起见,ipvasdm 手册页提供了其他调度程序的描述:

              scheduling-method   Algorithm for allocating TCP connections and
              UDP datagrams to real servers.  Scheduling algorithms are imple-
              mented as kernel modules. Ten are shipped with the Linux Virtual
              Server:
    
              rr - Robin Robin: distributes jobs equally amongst the available
              real servers.
    
              wrr - Weighted Round Robin: assigns jobs to real servers propor-
              tionally to there real  servers’  weight.  Servers  with  higher
              weights  receive  new  jobs first and get more jobs than servers
              with lower weights. Servers with equal weights get an equal dis-
              tribution of new jobs.
    
              lc  -  Least-Connection:  assigns more jobs to real servers with
              fewer active jobs.
    
              wlc - Weighted Least-Connection: assigns more  jobs  to  servers
              with  fewer  jobs  and  relative  to  the  real  servers’ weight
              (Ci/Wi). This is the default.
    
              lblc - Locality-Based Least-Connection:  assigns  jobs  destined
              for  the same IP address to the same server if the server is not
              overloaded and available; otherwise assign jobs to servers  with
              fewer jobs, and keep it for future assignment.
    
              lblcr   -   Locality-Based  Least-Connection  with  Replication:
              assigns jobs destined for the same IP address to the  least-con-
              nection  node  in  the server set for the IP address. If all the
              node in the server set are over loaded, it picks up a node  with
              fewer  jobs  in the cluster and adds it in the sever set for the
              target. If the server set has not been modified for  the  speci-
              fied  time, the most loaded node is removed from the server set,
              in order to avoid high degree of replication.
    
              dh - Destination Hashing: assigns jobs to servers through  look-
              ing  up a statically assigned hash table by their destination IP
              addresses.
    
              sh - Source Hashing: assigns jobs to servers through looking  up
              a statically assigned hash table by their source IP addresses.
    
              sed  -  Shortest  Expected Delay: assigns an incoming job to the
              server with the shortest expected delay. The expected delay that
              the  job  will  experience  is (Ci + 1) / Ui if  sent to the ith
              server, in which Ci is the number of jobs on the the ith  server
              and Ui is the fixed service rate (weight) of the ith server.
    
              nq  -  Never Queue: assigns an incoming job to an idle server if
              there is, instead of waiting for a fast one; if all the  servers
              are busy, it adopts the Shortest Expected Delay policy to assign
              the job.
    
    • 2

相关问题

  • 当两台 HAProxy 服务器中只有一台关闭时系统中断。故障转移似乎不起作用

  • keepalived track_script 从不运行

  • HAProxy/Keepalived 和 DNS

  • 防止 VRRP Master 在失败后成为 Master

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve