You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Miles Libbey <ml...@apache.org> on 2016/11/02 16:21:09 UTC

parent.config documentation questions

Hey folks-

I'd like to update the parent.config documentation to include the
weightings feature -- there is an example that shows it, but no text
that describes it.  So, I have some questions :)

- I assume that if someone includes a weight for each parent, the
round robin=true turns into weighted round robin. I'd guess that ATS
will sum the weighted values of all the parents, then send each parent
(its value)/(sum of weights) of the traffic. True? In the example
(p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
traffic, and p2 would get the remaining 2/3rds?

- In https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html#examples
, there is an example that has a weighting, even though the selection
strategy is consistent hash. How does that work? Do the parents just
get added to the ring that percentage more time? Like in the example,
p1 gets added to the ring 1 time, and p2 gets added 2 times?

- Does the weighting affect round_robin=strict and latched?

- Is there a max value to the weighting? Anything special about the
decimal (for instance, is there a limit to the precision?)

Also, what is the difference between round_robin=true and round_robin=strict?

thanks!

miles

Re: parent.config documentation questions

Posted by James Peach <jp...@apache.org>.
> On Nov 3, 2016, at 3:09 PM, John Rushford <jj...@gmail.com> wrote:
> 
> Miles,
> 
> The weight parameter was added as part of the consistent hash feature added
> to parent selection with TS-2996.  It was never intended for the other
> round robin strategies.
> 
> yes, for round robin = true, a client will always get the same parent until
> that parent fails and is marked down.  When the parent fails, the next
> available parent would then be selected.

Isn’t that the latched strategy from TS-4701?

> 
> On Thu, Nov 3, 2016 at 11:47 AM, Miles Libbey <ml...@gmail.com> wrote:
> 
>> On Wed, Nov 2, 2016 at 10:40 AM, John Rushford <jj...@gmail.com>
>> wrote:
>>> Miles,
>>> 
>>> The weight is only used for round_robin = consistent_hash.  It is
>> ignored for all other strategies.
>>> In the consistent hash strategy, weight defaults to 1 and it’s a
>> multiplier to the number of replicas of
>>> A parent inserted alon the hash ring.
>> 
>> Is there a reason why it was only applied to consistent hash? I think
>> this is too complex to explain currently.
>> 
>>> Round_robin=true returns a parent from an array where parent =
>> client_ip_addr % num_parents.
>> 
>> I don't understand what that means. Does it effectively pin a parent
>> to a particular Client IP?
>> 
>>> Round_robin=strict is just a strict round roubin over the array of
>> parents.
>>> 
>>> Thanks
>>> John Rushford
>>> jrushford@apache.org
>>> 
>>> On 11/2/16, 10:21 AM, "Miles Libbey" <ml...@apache.org> wrote:
>>> 
>>>    Hey folks-
>>> 
>>>    I'd like to update the parent.config documentation to include the
>>>    weightings feature -- there is an example that shows it, but no text
>>>    that describes it.  So, I have some questions :)
>>> 
>>>    - I assume that if someone includes a weight for each parent, the
>>>    round robin=true turns into weighted round robin. I'd guess that ATS
>>>    will sum the weighted values of all the parents, then send each
>> parent
>>>    (its value)/(sum of weights) of the traffic. True? In the example
>>>    (p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
>>>    traffic, and p2 would get the remaining 2/3rds?
>>> 
>>>    - In https://docs.trafficserver.apache.org/en/latest/admin-
>> guide/files/parent.config.en.html#examples
>>>    , there is an example that has a weighting, even though the selection
>>>    strategy is consistent hash. How does that work? Do the parents just
>>>    get added to the ring that percentage more time? Like in the example,
>>>    p1 gets added to the ring 1 time, and p2 gets added 2 times?
>>> 
>>>    - Does the weighting affect round_robin=strict and latched?
>>> 
>>>    - Is there a max value to the weighting? Anything special about the
>>>    decimal (for instance, is there a limit to the precision?)
>>> 
>>>    Also, what is the difference between round_robin=true and
>> round_robin=strict?
>>> 
>>>    thanks!
>>> 
>>>    miles
>>> 
>>> 
>>> 
>>> 
>> 
> 
> 
> 
> -- 
> John Rushford
> jjrushford@gmail.com


Re: parent.config documentation questions

Posted by John Rushford <jj...@gmail.com>.
Miles,

The weight parameter was added as part of the consistent hash feature added
to parent selection with TS-2996.  It was never intended for the other
round robin strategies.

yes, for round robin = true, a client will always get the same parent until
that parent fails and is marked down.  When the parent fails, the next
available parent would then be selected.

On Thu, Nov 3, 2016 at 11:47 AM, Miles Libbey <ml...@gmail.com> wrote:

> On Wed, Nov 2, 2016 at 10:40 AM, John Rushford <jj...@gmail.com>
> wrote:
> > Miles,
> >
> > The weight is only used for round_robin = consistent_hash.  It is
> ignored for all other strategies.
> > In the consistent hash strategy, weight defaults to 1 and it’s a
> multiplier to the number of replicas of
> > A parent inserted alon the hash ring.
>
> Is there a reason why it was only applied to consistent hash? I think
> this is too complex to explain currently.
>
> > Round_robin=true returns a parent from an array where parent =
> client_ip_addr % num_parents.
>
> I don't understand what that means. Does it effectively pin a parent
> to a particular Client IP?
>
> > Round_robin=strict is just a strict round roubin over the array of
> parents.
> >
> > Thanks
> > John Rushford
> > jrushford@apache.org
> >
> > On 11/2/16, 10:21 AM, "Miles Libbey" <ml...@apache.org> wrote:
> >
> >     Hey folks-
> >
> >     I'd like to update the parent.config documentation to include the
> >     weightings feature -- there is an example that shows it, but no text
> >     that describes it.  So, I have some questions :)
> >
> >     - I assume that if someone includes a weight for each parent, the
> >     round robin=true turns into weighted round robin. I'd guess that ATS
> >     will sum the weighted values of all the parents, then send each
> parent
> >     (its value)/(sum of weights) of the traffic. True? In the example
> >     (p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
> >     traffic, and p2 would get the remaining 2/3rds?
> >
> >     - In https://docs.trafficserver.apache.org/en/latest/admin-
> guide/files/parent.config.en.html#examples
> >     , there is an example that has a weighting, even though the selection
> >     strategy is consistent hash. How does that work? Do the parents just
> >     get added to the ring that percentage more time? Like in the example,
> >     p1 gets added to the ring 1 time, and p2 gets added 2 times?
> >
> >     - Does the weighting affect round_robin=strict and latched?
> >
> >     - Is there a max value to the weighting? Anything special about the
> >     decimal (for instance, is there a limit to the precision?)
> >
> >     Also, what is the difference between round_robin=true and
> round_robin=strict?
> >
> >     thanks!
> >
> >     miles
> >
> >
> >
> >
>



-- 
John Rushford
jjrushford@gmail.com

Re: parent.config documentation questions

Posted by John Rushford <jj...@gmail.com>.
Miles,

The weight is part of the consistent hash feature added to parent selection in TS-2996.  I suppose they
Did not wish to change the behavior of the round robin methods when consistent has was added.

For round robin=true a client will always get the same parent.  If the parent cannot be reached,
It will be marked down and another will be selected from the parents list.  


Thanks
John
jrushford@apache.org

On 11/3/16, 11:47 AM, "Miles Libbey" <ml...@gmail.com> wrote:

    On Wed, Nov 2, 2016 at 10:40 AM, John Rushford <jj...@gmail.com> wrote:
    > Miles,
    >
    > The weight is only used for round_robin = consistent_hash.  It is ignored for all other strategies.
    > In the consistent hash strategy, weight defaults to 1 and it’s a multiplier to the number of replicas of
    > A parent inserted alon the hash ring.
    
    Is there a reason why it was only applied to consistent hash? I think
    this is too complex to explain currently.
    
    > Round_robin=true returns a parent from an array where parent = client_ip_addr % num_parents.
    
    I don't understand what that means. Does it effectively pin a parent
    to a particular Client IP?
    
    > Round_robin=strict is just a strict round roubin over the array of parents.
    >
    > Thanks
    > John Rushford
    > jrushford@apache.org
    >
    > On 11/2/16, 10:21 AM, "Miles Libbey" <ml...@apache.org> wrote:
    >
    >     Hey folks-
    >
    >     I'd like to update the parent.config documentation to include the
    >     weightings feature -- there is an example that shows it, but no text
    >     that describes it.  So, I have some questions :)
    >
    >     - I assume that if someone includes a weight for each parent, the
    >     round robin=true turns into weighted round robin. I'd guess that ATS
    >     will sum the weighted values of all the parents, then send each parent
    >     (its value)/(sum of weights) of the traffic. True? In the example
    >     (p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
    >     traffic, and p2 would get the remaining 2/3rds?
    >
    >     - In https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html#examples
    >     , there is an example that has a weighting, even though the selection
    >     strategy is consistent hash. How does that work? Do the parents just
    >     get added to the ring that percentage more time? Like in the example,
    >     p1 gets added to the ring 1 time, and p2 gets added 2 times?
    >
    >     - Does the weighting affect round_robin=strict and latched?
    >
    >     - Is there a max value to the weighting? Anything special about the
    >     decimal (for instance, is there a limit to the precision?)
    >
    >     Also, what is the difference between round_robin=true and round_robin=strict?
    >
    >     thanks!
    >
    >     miles
    >
    >
    >
    >
    
    



Re: parent.config documentation questions

Posted by Miles Libbey <ml...@gmail.com>.
On Wed, Nov 2, 2016 at 10:40 AM, John Rushford <jj...@gmail.com> wrote:
> Miles,
>
> The weight is only used for round_robin = consistent_hash.  It is ignored for all other strategies.
> In the consistent hash strategy, weight defaults to 1 and it’s a multiplier to the number of replicas of
> A parent inserted alon the hash ring.

Is there a reason why it was only applied to consistent hash? I think
this is too complex to explain currently.

> Round_robin=true returns a parent from an array where parent = client_ip_addr % num_parents.

I don't understand what that means. Does it effectively pin a parent
to a particular Client IP?

> Round_robin=strict is just a strict round roubin over the array of parents.
>
> Thanks
> John Rushford
> jrushford@apache.org
>
> On 11/2/16, 10:21 AM, "Miles Libbey" <ml...@apache.org> wrote:
>
>     Hey folks-
>
>     I'd like to update the parent.config documentation to include the
>     weightings feature -- there is an example that shows it, but no text
>     that describes it.  So, I have some questions :)
>
>     - I assume that if someone includes a weight for each parent, the
>     round robin=true turns into weighted round robin. I'd guess that ATS
>     will sum the weighted values of all the parents, then send each parent
>     (its value)/(sum of weights) of the traffic. True? In the example
>     (p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
>     traffic, and p2 would get the remaining 2/3rds?
>
>     - In https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html#examples
>     , there is an example that has a weighting, even though the selection
>     strategy is consistent hash. How does that work? Do the parents just
>     get added to the ring that percentage more time? Like in the example,
>     p1 gets added to the ring 1 time, and p2 gets added 2 times?
>
>     - Does the weighting affect round_robin=strict and latched?
>
>     - Is there a max value to the weighting? Anything special about the
>     decimal (for instance, is there a limit to the precision?)
>
>     Also, what is the difference between round_robin=true and round_robin=strict?
>
>     thanks!
>
>     miles
>
>
>
>

Re: parent.config documentation questions

Posted by "Rushford, John" <Jo...@comcast.com>.
Hi Eric,

I can't think of any reason to use .990 over 1.0.

John
________________________________________
From: Eric Friedrich (efriedri) <ef...@cisco.com>
Sent: Wednesday, November 2, 2016 6:46 PM
To: dev@trafficserver.apache.org
Subject: Re: parent.config documentation questions

Thanks John-
  In Traffic Control we use a weight of .990. Is there any reason to use this value instead of a 1.0 weight?

—Eric


> On Nov 2, 2016, at 1:40 PM, John Rushford <jj...@gmail.com> wrote:
>
> Miles,
>
> The weight is only used for round_robin = consistent_hash.  It is ignored for all other strategies.
> In the consistent hash strategy, weight defaults to 1 and it’s a multiplier to the number of replicas of
> A parent inserted alon the hash ring.
>
> Round_robin=true returns a parent from an array where parent = client_ip_addr % num_parents.
>
> Round_robin=strict is just a strict round roubin over the array of parents.
>
> Thanks
> John Rushford
> jrushford@apache.org
>
> On 11/2/16, 10:21 AM, "Miles Libbey" <ml...@apache.org> wrote:
>
>    Hey folks-
>
>    I'd like to update the parent.config documentation to include the
>    weightings feature -- there is an example that shows it, but no text
>    that describes it.  So, I have some questions :)
>
>    - I assume that if someone includes a weight for each parent, the
>    round robin=true turns into weighted round robin. I'd guess that ATS
>    will sum the weighted values of all the parents, then send each parent
>    (its value)/(sum of weights) of the traffic. True? In the example
>    (p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
>    traffic, and p2 would get the remaining 2/3rds?
>
>    - In https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html#examples
>    , there is an example that has a weighting, even though the selection
>    strategy is consistent hash. How does that work? Do the parents just
>    get added to the ring that percentage more time? Like in the example,
>    p1 gets added to the ring 1 time, and p2 gets added 2 times?
>
>    - Does the weighting affect round_robin=strict and latched?
>
>    - Is there a max value to the weighting? Anything special about the
>    decimal (for instance, is there a limit to the precision?)
>
>    Also, what is the difference between round_robin=true and round_robin=strict?
>
>    thanks!
>
>    miles
>
>
>
>


Re: parent.config documentation questions

Posted by "Eric Friedrich (efriedri)" <ef...@cisco.com>.
Thanks John-
  In Traffic Control we use a weight of .990. Is there any reason to use this value instead of a 1.0 weight?

—Eric


> On Nov 2, 2016, at 1:40 PM, John Rushford <jj...@gmail.com> wrote:
> 
> Miles,
> 
> The weight is only used for round_robin = consistent_hash.  It is ignored for all other strategies.
> In the consistent hash strategy, weight defaults to 1 and it’s a multiplier to the number of replicas of
> A parent inserted alon the hash ring.
> 
> Round_robin=true returns a parent from an array where parent = client_ip_addr % num_parents.
> 
> Round_robin=strict is just a strict round roubin over the array of parents.
> 
> Thanks
> John Rushford
> jrushford@apache.org
> 
> On 11/2/16, 10:21 AM, "Miles Libbey" <ml...@apache.org> wrote:
> 
>    Hey folks-
> 
>    I'd like to update the parent.config documentation to include the
>    weightings feature -- there is an example that shows it, but no text
>    that describes it.  So, I have some questions :)
> 
>    - I assume that if someone includes a weight for each parent, the
>    round robin=true turns into weighted round robin. I'd guess that ATS
>    will sum the weighted values of all the parents, then send each parent
>    (its value)/(sum of weights) of the traffic. True? In the example
>    (p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
>    traffic, and p2 would get the remaining 2/3rds?
> 
>    - In https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html#examples
>    , there is an example that has a weighting, even though the selection
>    strategy is consistent hash. How does that work? Do the parents just
>    get added to the ring that percentage more time? Like in the example,
>    p1 gets added to the ring 1 time, and p2 gets added 2 times?
> 
>    - Does the weighting affect round_robin=strict and latched?
> 
>    - Is there a max value to the weighting? Anything special about the
>    decimal (for instance, is there a limit to the precision?)
> 
>    Also, what is the difference between round_robin=true and round_robin=strict?
> 
>    thanks!
> 
>    miles
> 
> 
> 
> 


Re: parent.config documentation questions

Posted by John Rushford <jj...@gmail.com>.
Miles,

The weight is only used for round_robin = consistent_hash.  It is ignored for all other strategies.
In the consistent hash strategy, weight defaults to 1 and it’s a multiplier to the number of replicas of
A parent inserted alon the hash ring.

Round_robin=true returns a parent from an array where parent = client_ip_addr % num_parents.

Round_robin=strict is just a strict round roubin over the array of parents.

Thanks
John Rushford
jrushford@apache.org

On 11/2/16, 10:21 AM, "Miles Libbey" <ml...@apache.org> wrote:

    Hey folks-
    
    I'd like to update the parent.config documentation to include the
    weightings feature -- there is an example that shows it, but no text
    that describes it.  So, I have some questions :)
    
    - I assume that if someone includes a weight for each parent, the
    round robin=true turns into weighted round robin. I'd guess that ATS
    will sum the weighted values of all the parents, then send each parent
    (its value)/(sum of weights) of the traffic. True? In the example
    (p1.x.com:8080|1.0; p2.y.com:8080|2.0), would p1 get 1/3 of the
    traffic, and p2 would get the remaining 2/3rds?
    
    - In https://docs.trafficserver.apache.org/en/latest/admin-guide/files/parent.config.en.html#examples
    , there is an example that has a weighting, even though the selection
    strategy is consistent hash. How does that work? Do the parents just
    get added to the ring that percentage more time? Like in the example,
    p1 gets added to the ring 1 time, and p2 gets added 2 times?
    
    - Does the weighting affect round_robin=strict and latched?
    
    - Is there a max value to the weighting? Anything special about the
    decimal (for instance, is there a limit to the precision?)
    
    Also, what is the difference between round_robin=true and round_robin=strict?
    
    thanks!
    
    miles