Hello all,
We have a plugin that uses TSHttpConnect and have noticed that when the 
response is not from cache and is over about 40k, traffic server begins to 
introduce latencies between its callbacks to the event 
TS_EVENT_VCONN_READ_READY.  I have only been able to reproduce this in a 
clustered environment, with both 3.0.1 and 3.2.  It does not happen in a 
non-clustered environment.  Also, when the object is from cache (so no chunked 
encoding), it is returned very fast.

When I turned up debugging I found the following messages "(http_chunk_flow) 
Blocking reenable - flow control in effect" which seem tied to the delays.

When I try the same call using just a remap rule I have not been able to 
reproduce the issue.  That leads me to believe we are doing something wrong 
here with our response handling.

Things I have tried:

 *   Increasing size to read with TSVConnRead call
 *   Increasing proxy.config.io.max_buffer_size

Any help would be greatly appreciated.

Code snippet:

        avail = TSIOBufferReaderAvail(mServerResponseBufferReader);
        totalAvail = avail;
        while (avail > 0) {

            blk = TSIOBufferReaderStart(mServerResponseBufferReader);

            buf_ptr = (char *) TSIOBufferBlockReadStart(blk, 
mServerResponseBufferReader, &read);
            if (read <= 0) {
                break;
            }
            else {
                saveRespData(buf_ptr, read);
                TSIOBufferReaderConsume(mServerResponseBufferReader, read);
                avail -= read;
            }

            blk = TSIOBufferBlockNext(blk);
        }

//NOTE: I have tried with and without this statement
        TSVIONDoneSet(mResponseVio, TSVIONDoneGet(mResponseVio) + totalAvail);

        TSVIOReenable(mResponseVio);


Thank you,
Pete

Reply via email to