How to set a request timeout for specific host

190 views
Skip to first unread message

Richard Grossman

unread,
Mar 25, 2014, 10:54:03 AM3/25/14
to dispatc...@googlegroups.com
Hi

I'm using dispatch for very heavy http web request (REST)
I'm querying ~ 120 differents hosts

Is there any way to configure a request timeout by host ?
The only one I see is to create a Config by host and cache it in a Map 

Thanks for help


Nathan

unread,
Apr 6, 2014, 11:58:14 AM4/6/14
to dispatc...@googlegroups.com
On 03/25/2014 10:54 AM, Richard Grossman wrote:
> The only one I see is to create a Config by host and cache it in a Map

Yeah, if every host needs a different timeout that works. If some of
them can share the same timeout value your may would be from timeout
value to config/executor. I don't think you'll get the best performance
from the client with that many instances (each has its own threadpools,
etc), but it should work at least.

It looks like newer versions of AsyncHttpClient let you set timeout in
RequestBuilder as people pretty commonly want to do, so we should look
at upgrading.

Nathan
Reply all
Reply to author
Forward
0 new messages