Thank you, Miles and Evan! This is much clear, I will take a look of the code.


Juncheng Yang

On Jul 26, 2019, 11:29 -0400, Evan Zelkowitz <[email protected]>, wrote:
> Yea that sounds right for the buckets. Ive only investigated the code a bit 
> and we had someone play around with it a bit, so this just coming from some 
> basic testing experience. The bucket is basically the size of the hash table 
> that the plugin is going to use for counting unique URLs. So if you make 
> buckets too small you could end up dropping objects out of the table before 
> they have been counted sufficiently for what you want as it brings in new 
> objects, if you make it too big then you end up with objects sitting around 
> for a long time and things still getting cached when you wouldnt care about 
> them.  I.e. its so big that you have a weeks worth of objects and so you end 
> up getting 3 hits on an object over an entire week and it ends up cached when 
> you really dont care about it since it was just 3 hits in a week.
>
> Just takes some tweaking and need to figure out how busy the remap is for 
> unique hits
>
> > On Fri, Jul 26, 2019 at 9:17 AM Miles Libbey <[email protected]> wrote:
> > > The buckets configuration is part of the LRU settings. So, you first 
> > > choose the "policy" -- LRU, or random chance. If you choose the LRU, you 
> > > need to give it 2 more configuration options, the hit threshold, and the 
> > > buckets -- the size of the LRU cache.
> > >
> > > I'm guessing the hits are intuitive (eg, 2 hits makes you just proxy the 
> > > 1 hit wonders). The buckets are less intuitive to set. I have some tasks 
> > > to go experiment on how changing them affects things at $work. Nominally, 
> > > I've set the buckets to be roughly the number of unique urls we see in 
> > > the timeframe that we'd like our cache to wrap in. But, that's just a 
> > > guess -- if folks have ideas here, would love to hear them!
> > > miles
> > >
> > > > On Thu, Jul 25, 2019 at 3:22 PM Jason Yang <[email protected]> 
> > > > wrote:
> > > > > Thank you Jeremy, Miles and Evan! This is helpful!
> > > > > But I don’t fully understand the bucket option, can you elaborate a 
> > > > > little bit? Thank you!
> > > > >
> > > > >
> > > > > Juncheng
> > > > >
> > > > >
> > > > > > On Jul 25, 2019, at 15:42, Miles Libbey <[email protected]> wrote:
> > > > > >
> > > > > > +1. This is the purpose of that plugin!
> > > > > > https://docs.trafficserver.apache.org/en/8.0.x/admin-guide/plugins/cache_promote.en.html
> > > > > >
> > > > > > > On Thu, Jul 25, 2019 at 12:05 PM Jeremy Payne 
> > > > > > > <[email protected]> wrote:
> > > > > > > > What about the 'cache promote' plugin ?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > > On Thu, Jul 25, 2019 at 2:01 PM Sudheer Vinukonda 
> > > > > > > > > <[email protected]> wrote:
> > > > > > > > > > Ah, very interesting. That requires an additional mechanism 
> > > > > > > > > > to maintain the state (first or subsequent access) across 
> > > > > > > > > > requests. Yeah, AFAIK, this will need a new plugin (don't 
> > > > > > > > > > believe there's anything built-in or pre-existing to 
> > > > > > > > > > support this).
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > >
> > > > > > > > > > Sudheer
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Thursday, July 25, 2019, 11:51:07 AM PDT, Jason Yang 
> > > > > > > > > > <[email protected]> wrote:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Hi Sudheer,
> > > > > > > > > >     Thank you for your quick reply! It seems the option you 
> > > > > > > > > > proposed is a general control. Writing a plugin is indeed 
> > > > > > > > > > one option, but to avoid reinventing the wheel, I just want 
> > > > > > > > > > to double check that ATS does not have this function. To be 
> > > > > > > > > > specific, I don’t want to cache an object when I first time 
> > > > > > > > > > see it. In other words, I only want to cache objects that 
> > > > > > > > > > have been seen at least twice.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Best,
> > > > > > > > > > Juncheng
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > > On Jul 25, 2019, at 14:12, Sudheer Vinukonda 
> > > > > > > > > > > <[email protected]> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hmm..not entirely sure if I understand the question, but, 
> > > > > > > > > > > if you are asking ATS supports skipping cache on some 
> > > > > > > > > > > requests, yes. There's different ways of doing that. You 
> > > > > > > > > > > can disable cache per remap line using records.config — 
> > > > > > > > > > > Apache Traffic Server 9.0.0 documentation or use 
> > > > > > > > > > > cache.config or write a plugin for more finer control
> > > > > > > > > > >
> > > > > > > > > > > records.config — Apache Traffic Server 9.0.0 documentation
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > cache.config — Apache Traffic Server 9.0.0 documentation
> > > > > > > > > > >
> > > > > > > > > > > cache.config — Apache Traffic Server 9.0.0 documentation
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Does that answer your question?
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > >
> > > > > > > > > > > Sudheer
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Thursday, July 25, 2019, 11:05:34 AM PDT, Jason Yang 
> > > > > > > > > > > <[email protected]> wrote:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Hi there,
> > > > > > > > > > >     I am wondering whether ATS supports filtering 
> > > > > > > > > > > one-hit-wonders (do not store them into cache). Thank you!
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Best,
> > > > > > > > > > > Juncheng
> > > > > > > > > >
> > > > >

Reply via email to