zoukankan      html  css  js  c++  java
  • round_robin 的几种取值

     ATS-6 的round_robin可以有4种算法可以选择

    • true

    Traffic Server goes through the parent cache list in a round robin-based on client IP address.

    按照客户端IP进行轮训,如果都是一个客户端发的请求,则每次都会hash到某个指定的parent IP去回源;如果这个hash到的IP宕机了,则会选和这个IP相邻的下一个parent IP进行回源;

    • false 

    Round robin selection does not occur.

    没有轮训的概念,每次选择parent IP的时候都是从头到尾遍历 parent list,只要有一个parent可用就选择这个parent去回源;

    • strict 

    Traffic Server machines serve requests strictly in turn. For example: machine proxy1 serves the first request, proxy2 serves the second request, and so on.

    按照客户端发过来的请求进行轮训,忽略客户端IP来源,第一个请求交给第一个parent去回源,下一个到来的请求会交给相邻的下一个parent去回源,依次轮训parent;(即所有的请求都分散给所有可用的parent了,起到负载均衡的作用); 如果轮到一个parent死掉了,则会选择相邻的下一个parent进行回源;

    • consistent_hash 

    consistent hash of the url so that one parent is chosen for a given url. If a parent is down, the traffic that would go to the down parent is rehashed amongst the remaining parents. The other traffic is unaffected. Once the downed parent becomes available, the traffic distribution returns to the pre-down state.

    按照客户端请求的URL进行一致性hash,请求到来如果miss,那么ATS会通过一致性hash算法选择一个parent并把miss请求交给它; 一旦ATS检测到这个 parent 宕机了,那么会再从剩下的parent节点里再hash出一个新的parent去回源;不会影响响应请求; 后面如果宕掉的那个parent恢复服务能力后,将会进入 pre-down 状态

    作者:Standby一生热爱名山大川、草原沙漠,还有妹子
    出处:http://www.cnblogs.com/standby/

    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    Java学习第一周汇报
    Java暑期学习第八天日报
    Java暑期学习第十天日报
    Java暑期学习第十二天日报
    Java学习第二周汇报
    Java暑期学习第九天日报
    0006 列表(ul、ol、dl)
    0015 行高那些事:lineheight
    0016 CSS 背景:background
    HTTP中GET与POST的区别 99%的错误认识
  • 原文地址:https://www.cnblogs.com/standby/p/6843436.html
Copyright © 2011-2022 走看看