简介

作者: ZMRWEGo | 来源:发表于2019-06-28 19:08 被阅读0次
    1. 优秀的负载均衡算法
      理想状态下,负载均衡算法应该能够最小化服务响应时间(RTT),使系统吞吐量最高,从而保持高性能服务能力。
      自适应负载均衡是指负载均衡算法能够根据服务能力动态的进行流量调度,无论当系统处在空闲、稳定还是繁忙状态,系统都可以保持较好的性能,不会产生饥饿或者宕机。
    2. 目标
    • 保证系统稳定性,任何情况下服务都不能被打挂;
    • 保证请求成功率,尽可能的让更多的请求在较短的时间内被处理;
    • 尽可能避免因重试导致流量被过度放大。
    • 为降低难度,本次比赛题目只使用了一个 Consumer。但负载均衡算法应该是可扩展的,需要考虑多 Consumer 和多 Provider 的情况。
    1. wrk压测参数
      https://dearhwj.gitbooks.io/itbook/test/performance_test_qps_tps.html

    示例
    wrk -t4 -c1024 -d90s -T5 --script=./wrk.lua --latency http://localhost:8087/invoke

    
    
    -c, --connections: total number of HTTP connections to keep open with
                       each thread handling N = connections/threads
    
    -d, --duration:    duration of the test, e.g. 2s, 2m, 2h
    
    -t, --threads:     total number of threads to use
    
    -s, --script:      LuaJIT script, see SCRIPTING
    
    -H, --header:      HTTP header to add to request, e.g. "User-Agent: wrk"
    
        --latency:     print detailed latency statistics
    
        --timeout:     record a timeout if a response is not received within
                       this amount of time.
    
    1. 制定provider启动参数
      -Dquota=large 、-Dquota=medium、-Dquota=small
    对应的端口号
    large 890
    medium 870
    small 880
    

    相关文章

      网友评论

          本文标题:简介

          本文链接:https://www.haomeiwen.com/subject/yytscctx.html