關於haproxy會話保持
文檔上有寫haproxy具有會話保持功能,怎麼保證的呢?
有人做過相關的測試嗎?
source The source IP address is hashed and divided by the total
weight of the running servers to designate which server will
receive the request. This ensures that the same client IP
address will always reach the same server as long as no
server goes down or up. If the hash result changes due to the
number of running servers changing, many clients will be
directed to a different server. This algorithm is generally
used in TCP mode where no cookie may be inserted. It may also
be used on the Internet to provide a best-effort stickyness
to clients which refuse session cookies. This algorithm is
static, which means that changing a server's weight on the
fly will have no effect.
看文檔應該就是這個負載均衡演算法選項可以完成session保持吧
《解決方案》
回復 #1 nbaloverme 的帖子
http://cn.haproxy.org/