zoukankan      html  css  js  c++  java
  • LVS与其他负载均衡软件的区别

    有人在邮件列表问haproxy的作者为何haproxy无论是tcp模式还是http模式,能支撑的并发量都不是太大。

    Willy回答了这个问题。
     
    Exactly. The difference is between LBs that process a stream and which
    are proxy-based,
    and the ones which process packets and are basically
    routers
    . In order to parse and modify a stream, you need some memory,
    while you don't need this to route packets (beyond the routing queue).
    L4 load balancers often store a session table which is a few hundreds
    of bytes per session, as opposed to a few tens of kB of buffers for
    proxies. However, L4 LBs have to deal with TIME_WAIT, which proxies
    don't since it's done in the system, so in practice, the ratio is not
    really tens-of-thousands to millions but rather tens-of-thousands to
    hundreds-of-thousands when the connection rate are high.

    > and why in HAProxy
    > you can have "only" thousends of connections while LVS like LBs can
    > annouce millions...
    > So in haproxy, whatever the mode, tcp or http, you'll always have
    > thousends of connexions.

    In fact it depends a lot on the configured memory and on the kernel
    tuning. With todays 64-bit systems and cheap RAM, there's plenty of
    margin. We had one user who reported 1 million established connections
    in a bench, and several ones reported more than 300k in production. In
    Linux, by default, processes are limited to 1 million FDs so you need
    to patch the kernel or to run in multi-process mode for this. I assume
    it's not that crazy to run several processes when you have to deal with
    1 million concurrent connections :-)
     
     
    if you don't need any form of session persistence or content switching,
    LVS might be more suited for this usage.
  • 相关阅读:
    NSAttributedString可以强制转换为NSMutableAttributedString类型吗?下面这代码有什么问题 为什么报错
    jQuery中.bind() .live() .delegate() .on()的区别 和 三种方式写光棒事件 动画
    锋利的jQuery中的事件与动画
    使用jQuery快速高效制作网页交互特效
    Java中abstract和interface的区别
    一期结业KTV项目难点
    类和对象
    循环结构进阶
    Java中的数组
    Java初始化
  • 原文地址:https://www.cnblogs.com/duanxz/p/4225393.html
Copyright © 2011-2022 走看看