Automatic reconnect to GAE when the connection is dropped

The connection to GAE is not persistent and can drop. Reconnect when that happens, as long as the connection from the client is still active.

We need to consider the fact that while a reconnection is happening, the client may be sending requests that was relayed to the old connection, which is not going through. In that case these requests are queued and will be retried when the new connection is available.

Since we are no longer tying the lifecycles of the two connections, we cannot automatically terminate one when another is terminated. Also we need to explicitly control how WHOIS connection is terminated, not depending on the HTTP connection header.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207335498
This commit is contained in:
jianglai 2018-08-03 15:37:21 -07:00
parent 0b8e7498e0
commit 4ff77fb370
8 changed files with 203 additions and 79 deletions

View file

@ -118,7 +118,8 @@ public class EppServiceHandler extends HttpsRelayServiceHandler {
"epp", sslClientCertificateHash, ctx.channel());
channelRead(ctx, Unpooled.wrappedBuffer(helloBytes));
} else {
logger.atSevere().withCause(promise.cause()).log("Cannot finish handshake.");
logger.atSevere().withCause(promise.cause()).log(
"Cannot finish handshake for channel %s", ctx.channel());
ChannelFuture unusedFuture = ctx.close();
}
});