Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Information regarding Jetty HTTP Client properties

Hi Simone,

Thanks for the inputs.
Here are some follow up questions:


2. AddressResolutionTimeout: What is the significance to set this timeout
> property? We do set the connection timeout. If addressResolutionTimeout is
> not explicitly set, does this property default to connection timeout?

This is the timeout for DNS resolution, that is to resolve the host
name in string form to an IP address.
Once the host name is resolved, it can be used to open a connection,
where the connectionTimeout applies.

Therefore, the addressResolutionTimeout and the connectTimeout are not
related (much).

> In that case, the purpose of setting this property would help in identifying a request
that carries a bad host name before even trying to establish a connection and result in exceptions like UnknownHostException.
Can you please clarify this?

Also, we have a use case wherein we have a requirement to send approximately 10,000 HTTP/2 requests per second to a target end point.
We plan to configure the client object with 1 connection and a high value of the number of queued requests.
(Also, as mentioned in the Java Docs, it is advised to set the number of connections property to a maximum of 2.)
We do have a throttling mechanism on our end to send approx to trigger 10,000 requests from the client end.
Is there a correlation that we could use to set the number of queued requests with 1 connection with the throughput we want to achieve to be able to send these requests successfully without running into request rejection failures or in such a scenario, can we configure the client object with a higher number of connection.
Please let me know your recommendation.

Thanks
Neha





On Wed, Apr 19, 2017 at 10:41 AM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:
Hi,

On Wed, Apr 19, 2017 at 7:13 PM, Neha Munjal <neha.munjal3@xxxxxxxxx> wrote:
> Hi,
>
> We are working with Jetty 9.4.3.v20170317 distribution and using the low
> level HttpClient  API to create Http2Client objects to be able to do HTTP/2
> communication both synchronously and asynchronously.

Given the properties below, you are using the *high* level HttpClient.
The low level one does not have, for example, the
"addressResolutionTimeout" property.

> Since, we could not find much information for all the properties in the API
> documentation, I would like to clarify the usage of following 2 properties
> that can be set on the client object:
>
> 1. IdleTimeout: How does this property behave? In case a connection becomes
> idle, i.e no data exchange from either side, is this connection just added
> back to the list of idle connection in the underlying connection pool?

No, the connection is closed.

> We have a use case wherein we would just create 1 connection and stream
> requests, so we would like to understand if a connection became idle and
> say, we have a new incoming request to make HTTP communication, would we use
> this connection and activate it so that it could be used for the exchange?

After the idle timeout, if a new request comes in it will trigger the
creation of a new connection.

> Also if this property is not explicitly configured, does it assume some
> default value?

Yes.

> 2. AddressResolutionTimeout: What is the significance to set this timeout
> property? We do set the connection timeout. If addressResolutionTimeout is
> not explicitly set, does this property default to connection timeout?

This is the timeout for DNS resolution, that is to resolve the host
name in string form to an IP address.
Once the host name is resolved, it can be used to open a connection,
where the connectionTimeout applies.

Therefore, the addressResolutionTimeout and the connectTimeout are not
related (much).

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top