2012-01-31 15:00:46 +01:00
|
|
|
|
######################################
|
|
|
|
|
|
# Akka Cluster Reference Config File #
|
|
|
|
|
|
######################################
|
|
|
|
|
|
|
2012-02-21 14:39:08 -06:00
|
|
|
|
# This is the reference config file that contains all the default settings.
|
2012-01-31 15:00:46 +01:00
|
|
|
|
# Make your edits/overrides in your application.conf.
|
|
|
|
|
|
|
|
|
|
|
|
akka {
|
|
|
|
|
|
|
|
|
|
|
|
cluster {
|
2012-10-02 10:21:46 +02:00
|
|
|
|
# Initial contact points of the cluster.
|
2013-05-16 17:00:04 +02:00
|
|
|
|
# The nodes to join automatically at startup.
|
2012-09-13 10:54:14 +02:00
|
|
|
|
# Comma separated full URIs defined by a string on the form of
|
|
|
|
|
|
# "akka://system@hostname:port"
|
2013-05-16 17:00:04 +02:00
|
|
|
|
# Leave as empty if the node is supposed to be joined manually.
|
2012-06-21 10:58:35 +02:00
|
|
|
|
seed-nodes = []
|
|
|
|
|
|
|
2012-06-25 20:20:11 +02:00
|
|
|
|
# how long to wait for one of the seed nodes to reply to initial join request
|
2012-06-25 20:40:06 +02:00
|
|
|
|
seed-node-timeout = 5s
|
2012-06-25 20:20:11 +02:00
|
|
|
|
|
2013-04-11 09:18:12 +02:00
|
|
|
|
# If a join request fails it will be retried after this period.
|
|
|
|
|
|
# Disable join retry by specifying "off".
|
|
|
|
|
|
retry-unsuccessful-join-after = 10s
|
|
|
|
|
|
|
2012-10-01 20:35:19 +02:00
|
|
|
|
# Should the 'leader' in the cluster be allowed to automatically mark
|
|
|
|
|
|
# unreachable nodes as DOWN?
|
|
|
|
|
|
# Using auto-down implies that two separate clusters will automatically be
|
|
|
|
|
|
# formed in case of network partition.
|
2012-07-03 16:36:11 +02:00
|
|
|
|
auto-down = off
|
2012-03-09 12:56:56 +01:00
|
|
|
|
|
2013-03-14 20:32:43 +01:00
|
|
|
|
# The roles of this member. List of strings, e.g. roles = ["A", "B"].
|
|
|
|
|
|
# The roles are part of the membership information and can be used by
|
|
|
|
|
|
# routers or other services to distribute work to certain member types,
|
|
|
|
|
|
# e.g. front-end and back-end nodes.
|
|
|
|
|
|
roles = []
|
|
|
|
|
|
|
|
|
|
|
|
role {
|
2013-05-29 17:20:18 +02:00
|
|
|
|
# Minimum required number of members of a certain role before the leader
|
|
|
|
|
|
# changes member status of 'Joining' members to 'Up'. Typically used together
|
|
|
|
|
|
# with 'Cluster.registerOnMemberUp' to defer some action, such as starting
|
|
|
|
|
|
# actors, until the cluster has reached a certain size.
|
2013-03-14 20:32:43 +01:00
|
|
|
|
# E.g. to require 2 nodes with role 'frontend' and 3 nodes with role 'backend':
|
|
|
|
|
|
# frontend.min-nr-of-members = 2
|
|
|
|
|
|
# backend.min-nr-of-members = 3
|
|
|
|
|
|
#<role-name>.min-nr-of-members = 1
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2012-12-10 08:46:25 +01:00
|
|
|
|
# Minimum required number of members before the leader changes member status
|
|
|
|
|
|
# of 'Joining' members to 'Up'. Typically used together with
|
|
|
|
|
|
# 'Cluster.registerOnMemberUp' to defer some action, such as starting actors,
|
|
|
|
|
|
# until the cluster has reached a certain size.
|
|
|
|
|
|
min-nr-of-members = 1
|
|
|
|
|
|
|
2013-05-23 13:36:35 +02:00
|
|
|
|
# Enable/disable info level logging of cluster events
|
|
|
|
|
|
log-info = on
|
|
|
|
|
|
|
2012-09-20 08:09:01 +02:00
|
|
|
|
# Enable or disable JMX MBeans for management of the cluster
|
|
|
|
|
|
jmx.enabled = on
|
|
|
|
|
|
|
2012-10-01 20:35:19 +02:00
|
|
|
|
# how long should the node wait before starting the periodic tasks
|
|
|
|
|
|
# maintenance tasks?
|
2012-03-15 23:00:20 +01:00
|
|
|
|
periodic-tasks-initial-delay = 1s
|
|
|
|
|
|
|
|
|
|
|
|
# how often should the node send out gossip information?
|
2012-06-04 23:21:28 +02:00
|
|
|
|
gossip-interval = 1s
|
2012-03-15 23:00:20 +01:00
|
|
|
|
|
|
|
|
|
|
# how often should the leader perform maintenance tasks?
|
2012-06-04 23:21:28 +02:00
|
|
|
|
leader-actions-interval = 1s
|
2012-03-15 23:00:20 +01:00
|
|
|
|
|
2012-10-01 20:35:19 +02:00
|
|
|
|
# how often should the node move nodes, marked as unreachable by the failure
|
|
|
|
|
|
# detector, out of the membership ring?
|
2012-06-04 23:21:28 +02:00
|
|
|
|
unreachable-nodes-reaper-interval = 1s
|
2012-01-31 15:00:46 +01:00
|
|
|
|
|
2012-08-15 16:47:34 +02:00
|
|
|
|
# How often the current internal stats should be published.
|
2013-04-11 09:18:12 +02:00
|
|
|
|
# A value of 0s can be used to always publish the stats, when it happens.
|
|
|
|
|
|
# Disable with "off".
|
2013-05-27 16:34:31 +02:00
|
|
|
|
publish-stats-interval = off
|
2012-07-04 11:37:56 +02:00
|
|
|
|
|
2012-09-13 10:54:14 +02:00
|
|
|
|
# The id of the dispatcher to use for cluster actors. If not specified
|
|
|
|
|
|
# default dispatcher is used.
|
2012-06-29 16:24:24 +02:00
|
|
|
|
# If specified you need to define the settings of the actual dispatcher.
|
|
|
|
|
|
use-dispatcher = ""
|
|
|
|
|
|
|
2012-10-01 20:35:19 +02:00
|
|
|
|
# Gossip to random node with newer or older state information, if any with
|
2012-06-29 08:56:58 +02:00
|
|
|
|
# this probability. Otherwise Gossip to any random live node.
|
|
|
|
|
|
# Probability value is between 0.0 and 1.0. 0.0 means never, 1.0 means always.
|
|
|
|
|
|
gossip-different-view-probability = 0.8
|
|
|
|
|
|
|
2013-01-29 11:55:33 +01:00
|
|
|
|
# Settings for the Phi accrual failure detector (http://ddg.jaist.ac.jp/pub/HDY+04.pdf
|
2013-05-29 17:20:18 +02:00
|
|
|
|
# [Hayashibara et al]) used by the cluster subsystem to detect unreachable
|
|
|
|
|
|
# members.
|
2012-01-31 15:00:46 +01:00
|
|
|
|
failure-detector {
|
|
|
|
|
|
|
2012-09-06 21:48:40 +02:00
|
|
|
|
# FQCN of the failure detector implementation.
|
2013-01-29 11:55:33 +01:00
|
|
|
|
# It must implement akka.remote.FailureDetector and have
|
2013-05-17 14:16:26 +02:00
|
|
|
|
# a public constructor with a com.typesafe.config.Config and
|
|
|
|
|
|
# akka.actor.EventStream parameter.
|
2013-01-29 11:55:33 +01:00
|
|
|
|
implementation-class = "akka.remote.PhiAccrualFailureDetector"
|
|
|
|
|
|
|
|
|
|
|
|
# How often keep-alive heartbeat messages should be sent to each connection.
|
|
|
|
|
|
heartbeat-interval = 1 s
|
|
|
|
|
|
|
|
|
|
|
|
# Defines the failure detector threshold.
|
|
|
|
|
|
# A low threshold is prone to generate many wrong suspicions but ensures
|
|
|
|
|
|
# a quick detection in the event of a real crash. Conversely, a high
|
|
|
|
|
|
# threshold generates fewer mistakes but needs more time to detect
|
|
|
|
|
|
# actual crashes.
|
2012-06-18 11:10:59 +02:00
|
|
|
|
threshold = 8.0
|
|
|
|
|
|
|
2013-01-29 11:55:33 +01:00
|
|
|
|
# Number of the samples of inter-heartbeat arrival times to adaptively
|
|
|
|
|
|
# calculate the failure timeout for connections.
|
|
|
|
|
|
max-sample-size = 1000
|
|
|
|
|
|
|
2012-06-18 11:10:59 +02:00
|
|
|
|
# Minimum standard deviation to use for the normal distribution in
|
|
|
|
|
|
# AccrualFailureDetector. Too low standard deviation might result in
|
|
|
|
|
|
# too much sensitivity for sudden, but normal, deviations in heartbeat
|
|
|
|
|
|
# inter arrival times.
|
|
|
|
|
|
min-std-deviation = 100 ms
|
|
|
|
|
|
|
|
|
|
|
|
# Number of potentially lost/delayed heartbeats that will be
|
|
|
|
|
|
# accepted before considering it to be an anomaly.
|
|
|
|
|
|
# This margin is important to be able to survive sudden, occasional,
|
|
|
|
|
|
# pauses in heartbeat arrivals, due to for example garbage collect or
|
|
|
|
|
|
# network drop.
|
2013-01-29 11:55:33 +01:00
|
|
|
|
acceptable-heartbeat-pause = 3 s
|
2012-01-31 15:00:46 +01:00
|
|
|
|
|
2013-01-29 11:55:33 +01:00
|
|
|
|
# Number of member nodes that each member will send heartbeat messages to,
|
|
|
|
|
|
# i.e. each node will be monitored by this number of other nodes.
|
|
|
|
|
|
monitored-by-nr-of-members = 5
|
2013-01-15 09:35:07 +01:00
|
|
|
|
|
|
|
|
|
|
# When no expected heartbeat message has been received an explicit
|
|
|
|
|
|
# heartbeat request is sent to the node that should emit heartbeats.
|
|
|
|
|
|
heartbeat-request {
|
|
|
|
|
|
# Grace period until an explicit heartbeat request is sent
|
|
|
|
|
|
grace-period = 10 s
|
|
|
|
|
|
|
|
|
|
|
|
# After the heartbeat request has been sent the first failure detection
|
|
|
|
|
|
# will start after this period, even though no heartbeat mesage has
|
|
|
|
|
|
# been received.
|
|
|
|
|
|
expected-response-after = 3 s
|
|
|
|
|
|
|
|
|
|
|
|
# Cleanup of obsolete heartbeat requests
|
|
|
|
|
|
time-to-live = 60 s
|
|
|
|
|
|
}
|
2012-01-31 15:00:46 +01:00
|
|
|
|
}
|
2012-06-12 13:34:59 +02:00
|
|
|
|
|
2012-09-24 13:07:11 -06:00
|
|
|
|
metrics {
|
|
|
|
|
|
# Enable or disable metrics collector for load-balancing nodes.
|
|
|
|
|
|
enabled = on
|
|
|
|
|
|
|
2012-11-07 20:36:24 +01:00
|
|
|
|
# FQCN of the metrics collector implementation.
|
2013-06-18 15:07:26 +02:00
|
|
|
|
# It must implement akka.cluster.MetricsCollector and
|
2013-02-08 13:13:52 +01:00
|
|
|
|
# have public constructor with akka.actor.ActorSystem parameter.
|
2012-11-08 18:49:54 +01:00
|
|
|
|
# The default SigarMetricsCollector uses JMX and Hyperic SIGAR, if SIGAR
|
|
|
|
|
|
# is on the classpath, otherwise only JMX.
|
2012-11-07 20:36:24 +01:00
|
|
|
|
collector-class = "akka.cluster.SigarMetricsCollector"
|
|
|
|
|
|
|
2012-11-15 12:48:13 +01:00
|
|
|
|
# How often metrics are sampled on a node.
|
|
|
|
|
|
# Shorter interval will collect the metrics more often.
|
2012-11-07 20:36:24 +01:00
|
|
|
|
collect-interval = 3s
|
2012-09-24 13:07:11 -06:00
|
|
|
|
|
|
|
|
|
|
# How often a node publishes metrics information.
|
|
|
|
|
|
gossip-interval = 3s
|
|
|
|
|
|
|
2012-10-01 20:35:19 +02:00
|
|
|
|
# How quickly the exponential weighting of past data is decayed compared to
|
2012-11-07 20:36:24 +01:00
|
|
|
|
# new data. Set lower to increase the bias toward newer values.
|
2013-05-29 17:20:18 +02:00
|
|
|
|
# The relevance of each data sample is halved for every passing half-life
|
|
|
|
|
|
# duration, i.e. after 4 times the half-life, a data sample’s relevance is
|
|
|
|
|
|
# reduced to 6% of its original relevance. The initial relevance of a data
|
|
|
|
|
|
# sample is given by 1 – 0.5 ^ (collect-interval / half-life).
|
2012-11-15 12:48:13 +01:00
|
|
|
|
# See http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
|
|
|
|
|
|
moving-average-half-life = 12s
|
2012-09-24 13:07:11 -06:00
|
|
|
|
}
|
|
|
|
|
|
|
2012-10-01 20:35:19 +02:00
|
|
|
|
# If the tick-duration of the default scheduler is longer than the
|
|
|
|
|
|
# tick-duration configured here a dedicated scheduler will be used for
|
|
|
|
|
|
# periodic tasks of the cluster, otherwise the default scheduler is used.
|
2013-04-07 20:07:26 +02:00
|
|
|
|
# See akka.scheduler settings for more details.
|
2012-06-12 13:34:59 +02:00
|
|
|
|
scheduler {
|
|
|
|
|
|
tick-duration = 33ms
|
|
|
|
|
|
ticks-per-wheel = 512
|
|
|
|
|
|
}
|
2012-07-02 12:30:49 +02:00
|
|
|
|
|
2012-01-31 15:00:46 +01:00
|
|
|
|
}
|
2012-08-28 08:36:14 +02:00
|
|
|
|
|
2012-08-29 19:33:19 +02:00
|
|
|
|
# Default configuration for routers
|
2012-11-08 18:49:54 +01:00
|
|
|
|
actor.deployment.default {
|
|
|
|
|
|
# MetricsSelector to use
|
|
|
|
|
|
# - available: "mix", "heap", "cpu", "load"
|
2013-02-08 13:13:52 +01:00
|
|
|
|
# - or: Fully qualified class name of the MetricsSelector class.
|
|
|
|
|
|
# The class must extend akka.cluster.routing.MetricsSelector
|
|
|
|
|
|
# and have a public constructor with com.typesafe.config.Config
|
|
|
|
|
|
# parameter.
|
2012-11-08 18:49:54 +01:00
|
|
|
|
# - default is "mix"
|
|
|
|
|
|
metrics-selector = mix
|
|
|
|
|
|
}
|
2012-08-29 19:33:19 +02:00
|
|
|
|
actor.deployment.default.cluster {
|
|
|
|
|
|
# enable cluster aware router that deploys to nodes in the cluster
|
|
|
|
|
|
enabled = off
|
|
|
|
|
|
|
|
|
|
|
|
# Maximum number of routees that will be deployed on each cluster
|
|
|
|
|
|
# member node.
|
|
|
|
|
|
# Note that nr-of-instances defines total number of routees, but
|
|
|
|
|
|
# number of routees per node will not be exceeded, i.e. if you
|
|
|
|
|
|
# define nr-of-instances = 50 and max-nr-of-instances-per-node = 2
|
|
|
|
|
|
# it will deploy 2 routees per new member in the cluster, up to
|
|
|
|
|
|
# 25 members.
|
|
|
|
|
|
max-nr-of-instances-per-node = 1
|
|
|
|
|
|
|
2012-09-08 17:30:42 +02:00
|
|
|
|
# Defines if routees are allowed to be located on the same node as
|
|
|
|
|
|
# the head router actor, or only on remote nodes.
|
2012-09-07 12:07:41 +02:00
|
|
|
|
# Useful for master-worker scenario where all routees are remote.
|
2012-09-11 19:11:20 +02:00
|
|
|
|
allow-local-routees = on
|
2012-09-07 12:07:41 +02:00
|
|
|
|
|
2012-09-07 14:54:53 +02:00
|
|
|
|
# Actor path of the routees to lookup with actorFor on the member
|
|
|
|
|
|
# nodes in the cluster. E.g. "/user/myservice". If this isn't defined
|
|
|
|
|
|
# the routees will be deployed instead of looked up.
|
2012-09-11 19:11:20 +02:00
|
|
|
|
# max-nr-of-instances-per-node should not be configured (default value is 1)
|
|
|
|
|
|
# when routees-path is defined.
|
2012-09-07 14:54:53 +02:00
|
|
|
|
routees-path = ""
|
|
|
|
|
|
|
2013-04-05 16:12:45 +02:00
|
|
|
|
# Use members with specified role, or all members if undefined or empty.
|
2013-03-14 20:32:43 +01:00
|
|
|
|
use-role = ""
|
|
|
|
|
|
|
2012-08-29 19:33:19 +02:00
|
|
|
|
}
|
2012-11-08 18:49:54 +01:00
|
|
|
|
|
2013-04-04 17:56:29 +02:00
|
|
|
|
# Protobuf serializer for cluster messages
|
|
|
|
|
|
actor {
|
|
|
|
|
|
serializers {
|
|
|
|
|
|
akka-cluster = "akka.cluster.protobuf.ClusterMessageSerializer"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
serialization-bindings {
|
|
|
|
|
|
"akka.cluster.ClusterMessage" = akka-cluster
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2012-01-31 15:00:46 +01:00
|
|
|
|
}
|