-
Notifications
You must be signed in to change notification settings - Fork 0
D2 Zookeeper Properties
|
Property Name |
Description |
Example |
Type |
Notes |
|---|---|---|---|---|
|
getTimeout |
Timeout, in ms, to get a connection from the pool or create one |
10000 |
Service Properties |
Same as requestTimeout (use http.requestTimeout instead). We are deprecating this key. |
|
poolSize |
Maximum size of the underlying HTTP connection pool |
10 |
Service Properties |
deprecated see http.poolSize |
|
requestTimeout |
Timeout, in ms, to get a connection from the pool or create one |
10000 |
Service Properties |
deprecated see http.requestTimeout |
|
idleTimeout |
Interval after which idle connections will be automatically closed |
10000 |
Service Properties |
deprecated see http.idleTimeout |
|
shutdownTimeout |
Timeout, in ms, the client should wait after shutdown is initiated before terminating outstanding requests |
10000 |
Service Properties |
deprecated see http.shutdownTimeout |
|
maxResponseSize |
Maximum response size that the client can process |
10000 |
Service Properties |
deprecated see http.maxResponseSize |
|
http.queryPostThreshold |
The max length of a URL before we convert GET into POST. |
500 |
Service Properties |
One example: LIAR LIFE may query a service while passing 10000 member ids. Instead of doing a GET request with thousands of memberIds, we will convert the request to use POST. Default is Integer.MAX_VALUE (a.k.a not enabled). See note in the D2 FAQ on recommendations on how to set this in conjunction with your jetty headerBufferSize. client overrideable. |
|
http.poolSize |
Maximum size of the underlying HTTP connection pool |
10 |
Service Properties |
client overrideable. |
|
http.requestTimeout |
Timeout, in ms, to: get a connection from the pool or create one, send the request, and receive a response (if applicable). |
10000 |
Service Properties |
default is 10 seconds. This property specifies the highest latency call that it will accept; requests that take longer than this will fail in order to protect the server side by causing errors on the client side. The value should be set to the highest value that the server side wants its clients to send. It is not meant to be used as a mechanism to meet SLA requirements, thus any override cannot specify a requestTimeout lower than what the service sets, if the service allows client side overrides. client overrideable. |
|
http.idleTimeout |
Interval after which idle connections will be automatically closed |
10000 |
Service Properties |
client overrideable. |
|
http.shutdownTimeout |
Timeout, in ms, the client should wait after shutdown is initiated before terminating outstanding requests |
10000 |
Service Properties |
client overrideable. |
|
http.maxResponseSize |
Maximum response size that the client can process |
10000 |
Service Properties |
default is 1 MB. client overrideable. |
|
loadBalancerStrategyName |
Name for load balancer strategy |
degrader |
LoadBalancer Properties |
default is degrader |
|
loadBalancerStrategyList |
List of Strategy that you want to use in your LoadBalancer. |
<property name="d2.defaultLiarLoadBalancerStrategyList"> |
LoadBalancer Properties |
default is |
|
loadBalancerStrategyProperties |
Properties of LoadBalancer. The properties after this item. |
<entry key="loadBalancerStrategyProperties"> |
LoadBalancer Properties |
|
|
path |
Path of your service |
/savedJobSearch |
LoadBalancer Properties |
This determines the URL path for your service |
|
clusterName |
Name of your cluster |
ProfileCluster |
LoadBalancer Properties |
|
|
serviceName |
Name of your service |
ProfileService |
LoadBalancer Properties |
|
|
hashMethod |
What kind of hash method we should use (this is relevant to stickiness) |
uriRegex |
LoadBalancer Properties |
Deprecated use http.loadBalancer.hashMethod |
|
hashConfig |
What's the regex string that we use |
<entry key="hashConfig"> |
LoadBalancer Properties |
Deprecated use http.loadBalancer.hashConfig |
|
updateIntervalMs |
Time interval that the load balancer will update the state (meaning should load balancer rebalance the traffic, should it increase the drop rate, etc) |
5000 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.updateIntervalMs |
|
pointsPerWeight |
The max number of points a client get in a hashring |
100 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.pointsPerWeight |
|
lowWaterMark |
If the cluster average latency is lower than this, we'll reduce the entire cluster drop rate. (This will affect all the clients in the same cluster regardless whether they are healthy or not) |
500 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.lowWaterMark |
|
highWaterMark |
If the cluster average latency is higher than this, we'll increase the cluster drop rate.(This will affect all the clients in the same cluster regardless whether they are healthy or not) |
3000 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.highWaterMark |
|
initialRecoveryLevel |
Once a cluster gets totally degraded, this is the baseline that the cluster use to start recovering. Let's say a healthy client has 100 points in a hashring. At a complete degraded state, it has 0 point. Let's say the initial recovery level is 0.005, that means the client get 0.5 point not enough to be reintroduced (because a client need at least 1 point) |
0.01 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.initialRecoveryLevel |
|
ringRampFactor |
Once a cluster is in the recovery mode, this is the multiplication factor that we use to increase the number of point for a client in the ring. For example: a healthy client has 100 points in a hashring. It's completely degraded now with 0 points. The initialRecoveryLevel is set to 0.005 and ringRampFactor is set to 2. So during the #1 turn of recovery we get 0.5 point. Not enough to be reintroduced into the ring. But at #2 turn, because ringRampFactor is 2, then we get 1 point. Turn #3 we get 2 points, etc. |
2 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.ringRampFactor |
|
globalStepUp |
The size of step function when incrementing drop rate in the cluster. Example if globalStepUp = 0.2 |
0.2 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.globalStepUp |
|
globalStepDown |
Same as globalStepUp except this is for decrementing drop rate |
0.2 |
LoadBalancer Properties |
Deprecated use http.loadBalancer.globalStepDown |
|
http.loadBalancer.hashMethod |
What kind of hash method we should use (this is relevant to stickiness) |
none |
LoadBalancer Properties |
Default is none. There are only 2 values permitted here: none or uriRegex. none means random, uriRegex means use regular expression to hash the request to determine which client we should use. |
|
http.loadBalancer.hashConfig |
What's the regex string that we use |
<entry key="hashConfig"> |
LoadBalancer Properties |
If you declare this, you need to define the regexes list that we need to use to parse the URL. In the example on the left, we take the value of some key for example: http://ela4.blah.com:8302/myService/myPath/key=12321 then we'll extract 12321 from the URL and use that to create stickiness. |
|
http.loadBalancer.updateIntervalMs |
Time interval that the load balancer will update the state (meaning should load balancer, rebalance the traffic, should it increase the drop rate, etc) |
5000 |
LoadBalancer Properties |
set the interval in milliseconds. Default is 5000 |
|
http.loadBalancer.pointsPerWeight |
The max number of points a client get in a hashring |
1000 |
LoadBalancer Properties |
Default is 100. Increasing this number will increase the computation needed to create a hashring but lead to more even-ness in the hashring. |
|
http.loadBalancer.lowWaterMark |
If the cluster average latency is lower than this, we'll reduce the entire cluster drop rate. (This will affect all the clients in the same cluster regardless whether they are healthy or not) |
500 |
LoadBalancer Properties |
Default is 500 milliseconds |
|
http.loadBalancer.highWaterMark |
If the cluster average latency is higher than this, we'll increase the cluster drop rate.(This will affect all the clients in the same cluster regardless whether they are healthy or not) |
3000 |
LoadBalancer Properties |
Default is 3000 milliseconds |
|
http.loadBalancer.initialRecoveryLevel |
Once a cluster gets totally degraded, this is the baseline that the cluster use to start recovering. Let's say a healthy client has 100 points in a hashring. At a complete degraded state, it has 0 point. Let's say the initial recovery level is 0.005, that means the client get 0.5 point not enough to be reintroduced (because a client need at least 1 point) |
0.01 |
LoadBalancer Properties |
value between 0.0 to 1.0. Default is 0.01 |
|
http.loadBalancer.ringRampFactor |
Once a cluster is in the recovery mode, this is the multiplication factor that we use to increase the number of point for a client in the ring. For example: a healthy client has 100 points in a hashring. It's completely degraded now with 0 points. The initialRecoveryLevel is set to 0.005 and ringRampFactor is set to 2. So during the #1 turn of recovery we get 0.5 point. Not enough to be reintroduced into the ring. But at #2 turn, because ringRampFactor is 2, then we get 1 point. Turn #3 we get 2 points, etc. |
2.0 |
LoadBalancer Properties |
Default is 1.0 |
|
http.loadBalancer.globalStepUp |
The size of step function when incrementing drop rate in the cluster. Example if globalStepUp = 0.2 |
0.2 |
LoadBalancer Properties |
Default is 0.2 |
|
http.loadBalancer.globalStepDown |
Same as http.loadBalancer.globalStepUp except this is for decrementing drop rate |
0.4 |
LoadBalancer Properties |
Default is 0.2 |
|
partitionProperties |
Properties relevant to partitioning your clusters |
nothing because this should be used like |
Cluster |
|
|
partitionType |
The type partitioning your cluster use |
RANGE |
Cluster |
valid values are RANGE, HASH, NONE |
|
partitionKeyRegex |
The regex pattern used to extract key out of URI |
"(-?\d+)" |
Cluster |
|
|
partitionSize |
Only if you choose partitionType RANGE. The size of the partition i.e. what the is the size of the RANGE in one partition |
100000 |
Cluster |
if the size is 1000 that means for each partition, we allocate 1000 points. for example if there are 2 partitions: |
|
partitionCount |
How many partition in the clusters |
5 |
Cluster |
any number |
|
keyRangeStart |
Only if you choose partitionType RANGE. |
10000 |
Cluster |
if you have 3 partition with size 100 each and you set the keyRangeStart = 1000. Then if the key is 1200. We'll subtract 1000 out of 1200 and the key becomes 200 and use 200 to find out which partition it goes to. |
|
hashAlgorithm |
Only if you choose partitionType HASH. You have to give the type of hash |
MD5 |
Cluster |
valid values are MODULO and MD5 |