On Mon, Jun 11, 2018 at 4:59 PM, Chris Lemmons <alfic...@gmail.com> wrote:
> I've looked over the suggestion and there are a few things that
> confuse me. The list of hosts is separate from the weights. Maybe just
> make weight an optional element of a host?

That would not allow you to change weights for 1 configuration versus
another. Weights aren't a property of a host -- they are a property of
a selection strategy.

And the "protocol" is
> storing information about both the schema and the port. What if it
> looked something like this?
>
> name: consistent_hash
> hash_key: uri
> primary_ring:
>     - &p1
>         host: p1.foo.com
>         ports:
>             80: [ http1 ]
>             443: [ https1 ]
>         heathcheck:
>            url: tcp://192.168.1.1:80
>         weight: 1.0
>     - &p2
>         host: p2.bar.com
>         ports:
>             80: [ http1, http2 ]
>             443: [ https1 ]
>         healthcheck:
>             url: http://192.168.1.2:80
>         weight: 2.0
> secondary_ring:
>     - &s1
>         host: p1.foo.com
>         healthcheck:
>             url: tcp://192.168.2.1:80
>     - &s2
>         host: p2.bar.com
>         healthcheck:
>             url: http://192.168.3.2:80
>
> I'm not seeing immediately why we'd want hosts in multiple places,

By separating them from the selection strategy you can do:
.include allmyhosts.yml
and have different strategies (with different sets of hosts) by remap
rule. It's nice not to have to lists each host over and over (our
current parent.config has the same list of hosts repeated over and
over and over).

> but
> the above allows you to easily reuse the previous host entry if you
> wish. Maybe if the file had multiple strategies:

I think the concept was that the name was enumerated (which is
probably not the right keyword to do that). But, perhaps naming a
strategy would be useful. Like

 strategies:
   - name: largeWorkingSetConsistentHash
     selection_strategy: consistent_hash
    primary_ring: # list of servers and their weights
      hosts: [p1,p2,p3,p4...]
       ...
   - name: smallWorkingSetConsistentHash
     selection_strategy: consistent_hash
     primary_ring:
       hosts: [p1,p2]
   - name: evenlyDistribute
     selection_strategy: round_robin
     primary_ring:
       hosts: [p1,p2,p3,p4]
    ...
then, the remap could specify the named ruleset.

miles

> strategies:
>   - name: consistent_hash
>     hash_key: uri
>     primary_ring:
>       - &one
>         host: one.example.net
>         weight: 1.0
>       - &two
>         host: two.example.net
>         weight: 2.0
>       - &three
>         host: three.example.net
>         weight: 1.0
>     secondary_ring:
>       - &backup
>         host: nevergoesdown.example.net
>   - name: rr
>     primary_ring:
>       - *one
>       -
>         <<: *two
>         weight: 5.0
>     secondary_ring: [ *backup ]
>
> Or some other scenario where it would be useful to reuse the host definition.
>
>
> On Fri, Jun 8, 2018 at 11:26 AM, John Rushford <jrushf...@apache.org> wrote:
>> Please have a look at https://github.com/apache/trafficserver/issues/3808
>> and provide any comments on the proposed format of the parents.yaml
>> configuration.

Reply via email to