Closed
Description
To have a better understanding where is ms spent during execution of request I would like to propose to extend existing callbacks for both 1.8.x and 1.9.x (in 1.9 we have now few more callbacks compared to 1.8.x) with callabacks for:
- after DNS resolution is complete
In NettyRequestSender:
private ChannelFuture connect(Request request, Uri uri, ProxyServer proxy, boolean useProxy, ClientBootstrap bootstrap, AsyncHandler<?> asyncHandler) {
InetSocketAddress remoteAddress = remoteAddress(request, uri, proxy, useProxy);
// callback that Dns resolution is complete
...
}
- ssl handshake complete
Some background
Although it is expected that DNS resolution is very fast it is not that fast everywhere, in China Region DNS in general very slow. Unix-systems have a default system timeout of 5s and 3 attempts for DNS resolution.
In this case you can requests >15s even your request timeout on async client side is 1-2s.
As to ssl handshake, even there is an option to set timeout for ssl handshake it would be in general nice to see how long it take to complete it.