public ConnectionPoolConfigImpl(final String originName, IClientConfig clientConfig) { this.originName = originName; this.clientConfig = clientConfig; this.MAX_REQUESTS_PER_CONNECTION = new CachedDynamicIntProperty(originName+".netty.client.maxRequestsPerConnection", 1000); // NOTE that the each eventloop has it's own connection pool per host, and this is applied per event-loop. this.PER_SERVER_WATERLINE = new CachedDynamicIntProperty(originName+".netty.client.perServerWaterline", 4); this.SOCKET_KEEP_ALIVE = new CachedDynamicBooleanProperty(originName+".netty.client.TcpKeepAlive", false); this.TCP_NO_DELAY = new CachedDynamicBooleanProperty(originName+".netty.client.TcpNoDelay", false); this.WRITE_BUFFER_HIGH_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferHighWaterMark", 32 * 1024); this.WRITE_BUFFER_LOW_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferLowWaterMark", 8 * 1024); this.AUTO_READ = new CachedDynamicBooleanProperty(originName+".netty.client.AutoRead", false); }
public ConnectionPoolConfigImpl(final String originName, IClientConfig clientConfig) { this.originName = originName; this.clientConfig = clientConfig; this.MAX_REQUESTS_PER_CONNECTION = new CachedDynamicIntProperty(originName+".netty.client.maxRequestsPerConnection", 1000); // NOTE that the each eventloop has it's own connection pool per host, and this is applied per event-loop. this.PER_SERVER_WATERLINE = new CachedDynamicIntProperty(originName+".netty.client.perServerWaterline", 4); this.SOCKET_KEEP_ALIVE = new CachedDynamicBooleanProperty(originName+".netty.client.TcpKeepAlive", false); this.TCP_NO_DELAY = new CachedDynamicBooleanProperty(originName+".netty.client.TcpNoDelay", false); this.WRITE_BUFFER_HIGH_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferHighWaterMark", 32 * 1024); this.WRITE_BUFFER_LOW_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferLowWaterMark", 8 * 1024); this.AUTO_READ = new CachedDynamicBooleanProperty(originName+".netty.client.AutoRead", false); }
protected BaseFilter() { baseName = this.getClass().getSimpleName() + "." + filterType().toString(); concurrentCount = SpectatorUtils.newGauge("zuul.filter.concurrency.current", baseName, new AtomicInteger(0)); concurrencyRejections = SpectatorUtils.newCounter("zuul.filter.concurrency.rejected", baseName); filterDisabled = new CachedDynamicBooleanProperty(disablePropertyName(), false); filterConcurrencyLimit = new CachedDynamicIntProperty(maxConcurrencyPropertyName(), 4000); }
public BasicNettyOrigin(String name, String vip, Registry registry) { this.name = name; this.vip = vip; this.registry = registry; this.config = setupClientConfig(name); this.clientChannelManager = new DefaultClientChannelManager(name, vip, config, registry); this.clientChannelManager.init(); this.requestAttemptFactory = new NettyRequestAttemptFactory(); this.concurrentRequests = SpectatorUtils.newGauge("zuul.origin.concurrent.requests", name, new AtomicInteger(0)); this.rejectedRequests = SpectatorUtils.newCounter("zuul.origin.rejected.requests", name); this.concurrencyMax = new CachedDynamicIntProperty("zuul.origin." + name + ".concurrency.max.requests", 200); this.concurrencyProtectionEnabled = new CachedDynamicBooleanProperty("zuul.origin." + name + ".concurrency.protect.enabled", true); }
protected BaseFilter() { baseName = this.getClass().getSimpleName() + "." + filterType().toString(); concurrentCount = SpectatorUtils.newGauge("zuul.filter.concurrency.current", baseName, new AtomicInteger(0)); concurrencyRejections = SpectatorUtils.newCounter("zuul.filter.concurrency.rejected", baseName); filterDisabled = new CachedDynamicBooleanProperty(disablePropertyName(), false); filterConcurrencyLimit = new CachedDynamicIntProperty(maxConcurrencyPropertyName(), 4000); }
public BasicNettyOrigin(String name, String vip, Registry registry) { this.name = name; this.vip = vip; this.registry = registry; this.config = setupClientConfig(name); this.clientChannelManager = new DefaultClientChannelManager(name, vip, config, registry); this.clientChannelManager.init(); this.requestAttemptFactory = new NettyRequestAttemptFactory(); this.concurrentRequests = SpectatorUtils.newGauge("zuul.origin.concurrent.requests", name, new AtomicInteger(0)); this.rejectedRequests = SpectatorUtils.newCounter("zuul.origin.rejected.requests", name); this.concurrencyMax = new CachedDynamicIntProperty("zuul.origin." + name + ".concurrency.max.requests", 200); this.concurrencyProtectionEnabled = new CachedDynamicBooleanProperty("zuul.origin." + name + ".concurrency.protect.enabled", true); }
CachedDynamicIntProperty getCircuitTripMaxTimeoutSeconds() { if (maxCircuitTrippedTimeout == null) { maxCircuitTrippedTimeout = new CachedDynamicIntProperty( "niws.loadbalancer." + name + ".circuitTripMaxTimeoutSeconds", 30); } return maxCircuitTrippedTimeout; }
public ServerStats() { connectionFailureThreshold = new CachedDynamicIntProperty( "niws.loadbalancer.default.connectionFailureCountThreshold", 3); circuitTrippedTimeoutFactor = new CachedDynamicIntProperty( "niws.loadbalancer.default.circuitTripTimeoutFactorSeconds", 10); maxCircuitTrippedTimeout = new CachedDynamicIntProperty( "niws.loadbalancer.default.circuitTripMaxTimeoutSeconds", 30); }
CachedDynamicIntProperty getConnectionFailureCountThreshold() { if (connectionFailureThreshold == null) { connectionFailureThreshold = new CachedDynamicIntProperty( "niws.loadbalancer." + name + ".connectionFailureCountThreshold", 3); } return connectionFailureThreshold; }
CachedDynamicIntProperty getCircuitTrippedTimeoutFactor() { if (circuitTrippedTimeoutFactor == null) { circuitTrippedTimeoutFactor = new CachedDynamicIntProperty( "niws.loadbalancer." + name + ".circuitTripTimeoutFactorSeconds", 10); } return circuitTrippedTimeoutFactor; }
public ConnectionPoolConfigImpl(final String originName, IClientConfig clientConfig) { this.originName = originName; this.clientConfig = clientConfig; this.MAX_REQUESTS_PER_CONNECTION = new CachedDynamicIntProperty(originName+".netty.client.maxRequestsPerConnection", 1000); // NOTE that the each eventloop has it's own connection pool per host, and this is applied per event-loop. this.PER_SERVER_WATERLINE = new CachedDynamicIntProperty(originName+".netty.client.perServerWaterline", 4); this.SOCKET_KEEP_ALIVE = new CachedDynamicBooleanProperty(originName+".netty.client.TcpKeepAlive", false); this.TCP_NO_DELAY = new CachedDynamicBooleanProperty(originName+".netty.client.TcpNoDelay", false); this.WRITE_BUFFER_HIGH_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferHighWaterMark", 32 * 1024); this.WRITE_BUFFER_LOW_WATER_MARK = new CachedDynamicIntProperty(originName+".netty.client.WriteBufferLowWaterMark", 8 * 1024); this.AUTO_READ = new CachedDynamicBooleanProperty(originName+".netty.client.AutoRead", false); }
protected BaseFilter() { baseName = this.getClass().getSimpleName() + "." + filterType().toString(); concurrentCount = SpectatorUtils.newGauge("zuul.filter.concurrency.current", baseName, new AtomicInteger(0)); concurrencyRejections = SpectatorUtils.newCounter("zuul.filter.concurrency.rejected", baseName); filterDisabled = new CachedDynamicBooleanProperty(disablePropertyName(), false); filterConcurrencyLimit = new CachedDynamicIntProperty(maxConcurrencyPropertyName(), 4000); }
public BasicNettyOrigin(String name, String vip, Registry registry) { this.name = name; this.vip = vip; this.registry = registry; this.config = setupClientConfig(name); this.clientChannelManager = new DefaultClientChannelManager(name, vip, config, registry); this.clientChannelManager.init(); this.requestAttemptFactory = new NettyRequestAttemptFactory(); this.concurrentRequests = SpectatorUtils.newGauge("zuul.origin.concurrent.requests", name, new AtomicInteger(0)); this.rejectedRequests = SpectatorUtils.newCounter("zuul.origin.rejected.requests", name); this.concurrencyMax = new CachedDynamicIntProperty("zuul.origin." + name + ".concurrency.max.requests", 200); this.concurrencyProtectionEnabled = new CachedDynamicBooleanProperty("zuul.origin." + name + ".concurrency.protect.enabled", true); }