diff --git a/settings.gradle b/settings.gradle index 72506e6c7f..6ddc432bb8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,5 @@ rootProject.name='zuul' include 'zuul-core' +include 'zuul-eureka' include 'zuul-sample' diff --git a/zuul-core/build.gradle b/zuul-core/build.gradle index eadbea2b92..71e70433df 100644 --- a/zuul-core/build.gradle +++ b/zuul-core/build.gradle @@ -2,7 +2,6 @@ apply plugin: "groovy" apply plugin: "com.google.osdetector" dependencies { - compile "log4j:log4j:1.2.17" compile "commons-io:commons-io:2.4" compile "commons-fileupload:commons-fileupload:1.3" @@ -26,8 +25,6 @@ dependencies { compile "com.netflix.ribbon:ribbon-core:${versions_ribbon}" compile "com.netflix.ribbon:ribbon-httpclient:${versions_ribbon}" compile "com.netflix.ribbon:ribbon-loadbalancer:${versions_ribbon}" - compile "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" - compile "com.netflix.eureka:eureka-client:1.9.4" compile "io.reactivex:rxjava:1.2.1" compile "io.netty:netty-common:${versions_netty}" diff --git a/zuul-core/dependencies.lock b/zuul-core/dependencies.lock index 8e0a474cfb..690c363c0d 100644 --- a/zuul-core/dependencies.lock +++ b/zuul-core/dependencies.lock @@ -37,13 +37,9 @@ "requested": "4.2.2" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", + "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -64,10 +60,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -77,7 +69,7 @@ "requested": "2.2.4" }, "com.netflix.servo:servo-core": { - "locked": "0.12.21", + "locked": "0.10.1", "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { @@ -226,10 +218,6 @@ "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -250,10 +238,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -409,13 +393,9 @@ "requested": "4.2.2" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", + "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -436,10 +416,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -449,7 +425,7 @@ "requested": "2.2.4" }, "com.netflix.servo:servo-core": { - "locked": "0.12.21", + "locked": "0.10.1", "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { @@ -599,13 +575,9 @@ "requested": "4.2.2" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", + "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -626,10 +598,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -639,7 +607,7 @@ "requested": "2.2.4" }, "com.netflix.servo:servo-core": { - "locked": "0.12.21", + "locked": "0.10.1", "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { @@ -789,13 +757,9 @@ "requested": "4.2.2" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", + "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -816,10 +780,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -829,7 +789,7 @@ "requested": "2.2.4" }, "com.netflix.servo:servo-core": { - "locked": "0.12.21", + "locked": "0.10.1", "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { @@ -979,13 +939,9 @@ "requested": "4.2.2" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", + "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -1010,10 +966,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -1023,7 +975,7 @@ "requested": "2.2.4" }, "com.netflix.servo:servo-core": { - "locked": "0.12.21", + "locked": "0.10.1", "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { @@ -1172,10 +1124,6 @@ "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -1200,10 +1148,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -1359,13 +1303,9 @@ "requested": "4.2.2" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", + "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -1390,10 +1330,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -1403,7 +1339,7 @@ "requested": "2.2.4" }, "com.netflix.servo:servo-core": { - "locked": "0.12.21", + "locked": "0.10.1", "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { @@ -1557,13 +1493,9 @@ "requested": "4.2.2" }, "com.netflix.archaius:archaius-core": { - "locked": "0.7.6", + "locked": "0.7.5", "requested": "0.7.5" }, - "com.netflix.eureka:eureka-client": { - "locked": "1.9.4", - "requested": "1.9.4" - }, "com.netflix.governator:governator": { "locked": "1.17.10", "requested": "1.+" @@ -1588,10 +1520,6 @@ "locked": "2.2.4", "requested": "2.2.4" }, - "com.netflix.ribbon:ribbon-eureka": { - "locked": "2.2.4", - "requested": "2.2.4" - }, "com.netflix.ribbon:ribbon-httpclient": { "locked": "2.2.4", "requested": "2.2.4" @@ -1601,7 +1529,7 @@ "requested": "2.2.4" }, "com.netflix.servo:servo-core": { - "locked": "0.12.21", + "locked": "0.10.1", "requested": "0.7.2" }, "com.netflix.spectator:spectator-api": { diff --git a/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatus.java b/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatus.java new file mode 100644 index 0000000000..9fa8618777 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatus.java @@ -0,0 +1,6 @@ +package com.netflix.netty.common.status; + +public enum ServerStatus { + UP, + DOWN +} diff --git a/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java b/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java index 1fba2a6cd6..4ef9a7279d 100644 --- a/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java +++ b/zuul-core/src/main/java/com/netflix/netty/common/status/ServerStatusManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 Netflix, Inc. + * Copyright 2020 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,66 +16,8 @@ package com.netflix.netty.common.status; -import com.netflix.appinfo.ApplicationInfoManager; -import com.netflix.appinfo.InstanceInfo; -import com.netflix.discovery.DiscoveryClient; +public interface ServerStatusManager { -import javax.inject.Inject; -import javax.inject.Singleton; + void localStatus(ServerStatus status); -import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UNKNOWN; -import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UP; - -/** - * User: michaels@netflix.com - * Date: 7/6/17 - * Time: 3:37 PM - */ -@Singleton -public class ServerStatusManager -{ - private final ApplicationInfoManager applicationInfoManager; - private final DiscoveryClient discoveryClient; - - @Inject - public ServerStatusManager(ApplicationInfoManager applicationInfoManager, DiscoveryClient discoveryClient) - { - this.applicationInfoManager = applicationInfoManager; - this.discoveryClient = discoveryClient; - } - - public InstanceInfo.InstanceStatus status() { - - // NOTE: when debugging this locally, found to my surprise that when the instance is maked OUT_OF_SERVICE remotely - // in Discovery, although the StatusChangeEvent does get fired, the _local_ InstanceStatus (ie. - // applicationInfoManager.getInfo().getStatus()) does not get changed to reflect that. - // So that's why I'm doing this little dance here of looking at both remote and local statuses. - - InstanceInfo.InstanceStatus local = localStatus(); - InstanceInfo.InstanceStatus remote = remoteStatus(); - - if (local == UP && remote != UNKNOWN) { - return remote; - } - else { - return local; - } - } - - public InstanceInfo.InstanceStatus localStatus() { - return applicationInfoManager.getInfo().getStatus(); - } - - public InstanceInfo.InstanceStatus remoteStatus() { - return discoveryClient.getInstanceRemoteStatus(); - } - - public void localStatus(InstanceInfo.InstanceStatus status) { - applicationInfoManager.setInstanceStatus(status); - } - - public int health() { - // TODO - throw new UnsupportedOperationException(); - } } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java index a675d85865..e436ccb43c 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/ConnectionPoolHandler.java @@ -23,7 +23,6 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.HttpHeaderNames; -import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.timeout.IdleStateEvent; import org.slf4j.Logger; @@ -123,8 +122,8 @@ private void closeConnection(ChannelHandlerContext ctx, String msg) { if (conn != null) { if (LOG.isDebugEnabled()) { msg = msg + " Closing the PooledConnection and releasing." - + " ASG: " + String.valueOf(conn.getServerKey().getASGName() - + ", host=" + String.valueOf(conn.getServerKey().getHostName())); + + " ASG: " + conn.getServer().getMetaInfo().getServerGroup() + + ", host=" + conn.getServer().getHost(); LOG.debug(msg); } flagCloseAndReleaseConnection(conn); diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java index 7bd0f41ffd..798d80948b 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/DefaultClientChannelManager.java @@ -16,18 +16,14 @@ package com.netflix.zuul.netty.connectionpool; -import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; - import com.google.common.base.Throwables; import com.google.common.collect.Sets; -import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.DynamicServerListLoadBalancer; import com.netflix.loadbalancer.LoadBalancerStats; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; import com.netflix.loadbalancer.ZoneAwareLoadBalancer; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.histogram.PercentileTimer; @@ -35,6 +31,7 @@ import com.netflix.zuul.netty.SpectatorUtils; import com.netflix.zuul.netty.insights.PassportStateHttpClientHandler; import com.netflix.zuul.netty.server.OriginResponseReceiver; +import com.netflix.zuul.origins.ServerIpAddrExtractor; import com.netflix.zuul.passport.CurrentPassport; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; @@ -43,7 +40,9 @@ import io.netty.channel.EventLoop; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.concurrent.Promise; -import java.lang.reflect.InvocationTargetException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.HashSet; import java.util.List; import java.util.Set; @@ -51,8 +50,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import static com.netflix.client.config.CommonClientConfigKey.NFLoadBalancerClassName; /** * User: michaels@netflix.com @@ -67,6 +66,7 @@ public class DefaultClientChannelManager implements ClientChannelManager { private final DynamicServerListLoadBalancer loadBalancer; private final ConnectionPoolConfig connPoolConfig; private final IClientConfig clientConfig; + private final ServerIpAddrExtractor serverIpAddrExtractor; private final Registry spectatorRegistry; /* DeploymentContextBasedVIP for which to maintain this connection pool */ @@ -98,11 +98,13 @@ public class DefaultClientChannelManager implements ClientChannelManager { public static final String IDLE_STATE_HANDLER_NAME = "idleStateHandler"; - public DefaultClientChannelManager(String originName, String vip, IClientConfig clientConfig, Registry spectatorRegistry) { + public DefaultClientChannelManager(String originName, String vip, IClientConfig clientConfig, + ServerIpAddrExtractor serverIpAddrExtractor, Registry spectatorRegistry) { this.loadBalancer = createLoadBalancer(clientConfig); this.vip = vip; this.clientConfig = clientConfig; + this.serverIpAddrExtractor = serverIpAddrExtractor; this.spectatorRegistry = spectatorRegistry; this.perServerPools = new ConcurrentHashMap<>(200); @@ -341,13 +343,6 @@ public Promise acquire(final EventLoop eventLoop, final Object return promise; } - final InstanceInfo instanceInfo = chosenServer instanceof DiscoveryEnabledServer ? - ((DiscoveryEnabledServer) chosenServer).getInstanceInfo() : - // create mock instance info for non-discovery instances - new InstanceInfo(chosenServer.getId(), null, null, chosenServer.getHost(), chosenServer.getId(), - null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null); - - selectedServer.set(chosenServer); // Now get the connection-pool for this server. @@ -357,10 +352,10 @@ public Promise acquire(final EventLoop eventLoop, final Object ServerStats stats = lbStats.getSingleServerStat(chosenServer); final ClientChannelManager clientChannelMgr = this; - PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, instanceInfo, stats, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); + PooledConnectionFactory pcf = createPooledConnectionFactory(chosenServer, stats, clientChannelMgr, closeConnCounter, closeWrtBusyConnCounter); // Create a new pool for this server. - return createConnectionPool(chosenServer, stats, instanceInfo, clientConnFactory, pcf, connPoolConfig, + return createConnectionPool(chosenServer, stats, clientConnFactory, pcf, connPoolConfig, clientConfig, createNewConnCounter, createConnSucceededCounter, createConnFailedCounter, requestConnCounter, reuseConnCounter, connTakenFromPoolIsNotOpen, maxConnsPerHostExceededCounter, connEstablishTimer, connsInPool, connsInUse); @@ -369,12 +364,12 @@ public Promise acquire(final EventLoop eventLoop, final Object return pool.acquire(eventLoop, null, httpMethod, uri, attemptNum, passport, selectedHostAdddr); } - protected PooledConnectionFactory createPooledConnectionFactory(Server chosenServer, InstanceInfo instanceInfo, ServerStats stats, ClientChannelManager clientChannelMgr, + protected PooledConnectionFactory createPooledConnectionFactory(Server chosenServer, ServerStats stats, ClientChannelManager clientChannelMgr, Counter closeConnCounter, Counter closeWrtBusyConnCounter) { - return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, instanceInfo, stats, closeConnCounter, closeWrtBusyConnCounter); + return ch -> new PooledConnection(ch, chosenServer, clientChannelMgr, stats, closeConnCounter, closeWrtBusyConnCounter); } - protected IConnectionPool createConnectionPool(Server chosenServer, ServerStats stats, InstanceInfo instanceInfo, + protected IConnectionPool createConnectionPool(Server chosenServer, ServerStats stats, NettyClientConnectionFactory clientConnFactory, PooledConnectionFactory pcf, ConnectionPoolConfig connPoolConfig, IClientConfig clientConfig, Counter createNewConnCounter, Counter createConnSucceededCounter, @@ -385,7 +380,6 @@ protected IConnectionPool createConnectionPool(Server chosenServer, ServerStats return new PerServerConnectionPool( chosenServer, stats, - instanceInfo, clientConnFactory, pcf, connPoolConfig, @@ -399,7 +393,8 @@ protected IConnectionPool createConnectionPool(Server chosenServer, ServerStats maxConnsPerHostExceededCounter, connEstablishTimer, connsInPool, - connsInUse + connsInUse, + serverIpAddrExtractor ); } diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java index fd78b1b305..129b066720 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/connectionpool/PerServerConnectionPool.java @@ -16,21 +16,20 @@ package com.netflix.zuul.netty.connectionpool; -import com.google.common.base.Strings; -import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Timer; import com.netflix.zuul.exception.OutboundErrorType; +import com.netflix.zuul.origins.ServerIpAddrExtractor; import com.netflix.zuul.passport.CurrentPassport; import com.netflix.zuul.passport.PassportState; import com.netflix.zuul.stats.Timing; import io.netty.channel.ChannelFuture; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,7 +51,6 @@ public class PerServerConnectionPool implements IConnectionPool private final Server server; private final ServerStats stats; - private final InstanceInfo instanceInfo; private final NettyClientConnectionFactory connectionFactory; private final PooledConnectionFactory pooledConnectionFactory; private final ConnectionPoolConfig config; @@ -70,6 +68,7 @@ public class PerServerConnectionPool implements IConnectionPool private final Timer connEstablishTimer; private final AtomicInteger connsInPool; private final AtomicInteger connsInUse; + private final ServerIpAddrExtractor serverIpAddrExtractor; /** * This is the count of connections currently in progress of being established. @@ -80,23 +79,23 @@ public class PerServerConnectionPool implements IConnectionPool private static final Logger LOG = LoggerFactory.getLogger(PerServerConnectionPool.class); - public PerServerConnectionPool(Server server, ServerStats stats, InstanceInfo instanceInfo, + public PerServerConnectionPool(Server server, ServerStats stats, NettyClientConnectionFactory connectionFactory, PooledConnectionFactory pooledConnectionFactory, ConnectionPoolConfig config, IClientConfig niwsClientConfig, - Counter createNewConnCounter, - Counter createConnSucceededCounter, + Counter createNewConnCounter, + Counter createConnSucceededCounter, Counter createConnFailedCounter, - Counter requestConnCounter, Counter reuseConnCounter, + Counter requestConnCounter, Counter reuseConnCounter, Counter connTakenFromPoolIsNotOpen, Counter maxConnsPerHostExceededCounter, Timer connEstablishTimer, - AtomicInteger connsInPool, AtomicInteger connsInUse) + AtomicInteger connsInPool, AtomicInteger connsInUse, + ServerIpAddrExtractor serverIpAddrExtractor) { this.server = server; this.stats = stats; - this.instanceInfo = instanceInfo; this.connectionFactory = connectionFactory; this.pooledConnectionFactory = pooledConnectionFactory; this.config = config; @@ -111,7 +110,8 @@ public PerServerConnectionPool(Server server, ServerStats stats, InstanceInfo in this.connEstablishTimer = connEstablishTimer; this.connsInPool = connsInPool; this.connsInUse = connsInUse; - + this.serverIpAddrExtractor = serverIpAddrExtractor; + this.connCreationsInProgress = new AtomicInteger(0); } @@ -243,7 +243,7 @@ protected void tryMakingNewConnection(final EventLoop eventLoop, final Promise

{ - if (event instanceof StatusChangeEvent) { - StatusChangeEvent sce = (StatusChangeEvent) event; - - LOG.info("Received " + sce.toString()); - - if (sce.getPreviousStatus() == InstanceInfo.InstanceStatus.UP - && (sce.getStatus() == InstanceInfo.InstanceStatus.OUT_OF_SERVICE || sce.getStatus() == InstanceInfo.InstanceStatus.DOWN)) - { - // TODO - Also should stop accepting any new client connections now too? - - // Schedule to gracefully close all the client connections. - if (ENABLED.get()) { - executor.schedule(() -> { - gracefullyShutdownClientChannels(); - }, DELAY_AFTER_OUT_OF_SERVICE_MS.get(), TimeUnit.MILLISECONDS); - } - } - } - }); - } - /** * Note this blocks until all the channels have finished closing. */ diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java index 1f71d0003c..a5d86d37b6 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/Server.java @@ -17,11 +17,11 @@ package com.netflix.zuul.netty.server; import com.google.common.annotations.VisibleForTesting; -import com.netflix.appinfo.InstanceInfo; import com.netflix.config.DynamicBooleanProperty; import com.netflix.netty.common.CategorizedThreadFactory; import com.netflix.netty.common.LeastConnsEventLoopChooserFactory; import com.netflix.netty.common.metrics.EventLoopGroupMetrics; +import com.netflix.netty.common.status.ServerStatus; import com.netflix.netty.common.status.ServerStatusManager; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; @@ -47,10 +47,6 @@ import io.netty.util.concurrent.EventExecutor; import io.netty.util.concurrent.EventExecutorChooserFactory; import io.netty.util.concurrent.ThreadPerTaskExecutor; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.concurrent.atomic.AtomicReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,12 +56,16 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; import static com.google.common.base.Preconditions.checkNotNull; @@ -251,7 +251,7 @@ private ChannelFuture setupServerBootstrap( LOG.info("Binding to : " + listenAddress); // Flag status as UP just before binding to the port. - serverStatusManager.localStatus(InstanceInfo.InstanceStatus.UP); + serverStatusManager.localStatus(ServerStatus.UP); // Bind and start to accept incoming connections. return serverBootstrap.bind(listenAddress).sync(); @@ -389,7 +389,7 @@ synchronized private void stop() // Flag status as down. // TODO - is this _only_ changing the local status? And therefore should we also implement a HealthCheckHandler // that we can flag to return DOWN here (would that then update Discovery? or still be a delay?) - serverStatusManager.localStatus(InstanceInfo.InstanceStatus.DOWN); + serverStatusManager.localStatus(ServerStatus.DOWN); // Shutdown each of the client connections (blocks until complete). // NOTE: ClientConnectionsShutdown can also be configured to gracefully close connections when the diff --git a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ZuulDependencyKeys.java b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ZuulDependencyKeys.java index e563d5a6a1..6dcee48ea6 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/netty/server/ZuulDependencyKeys.java +++ b/zuul-core/src/main/java/com/netflix/zuul/netty/server/ZuulDependencyKeys.java @@ -16,8 +16,6 @@ package com.netflix.zuul.netty.server; -import com.netflix.appinfo.ApplicationInfoManager; -import com.netflix.discovery.EurekaClient; import com.netflix.netty.common.accesslog.AccessLogPublisher; import com.netflix.netty.common.channel.config.ChannelConfigKey; import com.netflix.netty.common.metrics.EventLoopGroupMetrics; @@ -48,8 +46,6 @@ public class ZuulDependencyKeys { public static final ChannelConfigKey httpRequestReadTimeoutCounter = new ChannelConfigKey<>("httpRequestReadTimeoutCounter"); public static final ChannelConfigKey filterLoader = new ChannelConfigKey<>("filterLoader"); public static final ChannelConfigKey filterUsageNotifier = new ChannelConfigKey<>("filterUsageNotifier"); - public static final ChannelConfigKey discoveryClient = new ChannelConfigKey<>("discoveryClient"); - public static final ChannelConfigKey applicationInfoManager = new ChannelConfigKey<>("applicationInfoManager"); public static final ChannelConfigKey serverStatusManager = new ChannelConfigKey<>("serverStatusManager"); public static final ChannelConfigKey SSL_CLIENT_CERT_CHECK_REQUIRED = new ChannelConfigKey<>("requiresSslClientCertCheck", false); diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index 9c20e53fbf..bf4e674aee 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -19,12 +19,9 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; -import com.netflix.appinfo.AmazonInfo; -import com.netflix.appinfo.InstanceInfo; import com.netflix.client.config.IClientConfig; import com.netflix.client.config.IClientConfigKey; import com.netflix.loadbalancer.Server; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.zuul.exception.OutboundException; import com.netflix.zuul.netty.connectionpool.OriginConnectException; import io.netty.handler.timeout.ReadTimeoutException; @@ -55,46 +52,6 @@ public class RequestAttempt private int connectTimeout; private int maxRetries; - public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip, String chosenWarmupLB, int status, String error, String exceptionType, - int readTimeout, int connectTimeout, int maxRetries) - { - if (attemptNumber < 1) { - throw new IllegalArgumentException("Attempt number must be greater than 0! - " + attemptNumber); - } - this.attempt = attemptNumber; - this.vip = targetVip; - - if (server != null) { - this.app = server.getAppName().toLowerCase(); - this.asg = server.getASGName(); - this.instanceId = server.getInstanceId(); - this.host = server.getHostName(); - this.port = server.getPort(); - - // If targetVip is null, then try to use the actual server's vip. - if (targetVip == null) { - this.vip = server.getVIPAddress(); - } - - if (server.getDataCenterInfo() instanceof AmazonInfo) { - this.availabilityZone = ((AmazonInfo) server.getDataCenterInfo()).getMetadata().get("availability-zone"); - - // HACK - get region by just removing the last char from zone. - String az = getAvailabilityZone(); - if (az != null && az.length() > 0) { - this.region = az.substring(0, az.length() - 1); - } - } - } - - this.status = status; - this.error = error; - this.exceptionType = exceptionType; - this.readTimeout = readTimeout; - this.connectTimeout = connectTimeout; - this.maxRetries = maxRetries; - } - public RequestAttempt(final Server server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) { this.status = -1; this.attempt = attemptNumber; @@ -105,31 +62,11 @@ public RequestAttempt(final Server server, final IClientConfig clientConfig, int this.port = server.getPort(); this.availabilityZone = server.getZone(); - if (server instanceof DiscoveryEnabledServer) { - InstanceInfo instanceInfo = ((DiscoveryEnabledServer) server).getInstanceInfo(); - this.app = instanceInfo.getAppName().toLowerCase(); - this.asg = instanceInfo.getASGName(); - this.instanceId = instanceInfo.getInstanceId(); - this.host = instanceInfo.getHostName(); - this.port = instanceInfo.getPort(); - - if (server.getPort() == instanceInfo.getSecurePort()) { - this.vip = instanceInfo.getSecureVipAddress(); - } - else { - this.vip = instanceInfo.getVIPAddress(); - } - if (instanceInfo.getDataCenterInfo() instanceof AmazonInfo) { - this.availabilityZone = ((AmazonInfo) instanceInfo.getDataCenterInfo()).getMetadata().get("availability-zone"); - } - } - else { - final Server.MetaInfo metaInfo = server.getMetaInfo(); - if (metaInfo != null) { - this.asg = metaInfo.getServerGroup(); - this.vip = metaInfo.getServiceIdForDiscovery(); - this.instanceId = metaInfo.getInstanceId(); - } + final Server.MetaInfo metaInfo = server.getMetaInfo(); + if (metaInfo != null) { + this.asg = metaInfo.getServerGroup(); + this.vip = metaInfo.getServiceIdForDiscovery(); + this.instanceId = metaInfo.getInstanceId(); } // HACK - get region by just removing the last char from zone. if (availabilityZone != null && availabilityZone.length() > 0) { diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java index 844d6047ce..c008d4db68 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/BasicNettyOrigin.java @@ -23,7 +23,6 @@ import com.netflix.config.CachedDynamicIntProperty; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.reactive.ExecutionContext; -import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.Registry; import com.netflix.zuul.context.CommonContextKeys; @@ -43,7 +42,6 @@ import com.netflix.zuul.stats.status.StatusCategoryUtils; import io.netty.channel.EventLoop; import io.netty.util.concurrent.Promise; -import org.apache.commons.lang3.StringUtils; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -63,6 +61,7 @@ public class BasicNettyOrigin implements NettyOrigin { private final String name; private final String vip; + private final ServerIpAddrExtractor serverIpAddrExtractor; private final Registry registry; private final IClientConfig config; private final ClientChannelManager clientChannelManager; @@ -74,11 +73,18 @@ public class BasicNettyOrigin implements NettyOrigin { private final CachedDynamicBooleanProperty concurrencyProtectionEnabled; public BasicNettyOrigin(String name, String vip, Registry registry) { + this(name, vip, server -> null, registry); + } + + public BasicNettyOrigin(String name, String vip, + ServerIpAddrExtractor serverIpAddrExtractor, + Registry registry) { this.name = name; this.vip = vip; + this.serverIpAddrExtractor = serverIpAddrExtractor; this.registry = registry; this.config = setupClientConfig(name); - this.clientChannelManager = new DefaultClientChannelManager(name, vip, config, registry); + this.clientChannelManager = new DefaultClientChannelManager(name, vip, config, serverIpAddrExtractor, registry); this.clientChannelManager.init(); this.requestAttemptFactory = new NettyRequestAttemptFactory(); @@ -141,16 +147,7 @@ public RequestAttempt newRequestAttempt(Server server, SessionContext zuulCtx, i @Override public String getIpAddrFromServer(Server server) { - if (server instanceof DiscoveryEnabledServer) { - DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) server; - if (discoveryServer.getInstanceInfo() != null) { - String ip = discoveryServer.getInstanceInfo().getIPAddr(); - if (StringUtils.isNotBlank(ip)) { - return ip; - } - } - } - return null; + return serverIpAddrExtractor.getIpAddrFromServer(server); } @Override diff --git a/zuul-core/src/main/java/com/netflix/zuul/origins/ServerIpAddrExtractor.java b/zuul-core/src/main/java/com/netflix/zuul/origins/ServerIpAddrExtractor.java new file mode 100644 index 0000000000..50bd9d8943 --- /dev/null +++ b/zuul-core/src/main/java/com/netflix/zuul/origins/ServerIpAddrExtractor.java @@ -0,0 +1,12 @@ +package com.netflix.zuul.origins; + +import com.netflix.loadbalancer.Server; + +import javax.annotation.Nullable; + +public interface ServerIpAddrExtractor { + + @Nullable + String getIpAddrFromServer(Server server); + +} diff --git a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java index f43fb5eb73..6b7fa378e8 100644 --- a/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java +++ b/zuul-core/src/test/java/com/netflix/zuul/netty/server/ServerTest.java @@ -59,8 +59,7 @@ protected void initChannel(Channel ch) {} ClientConnectionsShutdown ccs = new ClientConnectionsShutdown( new DefaultChannelGroup(GlobalEventExecutor.INSTANCE), - GlobalEventExecutor.INSTANCE, - /* discoveryClient= */ null); + GlobalEventExecutor.INSTANCE); EventLoopGroupMetrics elgm = new EventLoopGroupMetrics(Spectator.globalRegistry()); EventLoopConfig elc = new EventLoopConfig() { @Override diff --git a/zuul-eureka/build.gradle b/zuul-eureka/build.gradle new file mode 100644 index 0000000000..d8c0886a95 --- /dev/null +++ b/zuul-eureka/build.gradle @@ -0,0 +1,22 @@ +apply plugin: "groovy" + +dependencies { + compile project(":zuul-core") + compile "com.netflix.ribbon:ribbon-eureka:${versions_ribbon}" + compile "com.netflix.eureka:eureka-client:1.9.4" + + testCompile "com.netflix.governator:governator-test-junit:1.+" + testCompile 'junit:junit:4.13-rc-1' + testRuntime 'org.slf4j:slf4j-simple:1.7.29' +} + +jar { + from sourceSets.main.allGroovy +} + +// Silences log statements during tests. This still allows normal failures to be printed. +test { + testLogging { + showStandardStreams = false + } +} diff --git a/zuul-eureka/dependencies.lock b/zuul-eureka/dependencies.lock new file mode 100644 index 0000000000..5e3392f460 --- /dev/null +++ b/zuul-eureka/dependencies.lock @@ -0,0 +1,2631 @@ +{ + "compile": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "compileClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "default": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "runtime": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "runtimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testCompile": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13", + "requested": "4.13-rc-1" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testCompileClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.5" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.2" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13", + "requested": "4.13-rc-1" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.25" + } + }, + "testRuntime": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13", + "requested": "4.13-rc-1" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.29" + }, + "org.slf4j:slf4j-simple": { + "locked": "1.7.29", + "requested": "1.7.29" + } + }, + "testRuntimeClasspath": { + "com.fasterxml.jackson.core:jackson-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.fasterxml.jackson.core:jackson-databind": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.9.8" + }, + "com.google.guava:guava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "28.1-jre" + }, + "com.google.inject.extensions:guice-assistedinject": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-grapher": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-multibindings": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-servlet": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject.extensions:guice-throwingproviders": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.google.inject:guice": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.2.2", + "requested": "4.2.2" + }, + "com.netflix.archaius:archaius-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.7.6" + }, + "com.netflix.eureka:eureka-client": { + "locked": "1.9.4", + "requested": "1.9.4" + }, + "com.netflix.governator:governator": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-archaius": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.17.10" + }, + "com.netflix.governator:governator-test-junit": { + "locked": "1.17.10", + "requested": "1.+" + }, + "com.netflix.netflix-commons:netflix-commons-util": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.3.0" + }, + "com.netflix.ribbon:ribbon-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-eureka": { + "locked": "2.2.4", + "requested": "2.2.4" + }, + "com.netflix.ribbon:ribbon-httpclient": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.ribbon:ribbon-loadbalancer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.2.4" + }, + "com.netflix.servo:servo-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.12.21" + }, + "com.netflix.spectator:spectator-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.59.0" + }, + "com.netflix.zuul:zuul-core": { + "project": true + }, + "commons-collections:commons-collections": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.2.2" + }, + "commons-configuration:commons-configuration": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.8" + }, + "commons-fileupload:commons-fileupload": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.3" + }, + "commons-io:commons-io": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4" + }, + "io.netty:netty-buffer": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-haproxy": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-codec-http2": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-common": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-handler": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-resolver": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-tcnative-boringssl-static": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.0.28.Final" + }, + "io.netty:netty-transport": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-epoll": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.netty:netty-transport-native-kqueue": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.1.45.Final" + }, + "io.perfmark:perfmark-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "0.20.1" + }, + "io.reactivex:rxjava": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.1" + }, + "junit:junit": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "4.13", + "requested": "4.13-rc-1" + }, + "log4j:log4j": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.2.17" + }, + "org.apache.commons:commons-lang3": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "3.4" + }, + "org.bouncycastle:bcpg-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.bouncycastle:bcprov-jdk15on": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.64" + }, + "org.codehaus.groovy:groovy-all": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "2.4.4" + }, + "org.json:json": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "20090211" + }, + "org.mockito:mockito-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.9.5" + }, + "org.slf4j:slf4j-api": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-core" + ], + "locked": "1.7.29" + }, + "org.slf4j:slf4j-simple": { + "locked": "1.7.29", + "requested": "1.7.29" + } + } +} \ No newline at end of file diff --git a/zuul-eureka/src/main/java/com/netflix/netty/common/status/EurekaServerStatusManager.java b/zuul-eureka/src/main/java/com/netflix/netty/common/status/EurekaServerStatusManager.java new file mode 100644 index 0000000000..74137ab250 --- /dev/null +++ b/zuul-eureka/src/main/java/com/netflix/netty/common/status/EurekaServerStatusManager.java @@ -0,0 +1,82 @@ +/* + * Copyright 2018 Netflix, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.netflix.netty.common.status; + +import com.netflix.appinfo.ApplicationInfoManager; +import com.netflix.appinfo.InstanceInfo.InstanceStatus; +import com.netflix.discovery.DiscoveryClient; + +import javax.inject.Inject; +import javax.inject.Singleton; + +import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UNKNOWN; +import static com.netflix.appinfo.InstanceInfo.InstanceStatus.UP; + +/** + * User: michaels@netflix.com + * Date: 7/6/17 + * Time: 3:37 PM + */ +@Singleton +public class EurekaServerStatusManager implements ServerStatusManager { + private final ApplicationInfoManager applicationInfoManager; + private final DiscoveryClient discoveryClient; + + @Inject + public EurekaServerStatusManager(ApplicationInfoManager applicationInfoManager, DiscoveryClient discoveryClient) { + super(); + this.applicationInfoManager = applicationInfoManager; + this.discoveryClient = discoveryClient; + } + + public InstanceStatus status() { + + // NOTE: when debugging this locally, found to my surprise that when the instance is maked OUT_OF_SERVICE remotely + // in Discovery, although the StatusChangeEvent does get fired, the _local_ InstanceStatus (ie. + // applicationInfoManager.getInfo().getStatus()) does not get changed to reflect that. + // So that's why I'm doing this little dance here of looking at both remote and local statuses. + + InstanceStatus local = localStatus(); + InstanceStatus remote = remoteStatus(); + + if (local == UP && remote != UNKNOWN) { + return remote; + } + else { + return local; + } + } + + public InstanceStatus localStatus() { + return applicationInfoManager.getInfo().getStatus(); + } + + public InstanceStatus remoteStatus() { + return discoveryClient.getInstanceRemoteStatus(); + } + + @Override + public void localStatus(ServerStatus status) { + InstanceStatus instanceStatus = status == ServerStatus.UP ? InstanceStatus.UP : InstanceStatus.DOWN; + applicationInfoManager.setInstanceStatus(instanceStatus); + } + + public int health() { + // TODO + throw new UnsupportedOperationException(); + } +} diff --git a/zuul-eureka/src/main/java/com/netflix/zuul/ZuulEurekaDiscoveryModule.java b/zuul-eureka/src/main/java/com/netflix/zuul/ZuulEurekaDiscoveryModule.java new file mode 100644 index 0000000000..dfeadc629d --- /dev/null +++ b/zuul-eureka/src/main/java/com/netflix/zuul/ZuulEurekaDiscoveryModule.java @@ -0,0 +1,45 @@ +package com.netflix.zuul; + +import com.google.inject.AbstractModule; +import com.google.inject.Inject; +import com.google.inject.Provider; +import com.netflix.discovery.EurekaClient; +import com.netflix.netty.common.status.EurekaServerStatusManager; +import com.netflix.netty.common.status.ServerStatusManager; +import com.netflix.zuul.netty.server.BaseServerStartup; +import com.netflix.zuul.netty.server.OutOfServiceConnectionsShutdown; +import com.netflix.zuul.origins.DiscoveryEnabledNettyOriginManager; +import com.netflix.zuul.origins.OriginManager; +import io.netty.util.concurrent.GlobalEventExecutor; + +public class ZuulEurekaDiscoveryModule extends AbstractModule { + + @Override + protected void configure() { + bind(OriginManager.class).to(DiscoveryEnabledNettyOriginManager.class); + + bind(OutOfServiceConnectionsShutdown.class).toProvider(OutOfServiceConnectionsShutdownProvider.class).asEagerSingleton();; + + bind(EurekaServerStatusManager.class); + bind(ServerStatusManager.class).to(EurekaServerStatusManager.class); // health/discovery status + } + + static class OutOfServiceConnectionsShutdownProvider implements Provider { + + private final EurekaClient eurekaClient; + private final BaseServerStartup baseServerStartup; + + @Inject + public OutOfServiceConnectionsShutdownProvider(EurekaClient eurekaClient, BaseServerStartup baseServerStartup) { + this.eurekaClient = eurekaClient; + this.baseServerStartup = baseServerStartup; + } + + @Override + public OutOfServiceConnectionsShutdown get() { + return new OutOfServiceConnectionsShutdown(eurekaClient, GlobalEventExecutor.INSTANCE, + baseServerStartup.server()); + } + } + +} diff --git a/zuul-eureka/src/main/java/com/netflix/zuul/netty/server/OutOfServiceConnectionsShutdown.java b/zuul-eureka/src/main/java/com/netflix/zuul/netty/server/OutOfServiceConnectionsShutdown.java new file mode 100644 index 0000000000..c8929d8e26 --- /dev/null +++ b/zuul-eureka/src/main/java/com/netflix/zuul/netty/server/OutOfServiceConnectionsShutdown.java @@ -0,0 +1,60 @@ +package com.netflix.zuul.netty.server; + +import com.netflix.appinfo.InstanceInfo; +import com.netflix.config.DynamicBooleanProperty; +import com.netflix.config.DynamicIntProperty; +import com.netflix.discovery.EurekaClient; +import com.netflix.discovery.StatusChangeEvent; +import io.netty.util.concurrent.EventExecutor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.TimeUnit; + +public class OutOfServiceConnectionsShutdown { + + private static final Logger LOG = LoggerFactory.getLogger(OutOfServiceConnectionsShutdown.class); + + private static final DynamicBooleanProperty ENABLED = new DynamicBooleanProperty("server.outofservice.connections.shutdown", false); + private static final DynamicIntProperty DELAY_AFTER_OUT_OF_SERVICE_MS = + new DynamicIntProperty("server.outofservice.connections.delay", 2000); + + private final EurekaClient discoveryClient; + private final EventExecutor executor; + private final Server server; + + public OutOfServiceConnectionsShutdown(EurekaClient discoveryClient, + EventExecutor executor, + Server server) { + this.discoveryClient = discoveryClient; + this.executor = executor; + this.server = server; + initDiscoveryListener(); + } + + private void initDiscoveryListener() { + this.discoveryClient.registerEventListener(event -> { + if (event instanceof StatusChangeEvent) { + StatusChangeEvent sce = (StatusChangeEvent) event; + + LOG.info("Received " + sce.toString()); + + if (sce.getPreviousStatus() == InstanceInfo.InstanceStatus.UP && ( + sce.getStatus() == InstanceInfo.InstanceStatus.OUT_OF_SERVICE || + sce.getStatus() == InstanceInfo.InstanceStatus.DOWN)) { + // TODO - Also should stop accepting any new client connections now too? + + // Schedule to gracefully close all the client connections. + if (ENABLED.get()) { + executor.schedule(server::gracefullyShutdownConnections, + DELAY_AFTER_OUT_OF_SERVICE_MS.get(), + TimeUnit.MILLISECONDS); + } + } + } + }); + + LOG.info("Started listening for events from Eureka"); + } + +} diff --git a/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryEnabledNettyOrigin.java b/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryEnabledNettyOrigin.java new file mode 100644 index 0000000000..17c6e66549 --- /dev/null +++ b/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryEnabledNettyOrigin.java @@ -0,0 +1,43 @@ +package com.netflix.zuul.origins; + +import com.netflix.appinfo.AmazonInfo; +import com.netflix.appinfo.InstanceInfo; +import com.netflix.loadbalancer.Server; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import com.netflix.spectator.api.Registry; +import com.netflix.zuul.context.SessionContext; +import com.netflix.zuul.niws.RequestAttempt; + +public class DiscoveryEnabledNettyOrigin extends BasicNettyOrigin { + + public DiscoveryEnabledNettyOrigin(String name, String vip, Registry registry) { + super(name, vip, new DiscoveryServerIpAddrExtractor(), registry); + } + + @Override + public RequestAttempt newRequestAttempt(Server server, SessionContext zuulCtx, int attemptNum) { + RequestAttempt requestAttempt = super.newRequestAttempt(server, zuulCtx, attemptNum); + if (server instanceof DiscoveryEnabledServer) { + InstanceInfo instanceInfo = ((DiscoveryEnabledServer) server).getInstanceInfo(); + requestAttempt.setApp(instanceInfo.getAppName().toLowerCase()); + requestAttempt.setAsg(instanceInfo.getASGName()); + requestAttempt.setInstanceId(instanceInfo.getInstanceId()); + requestAttempt.setHost(instanceInfo.getHostName()); + requestAttempt.setPort(instanceInfo.getPort()); + + if (server.getPort() == instanceInfo.getSecurePort()) { + requestAttempt.setVip(instanceInfo.getSecureVipAddress()); + } else { + requestAttempt.setVip(instanceInfo.getVIPAddress()); + } + + if (instanceInfo.getDataCenterInfo() instanceof AmazonInfo) { + String availabilityZone = ((AmazonInfo) instanceInfo.getDataCenterInfo()).getMetadata().get("availability-zone"); + requestAttempt.setAvailabilityZone(availabilityZone); + } + } + + return requestAttempt; + } + +} diff --git a/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryEnabledNettyOriginManager.java b/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryEnabledNettyOriginManager.java new file mode 100644 index 0000000000..5acb2bcf7d --- /dev/null +++ b/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryEnabledNettyOriginManager.java @@ -0,0 +1,31 @@ +package com.netflix.zuul.origins; + +import com.netflix.spectator.api.Registry; +import com.netflix.zuul.context.SessionContext; + +import javax.inject.Inject; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class DiscoveryEnabledNettyOriginManager implements OriginManager { + + private final Registry registry; + private final Map originMappings; + + @Inject + public DiscoveryEnabledNettyOriginManager(Registry registry) { + this.registry = registry; + this.originMappings = new ConcurrentHashMap<>(); + } + + @Override + public DiscoveryEnabledNettyOrigin getOrigin(String name, String vip, String uri, SessionContext ctx) { + return originMappings.computeIfAbsent(name, n -> createOrigin(name, vip, uri, false, ctx)); + } + + @Override + public DiscoveryEnabledNettyOrigin createOrigin(String name, String vip, String uri, boolean useFullVipName, SessionContext ctx) { + return new DiscoveryEnabledNettyOrigin(name, vip, registry); + } + +} diff --git a/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryServerIpAddrExtractor.java b/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryServerIpAddrExtractor.java new file mode 100644 index 0000000000..36a75970af --- /dev/null +++ b/zuul-eureka/src/main/java/com/netflix/zuul/origins/DiscoveryServerIpAddrExtractor.java @@ -0,0 +1,29 @@ +package com.netflix.zuul.origins; + +import com.netflix.loadbalancer.Server; +import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; +import org.apache.commons.lang3.StringUtils; + +import javax.annotation.Nullable; +import javax.inject.Singleton; + +@Singleton +public class DiscoveryServerIpAddrExtractor implements ServerIpAddrExtractor { + + @Nullable + @Override + public String getIpAddrFromServer(Server server) { + if (server instanceof DiscoveryEnabledServer) { + DiscoveryEnabledServer discoveryServer = (DiscoveryEnabledServer) server; + if (discoveryServer.getInstanceInfo() != null) { + String ip = discoveryServer.getInstanceInfo().getIPAddr(); + if (StringUtils.isNotBlank(ip)) { + return ip; + } + } + } + + return null; + } + +} diff --git a/zuul-core/src/main/java/com/netflix/zuul/stats/AmazonInfoHolder.java b/zuul-eureka/src/main/java/com/netflix/zuul/stats/AmazonInfoHolder.java similarity index 100% rename from zuul-core/src/main/java/com/netflix/zuul/stats/AmazonInfoHolder.java rename to zuul-eureka/src/main/java/com/netflix/zuul/stats/AmazonInfoHolder.java diff --git a/zuul-sample/build.gradle b/zuul-sample/build.gradle index d9abcae6c9..399ae13d96 100644 --- a/zuul-sample/build.gradle +++ b/zuul-sample/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'application' dependencies { compile project(":zuul-core") + compile project(":zuul-eureka") compile 'com.netflix.blitz4j:blitz4j:1.37.2' } diff --git a/zuul-sample/dependencies.lock b/zuul-sample/dependencies.lock index ac2f0741e9..f9df46309f 100644 --- a/zuul-sample/dependencies.lock +++ b/zuul-sample/dependencies.lock @@ -20,42 +20,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -72,7 +78,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -108,7 +114,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -137,6 +143,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -317,42 +329,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -369,7 +387,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -405,7 +423,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -434,6 +452,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -614,42 +638,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -666,7 +696,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -702,7 +732,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -731,6 +761,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -911,42 +947,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -963,7 +1005,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -999,7 +1041,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -1028,6 +1070,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -1208,42 +1256,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -1260,7 +1314,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -1296,7 +1350,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -1325,6 +1379,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -1505,42 +1565,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -1557,7 +1623,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -1593,7 +1659,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -1622,6 +1688,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -1802,42 +1874,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -1854,7 +1932,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -1890,7 +1968,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -1919,6 +1997,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -2099,42 +2183,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -2151,7 +2241,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -2187,7 +2277,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -2216,6 +2306,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { @@ -2396,42 +2492,48 @@ }, "com.google.inject.extensions:guice-assistedinject": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-grapher": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-multibindings": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-servlet": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject.extensions:guice-throwingproviders": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" }, "com.google.inject:guice": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-core", + "com.netflix.zuul:zuul-eureka" ], "locked": "4.2.2", "requested": "4.2.2" @@ -2448,7 +2550,7 @@ }, "com.netflix.eureka:eureka-client": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "1.9.4" }, @@ -2484,7 +2586,7 @@ }, "com.netflix.ribbon:ribbon-eureka": { "firstLevelTransitive": [ - "com.netflix.zuul:zuul-core" + "com.netflix.zuul:zuul-eureka" ], "locked": "2.2.4" }, @@ -2513,6 +2615,12 @@ "locked": "0.59.0" }, "com.netflix.zuul:zuul-core": { + "firstLevelTransitive": [ + "com.netflix.zuul:zuul-eureka" + ], + "project": true + }, + "com.netflix.zuul:zuul-eureka": { "project": true }, "commons-collections:commons-collections": { diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java index 7a13284a66..b783cc9778 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/SampleServerStartup.java @@ -16,38 +16,41 @@ package com.netflix.zuul.sample; -import com.netflix.appinfo.ApplicationInfoManager; import com.netflix.config.DynamicIntProperty; -import com.netflix.discovery.EurekaClient; +import com.netflix.netty.common.accesslog.AccessLogPublisher; +import com.netflix.netty.common.channel.config.ChannelConfig; +import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; +import com.netflix.netty.common.metrics.EventLoopGroupMetrics; +import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler; +import com.netflix.netty.common.ssl.ServerSslConfig; +import com.netflix.netty.common.status.ServerStatusManager; import com.netflix.spectator.api.Registry; import com.netflix.zuul.FilterLoader; import com.netflix.zuul.FilterUsageNotifier; import com.netflix.zuul.RequestCompleteHandler; import com.netflix.zuul.context.SessionContextDecorator; -import com.netflix.zuul.netty.server.*; +import com.netflix.zuul.netty.server.BaseServerStartup; +import com.netflix.zuul.netty.server.DirectMemoryMonitor; +import com.netflix.zuul.netty.server.Http1MutualSslChannelInitializer; +import com.netflix.zuul.netty.server.SocketAddressProperty; +import com.netflix.zuul.netty.server.ZuulDependencyKeys; +import com.netflix.zuul.netty.server.ZuulServerChannelInitializer; import com.netflix.zuul.netty.server.http2.Http2SslChannelInitializer; import com.netflix.zuul.netty.server.push.PushConnectionRegistry; import com.netflix.zuul.netty.ssl.BaseSslContextFactory; +import com.netflix.zuul.sample.push.SamplePushMessageSenderInitializer; import com.netflix.zuul.sample.push.SampleSSEPushChannelInitializer; import com.netflix.zuul.sample.push.SampleWebSocketPushChannelInitializer; -import com.netflix.zuul.sample.push.SamplePushMessageSenderInitializer; import io.netty.channel.ChannelInitializer; import io.netty.channel.group.ChannelGroup; import io.netty.handler.ssl.ClientAuth; -import com.netflix.netty.common.accesslog.AccessLogPublisher; -import com.netflix.netty.common.channel.config.ChannelConfig; -import com.netflix.netty.common.channel.config.CommonChannelConfigKeys; -import com.netflix.netty.common.metrics.EventLoopGroupMetrics; -import com.netflix.netty.common.proxyprotocol.StripUntrustedProxyHeadersHandler; -import com.netflix.netty.common.ssl.ServerSslConfig; -import com.netflix.netty.common.status.ServerStatusManager; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import java.util.Collections; import javax.inject.Inject; import javax.inject.Singleton; import java.io.File; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -78,12 +81,10 @@ public SampleServerStartup(ServerStatusManager serverStatusManager, FilterLoader SessionContextDecorator sessionCtxDecorator, FilterUsageNotifier usageNotifier, RequestCompleteHandler reqCompleteHandler, Registry registry, DirectMemoryMonitor directMemoryMonitor, EventLoopGroupMetrics eventLoopGroupMetrics, - EurekaClient discoveryClient, ApplicationInfoManager applicationInfoManager, AccessLogPublisher accessLogPublisher, PushConnectionRegistry pushConnectionRegistry, SamplePushMessageSenderInitializer pushSenderInitializer) { super(serverStatusManager, filterLoader, sessionCtxDecorator, usageNotifier, reqCompleteHandler, registry, - directMemoryMonitor, eventLoopGroupMetrics, discoveryClient, applicationInfoManager, - accessLogPublisher); + directMemoryMonitor, eventLoopGroupMetrics, accessLogPublisher); this.pushConnectionRegistry = pushConnectionRegistry; this.pushSenderInitializer = pushSenderInitializer; } diff --git a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java index b179105102..e6dc4ffbb4 100644 --- a/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java +++ b/zuul-sample/src/main/java/com/netflix/zuul/sample/ZuulSampleModule.java @@ -21,19 +21,17 @@ import com.netflix.discovery.AbstractDiscoveryClientOptionalArgs; import com.netflix.discovery.DiscoveryClient; import com.netflix.netty.common.accesslog.AccessLogPublisher; -import com.netflix.netty.common.status.ServerStatusManager; import com.netflix.spectator.api.DefaultRegistry; import com.netflix.spectator.api.Registry; import com.netflix.zuul.BasicRequestCompleteHandler; import com.netflix.zuul.FilterFileManager; import com.netflix.zuul.RequestCompleteHandler; +import com.netflix.zuul.ZuulEurekaDiscoveryModule; import com.netflix.zuul.context.SessionContextDecorator; import com.netflix.zuul.context.ZuulSessionContextDecorator; import com.netflix.zuul.init.ZuulFiltersModule; import com.netflix.zuul.netty.server.BaseServerStartup; import com.netflix.zuul.netty.server.ClientRequestReceiver; -import com.netflix.zuul.origins.BasicNettyOriginManager; -import com.netflix.zuul.origins.OriginManager; import com.netflix.zuul.stats.BasicRequestMetricsPublisher; import com.netflix.zuul.stats.RequestMetricsPublisher; import org.apache.commons.configuration.AbstractConfiguration; @@ -58,15 +56,11 @@ protected void configure() { // sample specific bindings bind(BaseServerStartup.class).to(SampleServerStartup.class); - // use provided basic netty origin manager - bind(OriginManager.class).to(BasicNettyOriginManager.class); - // zuul filter loading install(new ZuulFiltersModule()); bind(FilterFileManager.class).asEagerSingleton(); // general server bindings - bind(ServerStatusManager.class); // health/discovery status bind(SessionContextDecorator.class).to(ZuulSessionContextDecorator.class); // decorate new sessions when requests come in bind(Registry.class).to(DefaultRegistry.class); // atlas metrics registry bind(RequestCompleteHandler.class).to(BasicRequestCompleteHandler.class); // metrics post-request completion @@ -76,5 +70,7 @@ protected void configure() { // access logger, including request ID generator bind(AccessLogPublisher.class).toInstance(new AccessLogPublisher("ACCESS", (channel, httpRequest) -> ClientRequestReceiver.getRequestFromChannel(channel).getContext().getUUID())); + + install(new ZuulEurekaDiscoveryModule()); } }