You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Hiranya Jayathilaka <hi...@gmail.com> on 2009/10/26 16:20:00 UTC
KeepAlive Connection Handling Strategy
Hi Devs,
I would like to know what is the KeepAlive handling strategy used in HTTP
Core 4.1-alpha1. How does HTTP Core deal with KeepAlive connections at
server side and the client side? Is there a way to configure this behavior?
The article at [1] mentions about a class/interface called
ConnectionKeepAliveStrategy. Does the latest 4.1-alpha1 contain this
feature?
Your response is most appreciated.
Thanks,
Hiranya
[1] - http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html
--
Hiranya Jayathilaka
Software Engineer;
WSO2 Inc.; http://wso2.org
E-mail: hiranya@wso2.com; Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com
Re: KeepAlive Connection Handling Strategy
Posted by Oleg Kalnichevski <ol...@apache.org>.
Hiranya Jayathilaka wrote:
> Hi Devs,
>
> I would like to know what is the KeepAlive handling strategy used in HTTP
> Core 4.1-alpha1. How does HTTP Core deal with KeepAlive connections at
> server side and the client side? Is there a way to configure this behavior?
> The article at [1] mentions about a class/interface called
> ConnectionKeepAliveStrategy. Does the latest 4.1-alpha1 contain this
> feature?
>
> Your response is most appreciated.
>
> Thanks,
> Hiranya
>
> [1] - http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html
>
Hiranya,
HttpCore components keep connections alive indefinitely both on the
client and the server side. ConnectionKeepAliveStrategy interface is
provided by HttpClient only and is a client specific extension. It is
not available in the core components. If you want to enforce a
keep-alive limit of some kind you have to build this kind of logic into
the protocol handlers used by your application.
I suppose your are only interested in the NIO side of things. There is
an effort to provide a full fledged asynchronous HTTP client based on
HttpCore NIO, similar to what HttpClient is for HttpCore classic, but it
is presently in a VERY, VERY, VERY early development stage:
http://svn.apache.org/repos/asf/httpcomponents/asynchttpclient/trunk/
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org