723f91effcad7b26ce8a13eb7d6ad199939bc332
[controller.git] / akka / repackaged-akka-jar / src / main / resources / cluster_reference.conf
1 ######################################
2 # Akka Cluster Reference Config File #
3 ######################################
4
5 # This is the reference config file that contains all the default settings.
6 # Make your edits/overrides in your application.conf.
7
8 akka {
9
10   cluster {
11     # Initial contact points of the cluster.
12     # The nodes to join automatically at startup.
13     # Comma separated full URIs defined by a string on the form of
14     # "akka://system@hostname:port"
15     # Leave as empty if the node is supposed to be joined manually.
16     seed-nodes = []
17
18     # How long to wait for one of the seed nodes to reply to initial join request.
19     # When this is the first seed node and there is no positive reply from the other
20     # seed nodes within this timeout it will join itself to bootstrap the cluster.
21     # When this is not the first seed node the join attempts will be performed with
22     # this interval.  
23     seed-node-timeout = 5s
24
25     # If a join request fails it will be retried after this period.
26     # Disable join retry by specifying "off".
27     retry-unsuccessful-join-after = 10s
28     
29     # The joining of given seed nodes will by default be retried indefinitely until
30     # a successful join. That process can be aborted if unsuccessful by defining this
31     # timeout. When aborted it will run CoordinatedShutdown, which by default will
32     # terminate the ActorSystem. CoordinatedShutdown can also be configured to exit
33     # the JVM. It is useful to define this timeout if the seed-nodes are assembled
34     # dynamically and a restart with new seed-nodes should be tried after unsuccessful
35     # attempts.   
36     shutdown-after-unsuccessful-join-seed-nodes = off
37
38     # Time margin after which shards or singletons that belonged to a downed/removed
39     # partition are created in surviving partition. The purpose of this margin is that
40     # in case of a network partition the persistent actors in the non-surviving partitions
41     # must be stopped before corresponding persistent actors are started somewhere else.
42     # This is useful if you implement downing strategies that handle network partitions,
43     # e.g. by keeping the larger side of the partition and shutting down the smaller side.
44     # Disable with "off" or specify a duration to enable.
45     #
46     # When using the `akka.cluster.sbr.SplitBrainResolver` as downing provider it will use
47     # the akka.cluster.split-brain-resolver.stable-after as the default down-removal-margin
48     # if this down-removal-margin is undefined.
49     down-removal-margin = off
50
51     # Pluggable support for downing of nodes in the cluster.
52     # If this setting is left empty the `NoDowning` provider is used and no automatic downing will be performed.
53     #
54     # If specified the value must be the fully qualified class name of a subclass of
55     # `akka.cluster.DowningProvider` having a public one argument constructor accepting an `ActorSystem`
56     downing-provider-class = ""
57
58     # Artery only setting
59     # When a node has been gracefully removed, let this time pass (to allow for example
60     # cluster singleton handover to complete) and then quarantine the removed node.
61     quarantine-removed-node-after = 5s
62
63     # If this is set to "off", the leader will not move 'Joining' members to 'Up' during a network
64     # split. This feature allows the leader to accept 'Joining' members to be 'WeaklyUp'
65     # so they become part of the cluster even during a network split. The leader will
66     # move `Joining` members to 'WeaklyUp' after this configured duration without convergence.
67     # The leader will move 'WeaklyUp' members to 'Up' status once convergence has been reached.
68     allow-weakly-up-members = 7s
69
70     # The roles of this member. List of strings, e.g. roles = ["A", "B"].
71     # The roles are part of the membership information and can be used by
72     # routers or other services to distribute work to certain member types,
73     # e.g. front-end and back-end nodes.
74     # Roles are not allowed to start with "dc-" as that is reserved for the
75     # special role assigned from the data-center a node belongs to (see the
76     # multi-data-center section below)
77     roles = []
78     
79     # Run the coordinated shutdown from phase 'cluster-shutdown' when the cluster
80     # is shutdown for other reasons than when leaving, e.g. when downing. This
81     # will terminate the ActorSystem when the cluster extension is shutdown.
82     run-coordinated-shutdown-when-down = on
83
84     role {
85       # Minimum required number of members of a certain role before the leader
86       # changes member status of 'Joining' members to 'Up'. Typically used together
87       # with 'Cluster.registerOnMemberUp' to defer some action, such as starting
88       # actors, until the cluster has reached a certain size.
89       # E.g. to require 2 nodes with role 'frontend' and 3 nodes with role 'backend':
90       #   frontend.min-nr-of-members = 2
91       #   backend.min-nr-of-members = 3
92       #<role-name>.min-nr-of-members = 1
93     }
94
95     # Application version of the deployment. Used by rolling update features
96     # to distinguish between old and new nodes. The typical convention is to use
97     # 3 digit version numbers `major.minor.patch`, but 1 or two digits are also
98     # supported.
99     #
100     # If no `.` is used it is interpreted as a single digit version number or as
101     # plain alphanumeric if it couldn't be parsed as a number.
102     #
103     # It may also have a qualifier at the end for 2 or 3 digit version numbers such
104     # as "1.2-RC1".
105     # For 1 digit with qualifier, 1-RC1, it is interpreted as plain alphanumeric.
106     #
107     # It has support for https://github.com/dwijnand/sbt-dynver format with `+` or
108     # `-` separator. The number of commits from the tag is handled as a numeric part.
109     # For example `1.0.0+3-73475dce26` is less than `1.0.10+10-ed316bd024` (3 < 10).
110     app-version = "0.0.0"
111
112     # Minimum required number of members before the leader changes member status
113     # of 'Joining' members to 'Up'. Typically used together with
114     # 'Cluster.registerOnMemberUp' to defer some action, such as starting actors,
115     # until the cluster has reached a certain size.
116     min-nr-of-members = 1
117
118     # Enable/disable info level logging of cluster events.
119     # These are logged with logger name `akka.cluster.Cluster`.
120     log-info = on
121
122     # Enable/disable verbose info-level logging of cluster events
123     # for temporary troubleshooting. Defaults to 'off'.
124     # These are logged with logger name `akka.cluster.Cluster`.
125     log-info-verbose = off
126
127     # Enable or disable JMX MBeans for management of the cluster
128     jmx.enabled = on
129
130     # Enable or disable multiple JMX MBeans in the same JVM
131     # If this is disabled, the MBean Object name is "akka:type=Cluster"
132     # If this is enabled, them MBean Object names become "akka:type=Cluster,port=$clusterPortNumber"
133     jmx.multi-mbeans-in-same-jvm = off
134
135     # how long should the node wait before starting the periodic tasks
136     # maintenance tasks?
137     periodic-tasks-initial-delay = 1s
138
139     # how often should the node send out gossip information?
140     gossip-interval = 1s
141     
142     # discard incoming gossip messages if not handled within this duration
143     gossip-time-to-live = 2s
144
145     # how often should the leader perform maintenance tasks?
146     leader-actions-interval = 1s
147
148     # how often should the node move nodes, marked as unreachable by the failure
149     # detector, out of the membership ring?
150     unreachable-nodes-reaper-interval = 1s
151
152     # How often the current internal stats should be published.
153     # A value of 0s can be used to always publish the stats, when it happens.
154     # Disable with "off".
155     publish-stats-interval = off
156
157     # The id of the dispatcher to use for cluster actors.
158     # If specified you need to define the settings of the actual dispatcher.
159     use-dispatcher = "akka.actor.internal-dispatcher"
160
161     # Gossip to random node with newer or older state information, if any with
162     # this probability. Otherwise Gossip to any random live node.
163     # Probability value is between 0.0 and 1.0. 0.0 means never, 1.0 means always.
164     gossip-different-view-probability = 0.8
165     
166     # Reduced the above probability when the number of nodes in the cluster
167     # greater than this value.
168     reduce-gossip-different-view-probability = 400
169
170     # When a node is removed the removal is marked with a tombstone
171     # which is kept at least this long, after which it is pruned, if there is a partition
172     # longer than this it could lead to removed nodes being re-added to the cluster
173     prune-gossip-tombstones-after = 24h
174
175     # Settings for the Phi accrual failure detector (http://www.jaist.ac.jp/~defago/files/pdf/IS_RR_2004_010.pdf
176     # [Hayashibara et al]) used by the cluster subsystem to detect unreachable
177     # members.
178     # The default PhiAccrualFailureDetector will trigger if there are no heartbeats within
179     # the duration heartbeat-interval + acceptable-heartbeat-pause + threshold_adjustment,
180     # i.e. around 5.5 seconds with default settings.
181     failure-detector {
182
183       # FQCN of the failure detector implementation.
184       # It must implement akka.remote.FailureDetector and have
185       # a public constructor with a com.typesafe.config.Config and
186       # akka.actor.EventStream parameter.
187       implementation-class = "akka.remote.PhiAccrualFailureDetector"
188
189       # How often keep-alive heartbeat messages should be sent to each connection.
190       heartbeat-interval = 1 s
191
192       # Defines the failure detector threshold.
193       # A low threshold is prone to generate many wrong suspicions but ensures
194       # a quick detection in the event of a real crash. Conversely, a high
195       # threshold generates fewer mistakes but needs more time to detect
196       # actual crashes.
197       threshold = 8.0
198
199       # Number of the samples of inter-heartbeat arrival times to adaptively
200       # calculate the failure timeout for connections.
201       max-sample-size = 1000
202
203       # Minimum standard deviation to use for the normal distribution in
204       # AccrualFailureDetector. Too low standard deviation might result in
205       # too much sensitivity for sudden, but normal, deviations in heartbeat
206       # inter arrival times.
207       min-std-deviation = 100 ms
208
209       # Number of potentially lost/delayed heartbeats that will be
210       # accepted before considering it to be an anomaly.
211       # This margin is important to be able to survive sudden, occasional,
212       # pauses in heartbeat arrivals, due to for example garbage collect or
213       # network drop.
214       acceptable-heartbeat-pause = 3 s
215
216       # Number of member nodes that each member will send heartbeat messages to,
217       # i.e. each node will be monitored by this number of other nodes.
218       monitored-by-nr-of-members = 9
219       
220       # After the heartbeat request has been sent the first failure detection
221       # will start after this period, even though no heartbeat message has
222       # been received.
223       expected-response-after = 1 s
224
225     }
226
227     # Configures multi-dc specific heartbeating and other mechanisms,
228     # many of them have a direct counter-part in "one datacenter mode",
229     # in which case these settings would not be used at all - they only apply,
230     # if your cluster nodes are configured with at-least 2 different `akka.cluster.data-center` values.
231     multi-data-center {
232
233       # Defines which data center this node belongs to. It is typically used to make islands of the
234       # cluster that are colocated. This can be used to make the cluster aware that it is running
235       # across multiple availability zones or regions. It can also be used for other logical
236       # grouping of nodes.
237       self-data-center = "default"
238
239
240       # Try to limit the number of connections between data centers. Used for gossip and heartbeating.
241       # This will not limit connections created for the messaging of the application.
242       # If the cluster does not span multiple data centers, this value has no effect.
243       cross-data-center-connections = 5
244
245       # The n oldest nodes in a data center will choose to gossip to another data center with
246       # this probability. Must be a value between 0.0 and 1.0 where 0.0 means never, 1.0 means always.
247       # When a data center is first started (nodes < 5) a higher probability is used so other data
248       # centers find out about the new nodes more quickly
249       cross-data-center-gossip-probability = 0.2
250
251       failure-detector {
252         # FQCN of the failure detector implementation.
253         # It must implement akka.remote.FailureDetector and have
254         # a public constructor with a com.typesafe.config.Config and
255         # akka.actor.EventStream parameter.
256         implementation-class = "akka.remote.DeadlineFailureDetector"
257   
258         # Number of potentially lost/delayed heartbeats that will be
259         # accepted before considering it to be an anomaly.
260         # This margin is important to be able to survive sudden, occasional,
261         # pauses in heartbeat arrivals, due to for example garbage collect or
262         # network drop.
263         acceptable-heartbeat-pause = 10 s
264         
265         # How often keep-alive heartbeat messages should be sent to each connection.
266         heartbeat-interval = 3 s
267   
268         # After the heartbeat request has been sent the first failure detection
269         # will start after this period, even though no heartbeat message has
270         # been received.
271         expected-response-after = 1 s
272       }
273     }
274
275     # If the tick-duration of the default scheduler is longer than the
276     # tick-duration configured here a dedicated scheduler will be used for
277     # periodic tasks of the cluster, otherwise the default scheduler is used.
278     # See akka.scheduler settings for more details.
279     scheduler {
280       tick-duration = 33ms
281       ticks-per-wheel = 512
282     }
283
284     debug {
285       # Log heartbeat events (very verbose, useful mostly when debugging heartbeating issues).
286       # These are logged with logger name `akka.cluster.ClusterHeartbeat`.
287       verbose-heartbeat-logging = off
288
289       # log verbose details about gossip
290       verbose-gossip-logging = off
291     }
292
293     configuration-compatibility-check {
294
295       # Enforce configuration compatibility checks when joining a cluster.
296       # Set to off to allow joining nodes to join a cluster even when configuration incompatibilities are detected or
297       # when the cluster does not support this feature. Compatibility checks are always performed and warning and
298       # error messages are logged.
299       #
300       # This is particularly useful for rolling updates on clusters that do not support that feature. Since the old
301       # cluster won't be able to send the compatibility confirmation to the joining node, the joining node won't be able
302       # to 'know' if its allowed to join.
303       enforce-on-join = on
304
305       # Add named entry to this section with fully qualified class name of the JoinConfigCompatChecker
306       # to enable.
307       # Checkers defined in reference.conf can be disabled by application by using empty string value
308       # for the named entry.
309       checkers {
310         akka-cluster = "akka.cluster.JoinConfigCompatCheckCluster"
311       }
312
313       # Some configuration properties might not be appropriate to transfer between nodes
314       # and such properties can be excluded from the configuration compatibility check by adding
315       # the paths of the properties to this list. Sensitive paths are grouped by key. Modules and third-party libraries
316       # can define their own set of sensitive paths without clashing with each other (as long they use unique keys).
317       #
318       # All properties starting with the paths defined here are excluded, i.e. you can add the path of a whole
319       # section here to skip everything inside that section.
320       sensitive-config-paths {
321         akka = [
322           "user.home", "user.name", "user.dir",
323           "socksNonProxyHosts", "http.nonProxyHosts", "ftp.nonProxyHosts",
324           "akka.remote.secure-cookie",
325           "akka.remote.classic.netty.ssl.security",
326           # Pre 2.6 path, keep around to avoid sending things misconfigured with old paths
327           "akka.remote.netty.ssl.security",
328           "akka.remote.artery.ssl"
329         ]
330       }
331
332     }
333   }
334
335   actor.deployment.default.cluster {
336     # enable cluster aware router that deploys to nodes in the cluster
337     enabled = off
338
339     # Maximum number of routees that will be deployed on each cluster
340     # member node.
341     # Note that max-total-nr-of-instances defines total number of routees, but
342     # number of routees per node will not be exceeded, i.e. if you
343     # define max-total-nr-of-instances = 50 and max-nr-of-instances-per-node = 2
344     # it will deploy 2 routees per new member in the cluster, up to
345     # 25 members.
346     max-nr-of-instances-per-node = 1
347     
348     # Maximum number of routees that will be deployed, in total
349     # on all nodes. See also description of max-nr-of-instances-per-node.
350     # For backwards compatibility reasons, nr-of-instances
351     # has the same purpose as max-total-nr-of-instances for cluster
352     # aware routers and nr-of-instances (if defined by user) takes
353     # precedence over max-total-nr-of-instances. 
354     max-total-nr-of-instances = 10000
355
356     # Defines if routees are allowed to be located on the same node as
357     # the head router actor, or only on remote nodes.
358     # Useful for master-worker scenario where all routees are remote.
359     allow-local-routees = on
360
361     # Use members with all specified roles, or all members if undefined or empty.
362     use-roles = []
363
364     # Deprecated, since Akka 2.5.4, replaced by use-roles
365     # Use members with specified role, or all members if undefined or empty.
366     use-role = ""
367   }
368
369   # Protobuf serializer for cluster messages
370   actor {
371     serializers {
372       akka-cluster = "akka.cluster.protobuf.ClusterMessageSerializer"
373     }
374
375     serialization-bindings {
376       "akka.cluster.ClusterMessage" = akka-cluster
377       "akka.cluster.routing.ClusterRouterPool" = akka-cluster
378     }
379     
380     serialization-identifiers {
381       "akka.cluster.protobuf.ClusterMessageSerializer" = 5
382     }
383     
384   }
385
386 }
387
388 #//#split-brain-resolver
389
390 # To enable the split brain resolver you first need to enable the provider in your application.conf:
391 # akka.cluster.downing-provider-class = "akka.cluster.sbr.SplitBrainResolverProvider"
392
393 akka.cluster.split-brain-resolver {
394   # Select one of the available strategies (see descriptions below):
395   # static-quorum, keep-majority, keep-oldest, down-all, lease-majority
396   active-strategy = keep-majority
397
398   #//#stable-after
399   # Time margin after which shards or singletons that belonged to a downed/removed
400   # partition are created in surviving partition. The purpose of this margin is that
401   # in case of a network partition the persistent actors in the non-surviving partitions
402   # must be stopped before corresponding persistent actors are started somewhere else.
403   # This is useful if you implement downing strategies that handle network partitions,
404   # e.g. by keeping the larger side of the partition and shutting down the smaller side.
405   # Decision is taken by the strategy when there has been no membership or
406   # reachability changes for this duration, i.e. the cluster state is stable.
407   stable-after = 20s
408   #//#stable-after
409
410   # When reachability observations by the failure detector are changed the SBR decisions
411   # are deferred until there are no changes within the 'stable-after' duration.
412   # If this continues for too long it might be an indication of an unstable system/network
413   # and it could result in delayed or conflicting decisions on separate sides of a network
414   # partition.
415   # As a precaution for that scenario all nodes are downed if no decision is made within
416   # `stable-after + down-all-when-unstable` from the first unreachability event.
417   # The measurement is reset if all unreachable have been healed, downed or removed, or
418   # if there are no changes within `stable-after * 2`.
419   # The value can be on, off, or a duration.
420   # By default it is 'on' and then it is derived to be 3/4 of stable-after, but not less than
421   # 4 seconds.
422   down-all-when-unstable = on
423
424 }
425 #//#split-brain-resolver
426
427 # Down the unreachable nodes if the number of remaining nodes are greater than or equal to
428 # the given 'quorum-size'. Otherwise down the reachable nodes, i.e. it will shut down that
429 # side of the partition. In other words, the 'size' defines the minimum number of nodes
430 # that the cluster must have to be operational. If there are unreachable nodes when starting
431 # up the cluster, before reaching this limit, the cluster may shutdown itself immediately.
432 # This is not an issue if you start all nodes at approximately the same time.
433 #
434 # Note that you must not add more members to the cluster than 'quorum-size * 2 - 1', because
435 # then both sides may down each other and thereby form two separate clusters. For example,
436 # quorum-size configured to 3 in a 6 node cluster may result in a split where each side
437 # consists of 3 nodes each, i.e. each side thinks it has enough nodes to continue by
438 # itself. A warning is logged if this recommendation is violated.
439 #//#static-quorum
440 akka.cluster.split-brain-resolver.static-quorum {
441   # minimum number of nodes that the cluster must have
442   quorum-size = undefined
443
444   # if the 'role' is defined the decision is based only on members with that 'role'
445   role = ""
446 }
447 #//#static-quorum
448
449 # Down the unreachable nodes if the current node is in the majority part based the last known
450 # membership information. Otherwise down the reachable nodes, i.e. the own part. If the
451 # the parts are of equal size the part containing the node with the lowest address is kept.
452 # Note that if there are more than two partitions and none is in majority each part
453 # will shutdown itself, terminating the whole cluster.
454 #//#keep-majority
455 akka.cluster.split-brain-resolver.keep-majority {
456   # if the 'role' is defined the decision is based only on members with that 'role'
457   role = ""
458 }
459 #//#keep-majority
460
461 # Down the part that does not contain the oldest member (current singleton).
462 #
463 # There is one exception to this rule if 'down-if-alone' is defined to 'on'.
464 # Then, if the oldest node has partitioned from all other nodes the oldest
465 # will down itself and keep all other nodes running. The strategy will not
466 # down the single oldest node when it is the only remaining node in the cluster.
467 #
468 # Note that if the oldest node crashes the others will remove it from the cluster
469 # when 'down-if-alone' is 'on', otherwise they will down themselves if the
470 # oldest node crashes, i.e. shutdown the whole cluster together with the oldest node.
471 #//#keep-oldest
472 akka.cluster.split-brain-resolver.keep-oldest {
473   # Enable downing of the oldest node when it is partitioned from all other nodes
474   down-if-alone = on
475
476   # if the 'role' is defined the decision is based only on members with that 'role',
477   # i.e. using the oldest member (singleton) within the nodes with that role
478   role = ""
479 }
480 #//#keep-oldest
481
482 # Keep the part that can acquire the lease, and down the other part.
483 # Best effort is to keep the side that has most nodes, i.e. the majority side.
484 # This is achieved by adding a delay before trying to acquire the lease on the
485 # minority side.
486 #//#lease-majority
487 akka.cluster.split-brain-resolver.lease-majority {
488   lease-implementation = ""
489
490   # This delay is used on the minority side before trying to acquire the lease,
491   # as an best effort to try to keep the majority side.
492   acquire-lease-delay-for-minority = 2s
493
494   # If the 'role' is defined the majority/minority is based only on members with that 'role'.
495   role = ""
496 }
497 #//#lease-majority