trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <zw...@apache.org>
Subject Re: poll external server
Date Thu, 21 Jan 2016 17:36:06 GMT

> On Jan 21, 2016, at 8:03 AM, Alan Carroll <solidwallofcode@yahoo-inc.com.INVALID>
wrote:
> 
> The closest I could find is ats_pagespeed.This doesn't poll an external server but it
does poll a configuration file. Basically you set up a thread using TSThreadCreate(), have
it do the polling, and then communicate its results back via thread safe containers. I think
the pagespeed one works by creating a duplicate structure on configuration change, then atomically
swapping pointers. You still need to reference count so the old structure can be cleaned up.
Thread safe queues would work as well.


Fwiw, The health_check plugin does the same (has a thread checking to changes on the file
system).

— Leif


Mime
View raw message