haproxy 基于 hdr 实现调度

frontend webserver
        bind *:80
        use_backend websrvs

backend websrvs
        balance hdr (User-Agent)    # 根据请求报文中 User-Agent 首部的值做 hash
        hash-type consistent    # 一致性 hash
        server web1 192.168.2.11:80 check
        server web2 192.168.2.12:80 check

  

原文地址:https://www.cnblogs.com/ckh2014/p/15777641.html