Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config documentation #426

Merged
merged 14 commits into from
Jun 11, 2019

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ admin:
maxContentLength: 65536

loadBalancing:
strategy: adaptive
strategies:
adaptive:
factory: {class: "com.hotels.styx.client.loadbalancing.strategies.StrategyFactory"}
warmUpCount: 100
rr:
factory: {class: "com.hotels.styx.client.loadbalancing.strategies.StrategyFactory"}
strategy:
factory: {class: "com.hotels.styx.client.loadbalancing.strategies.PowerOfTwoStrategy$Factory"}

metrics:
graphite:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public String type() {
return "https";
}

/**
* Implementation of SSL functionality, can be JDK or OPENSSL.
*
* @return SSL provider
*/
public String sslProvider() {
return sslProvider;
}
Expand All @@ -72,18 +77,38 @@ public String certificateKeyFile() {
return certificateKeyFile;
}

/**
* The cipher suites to enable, in the order of preference.
*
* @return cipher suites
*/
public List<String> ciphers() {
return cipherSuites;
}

/**
* Timeout for the cached SSL session objects.
*
* @return timeout
*/
public long sessionTimeoutMillis() {
return sessionTimeoutMillis;
}

/**
* Size of the cache used for storing SSL session objects.
*
* @return cache size
*/
public long sessionCacheSize() {
return sessionCacheSize;
}

/**
* The TLS protocol versions to enable.
*
* @return protocols
*/
public List<String> protocols() {
return protocols;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@

/**
* Factory for creating netty channel implementation based on the current system.
*
*/
public interface ServerEventLoopFactory {

/**
* EventLoopGroup for establishing new channels.
*
* @return event loop group
*/
EventLoopGroup newBossEventLoopGroup();

/**
* EventLoopGroup for handling events on channels.
*
* @return event loop group
*/
EventLoopGroup newWorkerEventLoopGroup();

Class<? extends ServerChannel> serverChannelClass();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2013-2018 Expedia Inc.
Copyright (C) 2013-2019 Expedia Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -113,10 +113,20 @@ public Iterable<ConnectorConfig> connectors() {
return connectors;
}

/**
* Number of threads for establishing new channels.
*
* @return number of threads
*/
public int bossThreadsCount() {
return this.bossThreadsCount;
}

/**
* Worker threads are those performing all the asynchronous I/O operation on the inbound channel.
*
* @return number of threads
*/
public int workerThreadsCount() {
return this.workerThreadsCount;
}
Expand All @@ -125,42 +135,84 @@ public int nioAcceptorBacklog() {
return this.nioAcceptorBacklog;
}

/*
TODO unused: https://github.com/HotelsDotCom/styx/issues/428
*/
public boolean tcpNoDelay() {
return this.tcpNoDelay;
}

/*
TODO unused: https://github.com/HotelsDotCom/styx/issues/428
*/
public boolean nioReuseAddress() {
return this.nioReuseAddress;
}

/**
* The maximum length in bytes of the initial line of an HTTP message, e.g. {@code GET http://example.org/ HTTP/1.1}.
*
* @return maximum length of initial line
*/
public int maxInitialLineLength() {
return this.maxInitialLineLength;
}

/**
* The maximum combined size of the HTTP headers in bytes.
*
* @return maximum combined size of headers
*/
public int maxHeaderSize() {
return this.maxHeaderSize;
}

/**
* The maximum size of an HTTP chunk in bytes.
*
* @return maximum chunk size
*/
public int maxChunkSize() {
return this.maxChunkSize;
}

/*
TODO unused: https://github.com/HotelsDotCom/styx/issues/428
*/
public int maxContentLength() {
return this.maxContentLength;
}

/**
* Time in milliseconds Styx Proxy Service waits for an incoming request from client.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is bit vague.

It would be worth clarifying that this parameter controls the amount of tolerated inactivity while the request is being received. If the client started sending the request, and then suddenly cuts it off, styx would detect this after requestTimeoutMillis.

*
* @return time in millis
*/
public int requestTimeoutMillis() {
return this.requestTimeoutMs;
}

/**
* A timeout for idle persistent connections, in milliseconds.
*
* @return time in millis
*/
public int keepAliveTimeoutMillis() {
return this.keepAliveTimeoutMillis;
}

/**
* Max connections to server before we start rejecting them.
*
* @return max number of connections
*/
public int maxConnectionsCount() {
return this.maxConnectionsCount;
}

/*
TODO unused: https://github.com/HotelsDotCom/styx/issues/428
*/
public boolean nioKeepAlive() {
return this.nioKeepAlive;
}
Expand Down
6 changes: 2 additions & 4 deletions docs/user-guide/configure-load-balancing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Styx supports three load balancing strategies:

- Round robin
- Power of two
- Round-robin
- Busy

Styx also provides a mechanism to bypass the load balancer and force
Expand Down Expand Up @@ -71,7 +72,4 @@ To enable *Round Robin* load balancing strategy:
strategy:
factory: {class: "com.hotels.styx.client.loadbalancing.strategies.RoundRobinStrategy$Factory"}

The *requestCount* attribute determines how long the adaptive strategy
remains in the Round Robin phase before switching over to the *Busy* strategy.
Its value is the number of requests proxied *per origin*.

Loading