@Override
        public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
            try {
                if (!(msg instanceof LastHttpContent)) {
                    return;
                }

                Duration timeout =
                        ctx.channel().attr(ORIGIN_RESPONSE_READ_TIMEOUT).get();
                if (timeout != null) {
                    promise.addListener(e -> {
                        if (e.isSuccess()) {
                            LOG.debug(
                                    "[{}] Adding read timeout handler: {}",
                                    ctx.channel().id(),
                                    timeout.toMillis());
                            PooledConnection.getFromChannel(ctx.channel()).startReadTimeoutHandler(timeout);
                        }
                    });
                }
            } finally {
                super.write(ctx, msg, promise);
            }
        }
Client Timeout Handler

Author: Arthur Gonigberg
Date: July 01, 2019
zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ClientTimeoutHandler.java