> On Aug 9, 2015, at 8:08 PM, Brian Geffon <briangef...@gmail.com> wrote:
> 
> All,
> We currently support strict and timed round robin for round robin DNS
> records and I'd like to propose adding consistent hashing based DNS
> selection. We're trying to replace our current ATS -> Haproxy setup with
> only ATS and that's been the motivation behind all of our recent HostDB
> improvements because we (and many others) use Haproxy simply for load
> balancing / host selection.
> 
> I've been hacking around with a few ideas and implementation methods but
> basically here is what I have so far:
> 
> 1) Add a new records.config called called
> proxy.config.hostdb.consisent_hash of type INT which will enable / disable
> the feature.
> 
> 2) Add a new records.config option called
> proxy.config.hostdb.consistent_hash_selection of type STRING, this will be
> how the string is assembled to produce the hash. After bouncing a few ideas
> around I was thinking a subset of the custom log format strings make the
> most sense (
> https://docs.trafficserver.apache.org/en/latest/admin/event-logging-formats.en.html),
> so basically you would do something like:
> 
>   CONFIG proxy.config.hostdb.consistent_hash_selection STRING %<cqup>
> %<{X-Foo-Header}cqh>
> 
> This would hash based on the pre-remapped request path and an incoming
> header called "X-Foo-Header." Reusing this existing syntax seemed to make
> the most sense. Additionally, because  cookies are typically a good way to
> uniquely identify a session I'll likely add another format which will get
> the value of an individual cookie, is this something people would find
> useful?

I kinda like the idea of using logging formats to construct the hash key. My 
concern is that we get yet another balancing mechanism that is similar but 
different. I don't really see why this is tied into hostdb. Surely the right 
approach is to construct a set of candidates (using hostdb, static 
configuration, plugin APIs, etc), and then have a single place that applies the 
balancing policy?

> 
> I'd really love feedback before I land the patch. Thoughts?
> 
> Thanks,
> Brian

Reply via email to