[ 
https://issues.apache.org/jira/browse/TS-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323266#comment-14323266
 ] 

Leif Hedstrom commented on TS-3391:
-----------------------------------

What people have done in the past is to inject a Connection: close in the 
request (to origin) or in the response (to client). That will force it to close 
it. There's an example in the header_rewrite plugin how to do that.

There is a counter in the SM how many transaction has been complete on a 
connection. I don't remember the exact details, but I added an API for it, 
TSHttpSsnTransactionCount(). It might be that this only works on the client 
side, but maybe this can be generalized, and then exposed as a condition to 
header_rewrite (such that you can say if TSHttpSsnTransactionCount() is > 100, 
send a Connection: close).

Just a thought.

> Close origin connection after time/request
> ------------------------------------------
>
>                 Key: TS-3391
>                 URL: https://issues.apache.org/jira/browse/TS-3391
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: HTTP
>            Reporter: Luca Bruno
>             Fix For: sometime
>
>
> Our origin server is a balancer, and sometimes we have to tweak weights of 
> the real backend servers.
> I haven't found this kind of option in ATS so I'd like to ask if this idea 
> could be accepted.
> The idea is to close an origin connection after some time has passed, or a 
> certain number of requests have been made. We're more interested in the fact 
> that after X seconds a connection will be closed, and a new one opened.
> This should be quite safe to implement in ATS itself theoretically: if the 
> condition has met, remove the connection from the pool for new requests. 
> After all requests are complete, close that connection.
> It's not precise, but it guarantees that after a certain time/requests 
> eventually that connection will be closed.
> In practice, it will be closed at most after the given time + 
> transaction_active_timeout_out if I'm not wrong.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to