You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by oksana fishman <ok...@gmail.com> on 2012/12/04 17:02:55 UTC

traffic server threads question.

Hi,

** **

We are currently using the traffic server as a proxy with plugins which
holds proprietary logic.****

One of the plugins needs to see the page content, and therefore uses a
transform which gathers the page content.****

This kind of action takes a lot of time. ****

We would like to make sure that the content gathering would not block the
rest of the proxy traffic.****

Is the transform logic done asynchronously by the traffic server ? so that
we only need to increase the number of traffic server threads ?****

or do we need to add an external asynch mechanism  ?****

** **

thanks,****

** **

** **

** **

** **

Re: traffic server threads question.

Posted by James Peach <ja...@me.com>.
On Dec 4, 2012, at 8:02 AM, oksana fishman <ok...@gmail.com> wrote:

> Hi,
> 
> ** **
> 
> We are currently using the traffic server as a proxy with plugins which
> holds proprietary logic.****
> 
> One of the plugins needs to see the page content, and therefore uses a
> transform which gathers the page content.****
> 
> This kind of action takes a lot of time. ****
> 
> We would like to make sure that the content gathering would not block the
> rest of the proxy traffic.****
> 
> Is the transform logic done asynchronously by the traffic server ?

Calls to plugin hooks are made synchronously from an event loop which is then blocked. If you are making synchronous HTTP requests from a transform hook, you are blocking an event loop and might be starving some other work. You can use TSHttpConnect() or TSFetchUrl() to make asynchronous HTTP requests and then continue the transform when you have the content that you need.

> so that
> we only need to increase the number of traffic server threads ?****
> 
> or do we need to add an external asynch mechanism  ?****
> 
> ** **
> 
> thanks,****
> 
> ** **
> 
> ** **
> 
> ** **
> 
> ** **