/
reference.conf
146 lines (120 loc) · 7.73 KB
/
reference.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
######################################################
# Akka Cluster Bootstrap Config #
######################################################
akka.management {
# registers bootstrap routes to be included in akka-management's http endpoint
http.routes {
cluster-bootstrap = "akka.management.cluster.bootstrap.ClusterBootstrap$"
}
cluster.bootstrap {
# Cluster Bootstrap will always attempt to join an existing cluster if possible. However
# if no contact point advertises any seed-nodes a new cluster will be formed by the
# node with the lowest address as decided by [[LowestAddressJoinDecider]].
# Setting `new-cluster-enabled=off` after an initial cluster has formed is recommended to prevent new clusters
# forming during a network partition when nodes are redeployed or restarted.
# Replaces `form-new-cluster`, if `form-new-cluster` is set it takes precedence over this
# property for backward compatibility
new-cluster-enabled = on
# Configuration for the first phase of bootstraping, during which contact points are discovered
# using the configured service discovery mechanism (e.g. DNS records).
contact-point-discovery {
# Define this name to be looked up in service discovery for "neighboring" nodes
# If undefined, the name will be taken from the AKKA_CLUSTER_BOOTSTRAP_SERVICE_NAME
# environment variable or extracted from the ActorSystem name
service-name = "<service-name>"
service-name = ${?AKKA_CLUSTER_BOOTSTRAP_SERVICE_NAME}
# The portName passed to discovery. This should be set to the name of the port for Akka Management
# If set to "", `None` is passed to the discovery mechanism and
# ${akka.management.http.port} is assumed.
port-name = ""
port-name= ${?AKKA_CLUSTER_BOOTSTRAP_PORT_NAME}
# The protocol passed to discovery.
# If set to "" None is passed.
protocol = "tcp"
# Added as suffix to the service-name to build the effective-service name used in the contact-point service lookups
# If undefined, nothing will be appended to the service-name.
#
# Examples, set this to:
# "default.svc.cluster.local" or "my-namespace.svc.cluster.local" for kubernetes clusters.
service-namespace = "<service-namespace>"
# The effective service name is the exact string that will be used to perform service discovery.
#
# Set this value to a specific string to override the default behaviour of building the effective name by
# concatenating the `service-name` with the optional `service-namespace` (e.g. "name.default").
effective-name = "<effective-name>"
# Config path of discovery method to be used to locate the initial contact points.
# It must be a fully qualified config path to the discovery's config section.
#
# By setting this to `akka.discovery` we ride on the configuration mechanisms that akka-discovery has,
# and reuse what is configured for it. You can set it explicitly to something else here, if you want to
# use a different discovery mechanism for the bootstrap than for the rest of the application.
discovery-method = akka.discovery
# Amount of time for which a discovery observation must remain "stable"
# (i.e. not change list of discovered contact-points) before a join decision can be made.
# This is done to decrease the likelyhood of performing decisions on fluctuating observations.
#
# This timeout represents a tradeoff between safety and quickness of forming a new cluster.
stable-margin = 5 seconds
# Interval at which service discovery will be polled in search for new contact-points
#
# Note that actual timing of lookups will be the following:
# - perform initial lookup; interval is this base interval
# - await response within resolve-timeout
# (this can be larger than interval, which means interval effectively is resolveTimeout + interval,
# this has been specifically made so, to not hit discovery services with requests while the lookup is being serviced)
# - if failure happens apply backoff to interval (the backoff growth is exponential)
# - if no failure happened, and we receive a resolved list of services, schedule another lookup in interval time
# - if previously failures happened during discovery, a successful lookup resets the interval to `interval` again
# = repeat until stable-margin is reached
interval = 1 second
# Adds "noise" to vary the intervals between retries slightly (0.2 means 20% of base value).
# This is important in order to avoid the various nodes performing lookups in the same interval,
# potentially causing a thundering heard effect. Usually there is no need to tweak this parameter.
exponential-backoff-random-factor = 0.2
# Maximum interval to which the exponential backoff is allowed to grow
exponential-backoff-max = 15 seconds
# The smallest number of contact points that need to be discovered before the bootstrap process can start.
# For optimal safety during cluster formation, you may want to set these value to the number of initial
# nodes that you know will participate in the cluster (e.g. the value of `spec.replicas` as set in your kubernetes config.
required-contact-point-nr = 2
# Timeout for getting a reply from the service-discovery subsystem
resolve-timeout = 3 seconds
# Does a succcessful response have to be received by all contact points.
# Used by the LowestAddressJoinDecider
# Can be set to false in environments where old contact points may still be in service discovery
# or when using local discovery and cluster formation is desired without starting all the nodes
# Required-contact-point-nr still needs to be met
contact-with-all-contact-points = true
}
# Configured how we communicate with the contact point once it is discovered
contact-point {
# If no port is discovered along with the host/ip of a contact point this port will be used as fallback
# Also, when no port-name is used and multiple results are returned for a given service with at least one
# port defined, this port is used to disambiguate. When set to <fallback-port>, defaults to the value of
# akka.management.http.port
fallback-port = "<fallback-port>"
# by default when no port-name is set only the contact points that contain the fallback-port
# are used for probing. This makes the scenario where each akka node has multiple ports
# returned from service discovery (e.g. management, remoting, front-end HTTP) work without
# having to configure a port-name. If instead service discovery will return only akka management
# ports without specifying a port-name, e.g. management has dynamic ports and its own service
# name, then set this to false to stop the results being filterted
filter-on-fallback-port = true
# If some discovered seed node will keep failing to connect for specified period of time,
# it will initiate rediscovery again instead of keep trying.
probing-failure-timeout = 3 seconds
# Interval at which contact points should be polled
# the effective interval used is this value plus the same value multiplied by the jitter value
probe-interval = 1 second
# Max amount of jitter to be added on retries
probe-interval-jitter = 0.2
}
join-decider {
# Implementation of JoinDecider.
# It must extend akka.management.cluster.bootstrap.JoinDecider and
# have public constructor with ActorSystem and ClusterBootstrapSettings
# parameters.
class = "akka.management.cluster.bootstrap.LowestAddressJoinDecider"
}
}
}