Add Akka packaging
[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.tcp://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     # Should the 'leader' in the cluster be allowed to automatically mark
39     # unreachable nodes as DOWN after a configured time of unreachability?
40     # Using auto-down implies that two separate clusters will automatically be
41     # formed in case of network partition.
42     #
43     # Don't enable this in production, see 'Auto-downing (DO NOT USE)' section
44     # of Akka Cluster documentation.
45     #
46     # Disable with "off" or specify a duration to enable auto-down.
47     # If a downing-provider-class is configured this setting is ignored.
48     auto-down-unreachable-after = off
49
50     # Time margin after which shards or singletons that belonged to a downed/removed
51     # partition are created in surviving partition. The purpose of this margin is that
52     # in case of a network partition the persistent actors in the non-surviving partitions
53     # must be stopped before corresponding persistent actors are started somewhere else.
54     # This is useful if you implement downing strategies that handle network partitions,
55     # e.g. by keeping the larger side of the partition and shutting down the smaller side.
56     # It will not add any extra safety for auto-down-unreachable-after, since that is not
57     # handling network partitions.
58     # Disable with "off" or specify a duration to enable.
59     down-removal-margin = off
60
61     # Pluggable support for downing of nodes in the cluster.
62     # If this setting is left empty behavior will depend on 'auto-down-unreachable' in the following ways:
63     # * if it is 'off' the `NoDowning` provider is used and no automatic downing will be performed
64     # * if it is set to a duration the `AutoDowning` provider is with the configured downing duration
65     #
66     # If specified the value must be the fully qualified class name of a subclass of
67     # `akka.cluster.DowningProvider` having a public one argument constructor accepting an `ActorSystem`
68     downing-provider-class = ""
69
70     # Artery only setting
71     # When a node has been gracefully removed, let this time pass (to allow for example
72     # cluster singleton handover to complete) and then quarantine the removed node.
73     quarantine-removed-node-after = 5s
74
75     # If this is set to "off", the leader will not move 'Joining' members to 'Up' during a network
76     # split. This feature allows the leader to accept 'Joining' members to be 'WeaklyUp'
77     # so they become part of the cluster even during a network split. The leader will
78     # move `Joining` members to 'WeaklyUp' after 3 rounds of 'leader-actions-interval'
79     # without convergence.
80     # The leader will move 'WeaklyUp' members to 'Up' status once convergence has been reached.
81     allow-weakly-up-members = on
82
83     # The roles of this member. List of strings, e.g. roles = ["A", "B"].
84     # The roles are part of the membership information and can be used by
85     # routers or other services to distribute work to certain member types,
86     # e.g. front-end and back-end nodes.
87     # Roles are not allowed to start with "dc-" as that is reserved for the
88     # special role assigned from the data-center a node belongs to (see the
89     # multi-data-center section below)
90     roles = []
91     
92     # Run the coordinated shutdown from phase 'cluster-shutdown' when the cluster
93     # is shutdown for other reasons than when leaving, e.g. when downing. This
94     # will terminate the ActorSystem when the cluster extension is shutdown.
95     run-coordinated-shutdown-when-down = on
96
97     role {
98       # Minimum required number of members of a certain role before the leader
99       # changes member status of 'Joining' members to 'Up'. Typically used together
100       # with 'Cluster.registerOnMemberUp' to defer some action, such as starting
101       # actors, until the cluster has reached a certain size.
102       # E.g. to require 2 nodes with role 'frontend' and 3 nodes with role 'backend':
103       #   frontend.min-nr-of-members = 2
104       #   backend.min-nr-of-members = 3
105       #<role-name>.min-nr-of-members = 1
106     }
107
108     # Minimum required number of members before the leader changes member status
109     # of 'Joining' members to 'Up'. Typically used together with
110     # 'Cluster.registerOnMemberUp' to defer some action, such as starting actors,
111     # until the cluster has reached a certain size.
112     min-nr-of-members = 1
113
114     # Enable/disable info level logging of cluster events
115     log-info = on
116
117     # Enable/disable verbose info-level logging of cluster events
118     # for temporary troubleshooting. Defaults to 'off'.
119     log-info-verbose = off
120
121     # Enable or disable JMX MBeans for management of the cluster
122     jmx.enabled = on
123
124     # Enable or disable multiple JMX MBeans in the same JVM
125     # If this is disabled, the MBean Object name is "akka:type=Cluster"
126     # If this is enabled, them MBean Object names become "akka:type=Cluster,port=$clusterPortNumber"
127     jmx.multi-mbeans-in-same-jvm = off
128
129     # how long should the node wait before starting the periodic tasks
130     # maintenance tasks?
131     periodic-tasks-initial-delay = 1s
132
133     # how often should the node send out gossip information?
134     gossip-interval = 1s
135     
136     # discard incoming gossip messages if not handled within this duration
137     gossip-time-to-live = 2s
138
139     # how often should the leader perform maintenance tasks?
140     leader-actions-interval = 1s
141
142     # how often should the node move nodes, marked as unreachable by the failure
143     # detector, out of the membership ring?
144     unreachable-nodes-reaper-interval = 1s
145
146     # How often the current internal stats should be published.
147     # A value of 0s can be used to always publish the stats, when it happens.
148     # Disable with "off".
149     publish-stats-interval = off
150
151     # The id of the dispatcher to use for cluster actors. If not specified
152     # default dispatcher is used.
153     # If specified you need to define the settings of the actual dispatcher.
154     use-dispatcher = ""
155
156     # Gossip to random node with newer or older state information, if any with
157     # this probability. Otherwise Gossip to any random live node.
158     # Probability value is between 0.0 and 1.0. 0.0 means never, 1.0 means always.
159     gossip-different-view-probability = 0.8
160     
161     # Reduced the above probability when the number of nodes in the cluster
162     # greater than this value.
163     reduce-gossip-different-view-probability = 400
164
165     # When a node is removed the removal is marked with a tombstone
166     # which is kept at least this long, after which it is pruned, if there is a partition
167     # longer than this it could lead to removed nodes being re-added to the cluster
168     prune-gossip-tombstones-after = 24h
169
170     # Settings for the Phi accrual failure detector (http://www.jaist.ac.jp/~defago/files/pdf/IS_RR_2004_010.pdf
171     # [Hayashibara et al]) used by the cluster subsystem to detect unreachable
172     # members.
173     # The default PhiAccrualFailureDetector will trigger if there are no heartbeats within
174     # the duration heartbeat-interval + acceptable-heartbeat-pause + threshold_adjustment,
175     # i.e. around 5.5 seconds with default settings.
176     failure-detector {
177
178       # FQCN of the failure detector implementation.
179       # It must implement akka.remote.FailureDetector and have
180       # a public constructor with a com.typesafe.config.Config and
181       # akka.actor.EventStream parameter.
182       implementation-class = "akka.remote.PhiAccrualFailureDetector"
183
184       # How often keep-alive heartbeat messages should be sent to each connection.
185       heartbeat-interval = 1 s
186
187       # Defines the failure detector threshold.
188       # A low threshold is prone to generate many wrong suspicions but ensures
189       # a quick detection in the event of a real crash. Conversely, a high
190       # threshold generates fewer mistakes but needs more time to detect
191       # actual crashes.
192       threshold = 8.0
193
194       # Number of the samples of inter-heartbeat arrival times to adaptively
195       # calculate the failure timeout for connections.
196       max-sample-size = 1000
197
198       # Minimum standard deviation to use for the normal distribution in
199       # AccrualFailureDetector. Too low standard deviation might result in
200       # too much sensitivity for sudden, but normal, deviations in heartbeat
201       # inter arrival times.
202       min-std-deviation = 100 ms
203
204       # Number of potentially lost/delayed heartbeats that will be
205       # accepted before considering it to be an anomaly.
206       # This margin is important to be able to survive sudden, occasional,
207       # pauses in heartbeat arrivals, due to for example garbage collect or
208       # network drop.
209       acceptable-heartbeat-pause = 3 s
210
211       # Number of member nodes that each member will send heartbeat messages to,
212       # i.e. each node will be monitored by this number of other nodes.
213       monitored-by-nr-of-members = 5
214       
215       # After the heartbeat request has been sent the first failure detection
216       # will start after this period, even though no heartbeat message has
217       # been received.
218       expected-response-after = 1 s
219
220     }
221
222     # Configures multi-dc specific heartbeating and other mechanisms,
223     # many of them have a direct counter-part in "one datacenter mode",
224     # in which case these settings would not be used at all - they only apply,
225     # if your cluster nodes are configured with at-least 2 different `akka.cluster.data-center` values.
226     multi-data-center {
227
228       # Defines which data center this node belongs to. It is typically used to make islands of the
229       # cluster that are colocated. This can be used to make the cluster aware that it is running
230       # across multiple availability zones or regions. It can also be used for other logical
231       # grouping of nodes.
232       self-data-center = "default"
233
234
235       # Try to limit the number of connections between data centers. Used for gossip and heartbeating.
236       # This will not limit connections created for the messaging of the application.
237       # If the cluster does not span multiple data centers, this value has no effect.
238       cross-data-center-connections = 5
239
240       # The n oldest nodes in a data center will choose to gossip to another data center with
241       # this probability. Must be a value between 0.0 and 1.0 where 0.0 means never, 1.0 means always.
242       # When a data center is first started (nodes < 5) a higher probability is used so other data
243       # centers find out about the new nodes more quickly
244       cross-data-center-gossip-probability = 0.2
245
246       failure-detector {
247         # FQCN of the failure detector implementation.
248         # It must implement akka.remote.FailureDetector and have
249         # a public constructor with a com.typesafe.config.Config and
250         # akka.actor.EventStream parameter.
251         implementation-class = "akka.remote.DeadlineFailureDetector"
252   
253         # Number of potentially lost/delayed heartbeats that will be
254         # accepted before considering it to be an anomaly.
255         # This margin is important to be able to survive sudden, occasional,
256         # pauses in heartbeat arrivals, due to for example garbage collect or
257         # network drop.
258         acceptable-heartbeat-pause = 10 s
259         
260         # How often keep-alive heartbeat messages should be sent to each connection.
261         heartbeat-interval = 3 s
262   
263         # After the heartbeat request has been sent the first failure detection
264         # will start after this period, even though no heartbeat message has
265         # been received.
266         expected-response-after = 1 s
267       }
268     }
269
270     # If the tick-duration of the default scheduler is longer than the
271     # tick-duration configured here a dedicated scheduler will be used for
272     # periodic tasks of the cluster, otherwise the default scheduler is used.
273     # See akka.scheduler settings for more details.
274     scheduler {
275       tick-duration = 33ms
276       ticks-per-wheel = 512
277     }
278
279     debug {
280       # log heartbeat events (very verbose, useful mostly when debugging heartbeating issues)
281       verbose-heartbeat-logging = off
282
283       # log verbose details about gossip
284       verbose-gossip-logging = off
285     }
286
287     configuration-compatibility-check {
288
289       # Enforce configuration compatibility checks when joining a cluster.
290       # Set to off to allow joining nodes to join a cluster even when configuration incompatibilities are detected or
291       # when the cluster does not support this feature. Compatibility checks are always performed and warning and
292       # error messsages are logged.
293       #
294       # This is particularly useful for rolling updates on clusters that do not support that feature. Since the old
295       # cluster won't be able to send the compatibility confirmation to the joining node, the joining node won't be able
296       # to 'know' if its allowed to join.
297       enforce-on-join = on
298
299       # Add named entry to this section with fully qualified class name of the JoinConfigCompatChecker
300       # to enable.
301       # Checkers defined in reference.conf can be disabled by application by using empty string value
302       # for the named entry.
303       checkers {
304         akka-cluster = "akka.cluster.JoinConfigCompatCheckCluster"
305       }
306
307       # Some configuration properties might not be appropriate to transfer between nodes
308       # and such properties can be excluded from the configuration compatibility check by adding
309       # the paths of the properties to this list. Sensitive paths are grouped by key. Modules and third-party libraries
310       # can define their own set of sensitive paths without clashing with each other (as long they use unique keys).
311       #
312       # All properties starting with the paths defined here are excluded, i.e. you can add the path of a whole
313       # section here to skip everything inside that section.
314       sensitive-config-paths {
315         akka = [
316           "user.home", "user.name", "user.dir",
317           "socksNonProxyHosts", "http.nonProxyHosts", "ftp.nonProxyHosts",
318           "akka.remote.secure-cookie",
319           "akka.remote.netty.ssl.security",
320           "akka.remote.artery.ssl"
321         ]
322       }
323
324     }
325   }
326
327   actor.deployment.default.cluster {
328     # enable cluster aware router that deploys to nodes in the cluster
329     enabled = off
330
331     # Maximum number of routees that will be deployed on each cluster
332     # member node.
333     # Note that max-total-nr-of-instances defines total number of routees, but
334     # number of routees per node will not be exceeded, i.e. if you
335     # define max-total-nr-of-instances = 50 and max-nr-of-instances-per-node = 2
336     # it will deploy 2 routees per new member in the cluster, up to
337     # 25 members.
338     max-nr-of-instances-per-node = 1
339     
340     # Maximum number of routees that will be deployed, in total
341     # on all nodes. See also description of max-nr-of-instances-per-node.
342     # For backwards compatibility reasons, nr-of-instances
343     # has the same purpose as max-total-nr-of-instances for cluster
344     # aware routers and nr-of-instances (if defined by user) takes
345     # precedence over max-total-nr-of-instances. 
346     max-total-nr-of-instances = 10000
347
348     # Defines if routees are allowed to be located on the same node as
349     # the head router actor, or only on remote nodes.
350     # Useful for master-worker scenario where all routees are remote.
351     allow-local-routees = on
352
353     # Use members with all specified roles, or all members if undefined or empty.
354     use-roles = []
355
356     # Deprecated, since Akka 2.5.4, replaced by use-roles
357     # Use members with specified role, or all members if undefined or empty.
358     use-role = ""
359   }
360
361   # Protobuf serializer for cluster messages
362   actor {
363     serializers {
364       akka-cluster = "akka.cluster.protobuf.ClusterMessageSerializer"
365     }
366
367     serialization-bindings {
368       "akka.cluster.ClusterMessage" = akka-cluster
369       "akka.cluster.routing.ClusterRouterPool" = akka-cluster
370     }
371     
372     serialization-identifiers {
373       "akka.cluster.protobuf.ClusterMessageSerializer" = 5
374     }
375     
376   }
377
378 }