in zuul-core/src/main/java/com/netflix/zuul/netty/server/BaseServerStartup.java [249:299]
public static ChannelConfig defaultChannelConfig(String listenAddressName) {
ChannelConfig config = new ChannelConfig();
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.maxConnections,
chooseIntChannelProperty(
listenAddressName, "connection.max", CommonChannelConfigKeys.maxConnections.defaultValue())));
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.maxRequestsPerConnection,
chooseIntChannelProperty(listenAddressName, "connection.max.requests", 20000)));
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.maxRequestsPerConnectionInBrownout,
chooseIntChannelProperty(
listenAddressName,
"connection.max.requests.brownout",
CommonChannelConfigKeys.maxRequestsPerConnectionInBrownout.defaultValue())));
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.connectionExpiry,
chooseIntChannelProperty(
listenAddressName,
"connection.expiry",
CommonChannelConfigKeys.connectionExpiry.defaultValue())));
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.httpRequestReadTimeout,
chooseIntChannelProperty(
listenAddressName,
"http.request.read.timeout",
CommonChannelConfigKeys.httpRequestReadTimeout.defaultValue())));
int connectionIdleTimeout = chooseIntChannelProperty(
listenAddressName, "connection.idle.timeout", CommonChannelConfigKeys.idleTimeout.defaultValue());
config.add(new ChannelConfigValue<>(CommonChannelConfigKeys.idleTimeout, connectionIdleTimeout));
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.serverTimeout, new ServerTimeout(connectionIdleTimeout)));
// For security, default to NEVER allowing XFF/Proxy headers from client.
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.allowProxyHeadersWhen, StripUntrustedProxyHeadersHandler.AllowWhen.NEVER));
config.set(CommonChannelConfigKeys.withProxyProtocol, true);
config.set(CommonChannelConfigKeys.preferProxyProtocolForClientIp, true);
config.add(new ChannelConfigValue<>(
CommonChannelConfigKeys.connCloseDelay,
chooseIntChannelProperty(
listenAddressName,
"connection.close.delay",
CommonChannelConfigKeys.connCloseDelay.defaultValue())));
return config;
}